AnsweredAssumed Answered

S32DS :  Cmake Cannot locate __arm_start.o during the linking

Question asked by Satish Singh on Jul 3, 2019
Latest reply on Jul 5, 2019 by ALEXANDER FEDOTOV

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.

Outcomes