Integrating Diab Compiler with S32DS

Showing results for 
Search instead for 
Did you mean: 

Integrating Diab Compiler with S32DS

Contributor V


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 > d -o MPC5745R_DiabCompilerTest.ELF 


-lc -ld
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
and ./Project_Settings/Startup_Code/startup_MPC5745R.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.

Thank you




0 Kudos
2 Replies

NXP Employee
NXP Employee


I'd suggest you to check the HOWTO below

HOWTO: Install Wind River compiler Eclipse plug-in into S32 Design Studio 

It should integrate the build tools automatically.

Hope it helps.


0 Kudos

Contributor V

Hi Stan,

Thank you for responding.

The errors I point out, occur even after I diligently followed all the instructions in the document you suggested.

I used an NXP example project "interrupts" for the MPC5745R to demonstrate these issues. 

Could you please try to reproduce the problem using the example? If you do not see the problem, then please attach the project here. That way we can confirm the issue is with configuration in my environment.

Looking forward to your reply.

Thank you.


0 Kudos