Если я скомпилирую пример с использованием Arm-none-eabi-gcc, он будет собран нормально. Ниже приведены команды, используемые для компиляции и компоновки:
Код: Выделить всё
arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -Os -DTARGET_IS_TM4C123_RB1 -fno-builtin -I../../../.. -Dgcc -o gcc/blinky.o blinky.c
arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -Os -DTARGET_IS_TM4C123_RB1 -fno-builtin -I../../../.. -Dgcc -o gcc/startup_gcc.o startup_gcc.c
arm-none-eabi-ld -T blinky.ld --entry ResetISR --gc-sections -o gcc/blinky.axf gcc/blinky.o gcc/startup_gcc.o ../../../../driverlib/gcc/libdriver.a /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libm.a /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libstdc++.a /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a
Код: Выделить всё
arm-none-eabi-g++ -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -Os -DTARGET_IS_TM4C123_RB1 -fno-builtin -I../../../.. -fno-builtin -I../../../.. -o gcc/blinky.o blinky.cc
arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -Wall -pedantic -DPART_TM4C123GH6PM -c -Os -DTARGET_IS_TM4C123_RB1 -fno-builtin -I../../../.. -Dgcc -o gcc/startup_gcc.o startup_gcc.c
arm-none-eabi-ld -T blinky.ld --entry ResetISR --gc-sections -o gcc/blinky.axf gcc/blinky.o gcc/startup_gcc.o ../../../../driverlib/gcc/libdriver.a /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libm.a /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libstdc++.a /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a
Код: Выделить всё
arm-none-eabi-ld: /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a(unwind-arm.o): in function `get_eit_entry':
unwind-arm.c:(.text.get_eit_entry+0x90): undefined reference to `__exidx_start'
arm-none-eabi-ld: unwind-arm.c:(.text.get_eit_entry+0x94): undefined reference to `__exidx_end'
arm-none-eabi-ld: /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a(unwind-arm.o): in function `unwind_phase2':
unwind-arm.c:(.text.unwind_phase2+0x36): undefined reference to `abort'
arm-none-eabi-ld: /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a(unwind-arm.o): in function `unwind_phase2_forced':
unwind-arm.c:(.text.unwind_phase2_forced+0x4a): undefined reference to `memcpy'
arm-none-eabi-ld: unwind-arm.c:(.text.unwind_phase2_forced+0x78): undefined reference to `memcpy'
arm-none-eabi-ld: /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a(unwind-arm.o): in function `__gnu_Unwind_Resume':
unwind-arm.c:(.text.__gnu_Unwind_Resume+0x3c): undefined reference to `abort'
arm-none-eabi-ld: unwind-arm.c:(.text.__gnu_Unwind_Resume+0x40): undefined reference to `abort'
../../../../makedefs:244: recipe for target 'gcc/blinky.axf' failed
gmake: *** [gcc/blinky.axf] Error 1
Подробнее здесь: https://stackoverflow.com/questions/791 ... ded-target