Finally, I can compile but now the code size is too large for the target :(
the problem above was solved by adjusting the MBED-CLI command to;
Mbed compile -t GCC_ARM -m NUCLEO_F072RB - - profile mbed-os/tools/profiles/small.json
Even with this small profile the code still does not fit, approx 150% of the original size. (approx 50k has been added.)
This code was running on mbed2.0 onine,
Now exported to GCC_ARM and unzipped into the \v12\ folder
How can I fix this new issue ?
(the flash size in the .Id file is correctly 128k and ram 16k)
ie. (inside a VENV Yotta shell)
(workspace) C:\workspace\v12>mbed compile -t GCC_ARM -m NUCLEO_F072RB --profile mbed-os/tools/profiles/small.json
Building project v12 (NUCLEO_F072RB, GCC_ARM)
Scan: .
Scan: FEATURE_BLE
Scan: FEATURE_COMMON_PAL
Scan: FEATURE_LWIP
Scan: FEATURE_UVISOR
Scan: FEATURE_LOWPAN_BORDER_ROUTER
Scan: FEATURE_LOWPAN_HOST
Scan: FEATURE_LOWPAN_ROUTER
Scan: FEATURE_NANOSTACK
Scan: FEATURE_NANOSTACK_FULL
Scan: FEATURE_THREAD_BORDER_ROUTER
Scan: FEATURE_THREAD_END_DEVICE
Scan: FEATURE_THREAD_ROUTER
Scan: FEATURE_STORAGE
Scan: mbed
Scan: env
Link: v12
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: ./.build/NUCLEO_F072RB/GCC_ARM/v12.elf section `.text' will not fit in region `FLASH'
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: ./.build/NUCLEO_F072RB/GCC_ARM/v12.elf section `.bss' will not fit in region `RAM'
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region RAM overflowed with stack
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 46424 bytes
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 352 bytes
./.build/NUCLEO_F072RB/GCC_ARM/Cairo_V10-072_GCC_ARM/main.o: In function `main':
main.cpp:(.text.startup.main+0x6c): undefined reference to `Init_Usart2()'
collect2.exe: error: ld returned 1 exit status
[ERROR] c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: ./.build/NUCLEO_F072RB/GCC_ARM/v12.elf section `.text' will not fit in region `FLASH'
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: ./.build/NUCLEO_F072RB/GCC_ARM/v12.elf section `.bss' will not fit in region `RAM'
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region RAM overflowed with stack
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 46424 bytes
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 352 bytes
./.build/NUCLEO_F072RB/GCC_ARM/Cairo_V10-072_GCC_ARM/main.o: In function `main':
main.cpp:(.text.startup.main+0x6c): undefined reference to `Init_Usart2()'
collect2.exe: error: ld returned 1 exit status
[mbed] ERROR: "python" returned error code 1.
[mbed] ERROR: Command "python -u C:\workspace\v12\mbed-os\tools\make.py -t GCC_ARM -m NUCLEO_F072RB --source . --build .\.build\NUCLEO_F072RB\GCC_ARM --profile mbed-os/tools/profiles/small.json" in "C:\workspace\v12"
When i export the code from mbed compiler to keil4 version then i am getting error as mbed/TARGET_LPC4088/TOOLCHAIN_ARM_STD/LPC407X_8X.sct: error: L6047U: The size of this image (271232 bytes) exceeds the maximum allowed for this version of the linker what does it mean and how to overcome this error can anyone answer me.