Issue with ASM_FLAGS for Eclipse GCC ARM export

07 Jan 2019

I exported my project, DataBus2018, using the Eclipse GCC ARM selection. While the project compiles flawlessly in the online compiler, when I compiled it offline the following error was generated:

cc1: fatal error: /filer/workspace_data/exports/e/ea69a66d683e3188f4e6b0dc0053339d/DataBus2018/mbed_config.h: No such file or directory
compilation terminated.

The error traces to this line in the Makefile...

ASM_FLAGS += /filer/workspace_data/exports/e/ea69a66d683e3188f4e6b0dc0053339d/DataBus2018/mbed_config.h

Upon changing this line to:

ASM_FLAGS += mbed_config.h

...the compile completed successfully1. If I were a gambling man, I'd wager that the long path above is a temporary path used by the export code, and whatever code generates the Makefile, it either used an absolute path to mbed_config.h or neglected to take the basename or something along those lines.

Thanks much!

1. Before I ever reached this error in the first place I had many compile errors to fix, a story I will leave for another thread.

31 May 2019

Same problem with export for VScode GQC_ARM selection

14 Jun 2019

The solution is

change the line to

ASM_FLAGS += ../mbed_config.h

if you change it to ASM_FLAGS += mbed_config.h , it will complain that it cannot find it ..

Look at this discussion : https://github.com/ARMmbed/mbed-os/issues/9816