Code size exceeds the maximum allowed for this version

15 Nov 2016

how can we fix this ?

it works ok online..

but not offline ?

Fatal error: L6050U: The code size of this image (103060 bytes) exceeds the maximum allowed for this version of the linker.

16 Nov 2016

This was fixed by adjusting to the GCC_ARM compiler,

This code was running online in mbed2, zipped and moved offline.

compiled within a venv yotta shell , (workspace) C:\workspace\v11> mbed compile -t GCC_ARM -m NUCLEO_F072RB

The code size is too large for the flash 128k. the .id file has 128k and 16kram correctly. I added the small.json profile but still;

this is the new error;

(workspace) C:\workspace\v11>mbed compile -t GCC_ARM -m NUCLEO_F072RB --profile mbed-os/tools/profiles/small.json
Building project v11 (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: v11
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: ./.build/NUCLEO_F072RB/GCC_ARM/v11.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/v11.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 47320 bytes
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 568 bytes
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/v11.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/v11.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 47320 bytes
c:/yotta/gcc/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 568 bytes
collect2.exe: error: ld returned 1 exit status

[mbed] ERROR: "python" returned error code 1.
[mbed] ERROR: Command "python -u C:\workspace\v11\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\v11"
---
18 Nov 2016

almost good now,

installed MDK522 licensed for M0. I can compile and link successfully.

but still 9k larger code size from online to offline.

but now when I flash the board, the processor is dead.. reflash with the mbed2 online file, the program is up and running again.