6 years, 7 months ago.

Strange behaviour after exporting to GCC_ARM and compiling with Netbeans

Hi,

I have a strange problem with mbed os 5 and mbed-cli - When I export a project (for example mbed-os-example-blinky) to the arm_gcc toolchain using 'mbed export -i GCC_ARM', I can import this into Netbeans as a makefile-project.

In netbeans, I can compile - no problem. In command line, with 'make -f Makefile', I can also build - no problem. But when I try to do a 'mbed compile' after I did export and open with netbeans - The compilation won't succeed because of flash overrun. When I use another target with bigger flash size (for example EFM32PG12_STK3402 instead of EFM32PG_STK3401), the compilation will run through, but in the build summary I can see that the image size has grown dramatically. In the overview of the summary I now see a '.misc' section which takes about 200kB ?!?

So - why is mbed compile not working anymore after an export, but make via makefile (and thus in netbeans) IS working ?

Something from the export is influencing the mbed-cli build environment.... but what?

regards, MikeDK

1 Answer

6 years, 7 months ago.

I don't know netbeans, is it possible that it adds directories with sourcefiles to the project? 'mbed compile' scans for sourcecode and adds it to the build. When this happens, you could add a '.mbedignore' file to the added subdirs.

Accepted Answer

You are right! Netbeans adds a folder called "nbproject" and there, in a subfolder, it adds a .c and a .cpp file where dozens of includes are done.

With the .mbedignore file everything is now working as expected again.

Thank you very much :D

posted by Michael Kaplan 01 Sep 2017