I want to modify the S32DS environment to use Diab compiler instead of (default) GNU compiler. I have made all the changes to environment variables and am able to invoke the Diab compiler but am facing several issues as below:
1. I used the MPC5745R_Flash.dld file that is supplied by NXP for use with Diab, Following this note in the dld file
"/* Linker symbols can be modified by using -MD as parameter
* when linker is called. This requires the preprocessor
* to be enabled for linker scripts - "-Xpreprocess-lecl" parameter
* must be added to the linker command line
I added the flag -Xpreprocess-lecl to the linker command line as below, but I still get the error below
Invoking: Diab C Linker
dcc -Wl, -Xpreprocess-lecl -Wm ../Project_settings/Linker_Files/MPC5745R_Flash.dld -Xdialect-c99 -tPPCE200Z425N3VEF:simple -m31 > link.map d -o MPC5745R_DiabCompilerTest.ELF
dld: parse error in ../Project_settings/Linker_Files/MPC5745R_Flash.dld line 35:
dld: error: #
C:\WindRiver\utilities\x86-win32\bin\make.exe: *** [MPC5745R_DiabCompilerTest.ELF] Error 1
Per note in the dld file, using flag -Xpreprocess-lecl should preprocess the macros and hence "#" should not be an error.
2. Linker error:
dld: Redeclaration of _start
Defined in C:\WINDRI~1\COMPIL~1\DIAB-5~1.0\PPCVLEE\crt0.o
dld: error: -Xstop-on-redeclaration is on. Linking aborted
The startup_MPC5745R .s file is attached. When I remove the "_start: " in this file, the error goes away but then I am probably using the wrong entry point.
Looking for an example that demonstrates how to successfully integrate Diab compiler with S32DS.