arm-none-eabi-ld link fail
I am using the latest windows arm-none-eabi toolchain version 4.9 to generate image for cortex-m3 base mcu.
arm-none-eabi-gcc options CFLAGS:
-march=armv7-m
-mcpu=cortex-m3
-mthumb
-mlittle-endian
-Os
-ffunction-sections
-fdata-sections
arm-none-eabi-as options AS_FLAGS:
-march=armv7-m
-mcpu=cortex-m3
-mthumb
-mlittle-endian
arm-none-eabi-ld options LD_FLAGS:
-static
--gc-sections
-T mcu.lds
-L$(CROSS_
Compile & assemble all ok, but the last step fail:
arm-none-eabi-ld $(LD_FLAGS) -o mcu.elf staruptup.o main.o -lc
It shows lots of symbol undefined, such as memset, strlen, sprintf...
I've tried the lib "-lgcc" in other directory, but get the same errors.
How to link these APIs?
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
This question was originally filed as bug #1409197.
Can you help with this problem?
Provide an answer of your own, or ask Gary for more information if necessary.