Linker error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Linker error

254 次查看
Ashish4525
Contributor II

Dear all,

I am facing some issue related to my linker file and startup code ,

It is giving below errors while compiling

Linking 'output_debug.out' using build mode 'debug'.

d:/compiler/arm/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: d:/compiler/arm/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib\libg.a(lib_a-exit.o): in function `exit':

exit.c:(.text.exit+0x2c): undefined reference to `_exit'

d:/compiler/arm/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ../../Target/debug/obj/startup.o: in function `JumpToSelf':

D:/EclipseWrkSpc/MakefileProject2/Source/Generic/S32k118/StartUp/startup.s:122: undefined reference to `__RAM_START'

d:/compiler/arm/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/EclipseWrkSpc/MakefileProject2/Source/Generic/S32k118/StartUp/startup.s:123: undefined reference to `__RAM_END'

d:/compiler/arm/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/EclipseWrkSpc/MakefileProject2/Source/Generic/S32k118/StartUp/startup.s:140: undefined reference to `__StackTop'

d:/compiler/arm/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/EclipseWrkSpc/MakefileProject2/Source/Generic/S32k118/StartUp/startup.s:150: undefined reference to `init_data_bss'

d:/compiler/arm/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ../../Target/debug/obj/startup.o: in function `__isr_vector':

(.isr_vector+0x0): undefined reference to `__StackTop'

collect2.exe: error: ld returned 1 exit status

 

PFA for reference startup and linker txt file

Below are  assembler options, linker options and compiler option

AFLAG = -mcpu=cortex-m0plus -g -list -c -mthumb -Wformat -Wimplicit -int -Wshadow -Wtrigraphs -Wundef -r

CFLAG = -c -g -Wall -pedantic -mcpu=cortex-m0plus -Wextra -mfloat-abi=soft -march=armv6-m -mfpu=auto -Os -mthumb -lc

LFLAG = -T"autosar_flash_118.ld"-entry Reset_Handler --gc-sections --print-memory-usage

 With regards

Ashish Pokhriyal

 

0 项奖励
0 回复数