S32DS : Cmake Cannot locate __arm_start.o during the linking

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32DS : Cmake Cannot locate __arm_start.o during the linking

1,273件の閲覧回数
satish_k_singh
Contributor III

Hello ,

I am currently working with the cmake build  for the S32DSK148 eval board , and during the linking I get the  below error where the __arm_start.o file is not found.

abi-4_9/arm-none-eabi/newlib/lib/armv7-ar/thumb
/home/satishksingh/workspaceS32DS.ARM/Git1/s32k-viperapp/deps/gcc-arm/gcc-arm/gcc-arm-none-eabi-4_9/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: cannot find __arm_start.o: No such file or directory

when I look for the file , i could find the same in the below path.

./deps/s32ds/S32DS/arm_ewl2/lib/armv7-ar/thumb/fpu/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/armv7-ar/thumb/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/armv7-ar/thumb/softfp/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/cortex-m7/fpu/fpv5-sp-d16/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/cortex-m7/fpu/fpv5-d16/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/cortex-m7/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/cortex-m7/softfp/fpv5-sp-d16/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/cortex-m7/softfp/fpv5-d16/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/armv7e-m/fpu/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/armv7e-m/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/armv7e-m/softfp/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/armv7e-m/spfp/__arm_start.o
./deps/s32ds/S32DS/arm_ewl2/lib/armv6-m/__arm_start.o

The problem occurs when the in the Cmakelist I remove the -nostartupfile in the target_link_libraries.

Before:

target_link_libraries(${PROJECT_NAME}
    ${CPU_OPTIONS}
    -T${LINKER_SCRIPT}
-nostartfiles    

m #libm
    gcc #libgcc
)

After change:

target_link_libraries(${PROJECT_NAME}
    ${CPU_OPTIONS}
    -T${LINKER_SCRIPT}
 

m #libm
    gcc #libgcc
)

So could you please let know how to link the startup.o file.

0 件の賞賛
1 返信

1,023件の閲覧回数
alexanderfedoto
NXP Employee
NXP Employee

Seems to me you are mixing different libraries when link - newlib and ewl2 are independent.

Message about missing __arm_start.o means you have specified specs file from EWL2. But sysroot is set to newlib.

0 件の賞賛