.mbedignore with Mbed Studio

How to use .mbedignore with Mbed Studio to reduce compile time?

Hi Stefan,

I recommend looking at this post from @hudakz How to shorten compilation time up to six times

To add a .mbedignore file to your project please right-click your project in a file tree and select New File.

Thanks,
Arek - Mbed Studio team

2 Likes

Thank you, by this way it works perfect.

It seems that there are many problems. I used the NUCLEO-F767ZI example from @hudakz and I get following errors and warnings, compile fails:

[Warning] @0,0: L3912W: Option 'legacyalign' is deprecated.
[Error] @0,0: L6218E: Undefined symbol CellularInterface::get_target_default_instance() (referred from BUILD/NUCLEO_F767ZI/ARMC6/mbed-os/connectivity/netsocket/source/NetworkInterfaceDefaults.o).
Warning: L3912W: Option 'legacyalign' is deprecated.
Error: L6218E: Undefined symbol CellularInterface::get_target_default_instance() (referred from BUILD/NUCLEO_F767ZI/ARMC6/mbed-os/connectivity/netsocket/source/NetworkInterfaceDefaults.o).
Finished: 0 information, 1 warning and 1 error messages.
[ERROR] Warning: L3912W: Option 'legacyalign' is deprecated.
Error: L6218E: Undefined symbol CellularInterface::get_target_default_instance() (referred from BUILD/NUCLEO_F767ZI/ARMC6/mbed-os/connectivity/netsocket/source/NetworkInterfaceDefaults.o).
Finished: 0 information, 1 warning and 1 error messages.

Following lines doesn’t work and gives fails:

/* Cellular */
mbed-os/connectivity/cellular/*
mbed-os/connectivity/drivers/cellular/*
mbed-os/connectivity/netsocket/source/Cellular*.*

/* Device Key */
mbed-os/drivers/device_key/*

/* Storage */
mbed-os/storage/filesystem/*
mbed-os/storage/kvstore/*
mbed-os/storage/platform/*

@hudakz works with Mbed CLI and his example works, I work with Mbed Studio (mbed-os 6.6 and latest tools) and it fails. It seems there is some difference for use .mbedignore between CLI and Studio.
I tried the example in the documentation for cellular:

connectivity/cellular/*
connectivity/drivers/cellular/*

This is without mbed-os/in the path, I can compile but nothing happens.
No changes in the compiled files and size.
It seems .mbedigore is very buggy.

I found that there is a case-sensitive issue and
“mbed-os/connectivity/lwipstack/*”

should read: “mbed-os/connectivity/LWIPstack/*”
This cleans up the compile.