Why does the linker try including a noneexistend crt0 object?

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

Why does the linker try including a noneexistend crt0 object?

ソリューションへジャンプ
1,915件の閲覧回数
markusregner
NXP Employee
NXP Employee

Here the part of the log file which shows that the linker tries incoroprating a nonexistent crt0.o object:

Building target: DiagnosticsTest_CM7.elf
Invoking: Standard S32DS C Linker
arm-none-eabi-gcc -o "DiagnosticsTest_CM7.elf" "@DiagnosticsTest_CM7.args"
c:/nxp/s32ds.3.5/s32ds/build_tools/gcc_v9.2/gcc-9.2-arm32-eabi/bin/../lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/real-ld.exe: cannot find crt0.o: No such file or directory
c:/nxp/s32ds.3.5/s32ds/build_tools/gcc_v9.2/gcc-9.2-arm32-eabi/bin/../lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/real-ld.exe: cannot find -lc
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:76: DiagnosticsTest_CM7.elf] Error 1
"make -j12 TOOLCHAIN=linaro" terminated with exit code 2. Build might be incomplete.

Please guide me to the S32DS tool option which obviously needs to be adjusted.

BTW I also do not see where the option -lc gets set in the tool

 

0 件の賞賛
返信
1 解決策
1,839件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @markusregner,

I haven't really tested the project, but I've just imported and built it. Is this the "S32Gx based S32G-VNP-EVBx diagnostics package version 0.8.7" package?

By "It was already not compiling any longer", do you mean in the newer versions of S32DS? Is this a new error or has this been known by the SW team since Nov? 

The release notes for this package say it is supported by S32DS3.4: 

--Complete suite builds out of box with S32Design Studio v3.4

After importing this project, and right clicking for "Properties", go into "C/C++ Build > Tool Chain Editor". The current toolchain for the project should show up. 

Julin_AragnM_0-1717432307120.png

Just to confirm, after downloading and importing the project, when going into properties, is the NXP GCC 9.2 toolchain selected? 

Best regards,
Julián

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,843件の閲覧回数
markusregner
NXP Employee
NXP Employee

BTW, Around November 2023 I discussed with members of the NXP SW team the future of this Diagnostic code. At that time it was already not compiling any longer. And the NXP team knew. So I wonder how you got it compiling now. Anyway... I think the question is how can I chose now the right compiler in my S32DS to make it compile again?

0 件の賞賛
返信
1,840件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @markusregner,

I haven't really tested the project, but I've just imported and built it. Is this the "S32Gx based S32G-VNP-EVBx diagnostics package version 0.8.7" package?

By "It was already not compiling any longer", do you mean in the newer versions of S32DS? Is this a new error or has this been known by the SW team since Nov? 

The release notes for this package say it is supported by S32DS3.4: 

--Complete suite builds out of box with S32Design Studio v3.4

After importing this project, and right clicking for "Properties", go into "C/C++ Build > Tool Chain Editor". The current toolchain for the project should show up. 

Julin_AragnM_0-1717432307120.png

Just to confirm, after downloading and importing the project, when going into properties, is the NXP GCC 9.2 toolchain selected? 

Best regards,
Julián

0 件の賞賛
返信
1,844件の閲覧回数
markusregner
NXP Employee
NXP Employee

Hi Julian,

Yes, this is a migration of an older project which I used for demonstrating certain functionalities to colleagues and customers. Hence, yes likely it was built with a different GCC at that time.

I tried the workaround described in the link which you sent. It made things even worse. It lead to 135 errors. 

Well to my best knowledge I imported the project just as normal.

So how can I fix it?

BTW, I also wonder why a different GCC compiler lead to a failure message about crt0.o? 

Existence and Absence of such file should matter of the project and not matter of the compiler version. 

Best regards,

-Markus

 

0 件の賞賛
返信
1,890件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @markusregner,

Could you share some information from your project? 

Are you building the diagnostic tests for S32G-VNP-EVBx Diagnostics? Also, I see on the path that gcc 9.2 is being used, but when importing the EVBx Diagnostics project on my side, I can build them correctly using the default gcc (6.3):

Finished building: ../src/s32g_test_all.c
 
Building target: DiagnosticsTest_CM7.elf
Invoking: Standard S32DS C Linker
arm-none-eabi-gcc -o "DiagnosticsTest_CM7.elf" "@DiagnosticsTest_CM7.args"  
Finished building target: DiagnosticsTest_CM7.elf
 
Invoking: Standard S32DS Create Flash Image
arm-none-eabi-objcopy -O binary DiagnosticsTest_CM7.elf  "DiagnosticsTest_CM7.bin"
Invoking: Standard S32DS Print Size
arm-none-eabi-size --format=berkeley DiagnosticsTest_CM7.elf
   text	   data	    bss	    dec	    hex	filename
 158264	 481664	 247728	 887656	  d8b68	DiagnosticsTest_CM7.elf
Finished building: DiagnosticsTest_CM7.siz
Finished building: DiagnosticsTest_CM7.bin
 
 

13:12:32 Build Finished. 0 errors, 151 warnings. (took 22s.434ms)

Did you port the example? Are you using another package? This issue may be caused by different GCC versions.

Also, take a look at this community post with a similar issue, it was resolved by copying some configuration from the GCC path: Facing Issue with Make file S32K144 [crt0.o : No such Directory] - NXP Community

Best regards,
Julián

0 件の賞賛
返信
%3CLINGO-SUB%20id%3D%22lingo-sub-1876353%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E3%83%AA%E3%83%B3%E3%82%AB%E3%81%8C%20noneexistend%20crt0%20%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%92%E5%90%AB%E3%82%81%E3%82%88%E3%81%86%E3%81%A8%E3%81%99%E3%82%8B%E3%81%AE%E3%81%AF%E3%81%AA%E3%81%9C%E3%81%A7%E3%81%99%E3%81%8B%E3%80%82%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1876353%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%93%E3%81%93%E3%81%A7%E3%81%AF%E3%80%81%E3%83%AA%E3%83%B3%E3%82%AB%E3%81%8C%E5%AD%98%E5%9C%A8%E3%81%97%E3%81%AA%E3%81%84%20crt0.o%20%E3%81%AE%E6%9A%97%E5%8F%B7%E5%8C%96%E3%82%92%E8%A9%A6%E3%81%BF%E3%81%A6%E3%81%84%E3%82%8B%E3%81%93%E3%81%A8%E3%82%92%E7%A4%BA%E3%81%99%E3%83%AD%E3%82%B0%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E4%B8%80%E9%83%A8%E3%82%92%E7%A4%BA%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%EF%BC%9A%3C%2FP%3E%3CP%3E%E5%BB%BA%E7%89%A9%E5%AF%BE%E8%B1%A1%3ADiagnosticsTest_CM7.elf%3CBR%20%2F%3E%E8%B5%B7%E5%8B%95%E6%99%82%3A%E6%A8%99%E6%BA%96S32DS%20C%E3%83%AA%E3%83%B3%E3%82%AB%3CBR%20%2F%3Earm-none-eabi-gcc%20-o%20%22DiagnosticsTest_CM7.elf%22%20%22%40DiagnosticsTest_CM7.args%22%3CBR%20%2F%3Ec%3A%2Fnxp%2Fs32ds.3.5%2Fs32ds%2Fbuild_tools%2Fgcc_v9.2%2Fgcc-9.2-arm32-eabi%2Fbin%2F..%2Flib%2Fgcc%2Farm-none-eabi%2F9.2.0%2F..%2F..%2F..%2F..%2Farm-none-eabi%2Fbin%2Freal-ld.exe%E3%81%AB%E8%BF%BD%E5%8A%A0%E3%81%97%E3%81%BE%E3%81%99%E3%80%82crt0.o%20%E3%81%8C%E8%A6%8B%E3%81%A4%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%3A%E8%A9%B2%E5%BD%93%E3%81%99%E3%82%8B%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%84%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%3CBR%20%2F%3Ec%3A%2Fnxp%2Fs32ds.3.5%2Fs32ds%2Fbuild_tools%2Fgcc_v9.2%2Fgcc-9.2-arm32-eabi%2Fbin%2F..%2Flib%2Fgcc%2Farm-none-eabi%2F9.2.0%2F..%2F..%2F..%2F..%2Farm-none-eabi%2Fbin%2Freal-ld.exe%E3%81%AB%E8%BF%BD%E5%8A%A0%E3%81%97%E3%81%BE%E3%81%99%E3%80%82-LC%20%E3%81%8C%E8%A6%8B%E3%81%A4%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%3CBR%20%2F%3Ecollect2.exe%3A%E3%82%A8%E3%83%A9%E3%83%BC%3A%20ld%20%E3%81%8C%201%20%E3%81%A4%E3%81%AE%E7%B5%82%E4%BA%86%E3%82%B9%E3%83%86%E3%83%BC%E3%82%BF%E3%82%B9%E3%82%92%E8%BF%94%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%3CBR%20%2F%3Emake%3A%20***%20%5Bmakefile%3A76%3A%20DiagnosticsTest_CM7.elf%5D%20%E3%82%A8%E3%83%A9%E3%83%BC%201%3CBR%20%2F%3E%22make%20-j12%20TOOLCHAIN%3Dlinaro%22%20%E3%81%8C%E7%B5%82%E4%BA%86%E3%82%B3%E3%83%BC%E3%83%89%202%20%E3%81%A7%E7%B5%82%E4%BA%86%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E3%83%93%E3%83%AB%E3%83%89%E3%81%8C%E4%B8%8D%E5%AE%8C%E5%85%A8%E3%81%A7%E3%81%82%E3%82%8B%E5%8F%AF%E8%83%BD%E6%80%A7%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E6%98%8E%E3%82%89%E3%81%8B%E3%81%AB%E8%AA%BF%E6%95%B4%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%AAS32DS%E3%83%84%E3%83%BC%E3%83%AB%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AB%E6%A1%88%E5%86%85%E3%81%97%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%A8%E3%81%93%E3%82%8D%E3%81%A7%E3%80%81%E7%A7%81%E3%81%AF%E3%81%BE%E3%81%9F%E3%80%81%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE-lc%E3%81%8C%E3%83%84%E3%83%BC%E3%83%AB%E3%81%A7%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%82%8B%E5%A0%B4%E6%89%80%E3%82%92%E8%A6%8B%E3%81%A6%E3%81%84%E3%81%BE%E3%81%9B%E3%82%93%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1879806%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20%E3%81%AA%E3%81%9C%E3%83%AA%E3%83%B3%E3%82%AB%E3%81%AF%20noneexistend%20crt0%20%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%92%E5%90%AB%E3%82%81%E3%82%88%E3%81%86%E3%81%A8%E3%81%99%E3%82%8B%E3%81%AE%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1879806%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%A8%E3%81%93%E3%82%8D%E3%81%A7%E3%80%812023%E5%B9%B411%E6%9C%88%E9%A0%83%E3%80%81%E7%A7%81%E3%81%AFNXP%20SW%E3%83%81%E3%83%BC%E3%83%A0%E3%81%AE%E3%83%A1%E3%83%B3%E3%83%90%E3%83%BC%E3%81%A8%E3%80%81%E3%81%93%E3%81%AE%E8%A8%BA%E6%96%AD%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AE%E5%B0%86%E6%9D%A5%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E8%A9%B1%E3%81%97%E5%90%88%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E3%81%9D%E3%81%AE%E6%99%82%E7%82%B9%E3%81%A7%E3%81%AF%E3%80%81%E3%81%99%E3%81%A7%E3%81%AB%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F%E3%80%82%E3%81%9D%E3%81%97%E3%81%A6%E3%80%81NXP%E3%83%81%E3%83%BC%E3%83%A0%E3%81%AF%E7%9F%A5%E3%81%A3%E3%81%A6%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E3%81%A7%E3%81%AF%E3%80%81%E3%81%A9%E3%81%86%E3%82%84%E3%81%A3%E3%81%A6%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%E3%81%97%E3%81%9F%E3%81%AE%E3%81%A7%E3%81%97%E3%82%87%E3%81%86%E3%80%82%E3%81%A8%E3%81%AB%E3%81%8B%E3%81%8F%E3%80%82%E3%80%82%E3%80%82%E5%95%8F%E9%A1%8C%E3%81%AF%E3%80%81S32DS%E3%81%A7%E9%81%A9%E5%88%87%E3%81%AA%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%A9%E3%82%92%E9%81%B8%E6%8A%9E%E3%81%97%E3%81%A6%E5%86%8D%E5%BA%A6%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%8B%E3%81%A0%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E