Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 7 months ago.
Question about mbed4gcc
Hi All,
I'm working on exporting a mbed project into the vanilla mbed4gcc environment.
After install the 'helloworld' for KL46z compiled fine, but when I export a more complex project from mbed I'm presented with a number of different build-chain options and I'm not having much luck making one work. I've tried the usual suspects, "Gnu ARM Makefile", etc. but they fail on compile with a curious error.
During the linking phase, the linker complains about symbol sizes being too long, and then it dies. I've looked around a lot at what is online and I'm not seeing anything that looks helpful.
Has anyone seen this sort of behavior?
Otter2016
1 Answer
6 years, 7 months ago.
Hi Rick,
I'm not sure what "mbed4gcc" or "gcc4mbed" are, however, we do have simple instructions written for setting up the GNU Arm GCC toolchain with the offline Mbed CLI: https://os.mbed.com/docs/v5.8/tutorials/quick-start-offline.html
You can download the GNU Arm Embedded Toolchain here: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
Please let me know if you have any questions!
- Jenny, team Mbed
If this solved your question, please make sure to click the "Thanks" link below!
Here is one of the errors:
/home/rknowles/mbed-devel/gcc4mbed-master/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld: Warning: size of symbol `_ZTVN4mbed6SerialE' changed from 68 in KL46Z/mbed-src/common/Serial.o to 112 in ../../external/mbed-os/Develop/mbedos/KL46Z/mbedos.a(Serial.o)
posted by Rick Knowles 02 May 2018Correction, that was a warning, here is the error that killed the build:
/home/rknowles/mbed-devel/gcc4mbed-master/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld: region `FLASH_PROTECTION' overflowed by 16 bytes
posted by Rick Knowles 02 May 2018FLASH_PROTECTION (rx) : ORIGIN = 0x00000400, LENGTH = 0x00000010
This is the flash protection region. Somewhere something is placing there more than it can fit. By default you can see there are 0x10 data.
At the end of your startup file, you should find these constants
/* Flash protection region, placed at 0x400 */ .text .thumb .align 2 .section .kinetis_flash_config_field,"a",%progbits kinetis_flash_config: .long 0xffffffff .long 0xffffffff .long 0xffffffff .long 0xfffffffe
posted by Martin Kojtal 07 May 2018