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.
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.