S32DS has installed the DIAB compiler plug-in, has been able to use the DIAB compilation project,
now I want to use the compiler compiler MPC574XG_AUTOSAR_OS_4_0_92_rtm_1_0_3 package sample application,
porting or there is no relevant introduction document
OS generated file should be found in e.g. sample/standard/sc1/output/obj
Linker file shall be generated while building the sample, and could be found in e.g. sample\standard\sc1\output\obj\sample1.ld, and Startup file should be linked automatically with compiler, so both of these above files are incorrect (these files are created by template and shall not be used)
By typing "make showflags" you will see all of the compiler/linking options.
COMPILEROPTIONS = -tPPCE200Z4204N3VEN:simple -c -Wa,-Xisa-vle -XO -Xinline=0 -Xdialect-ansi -g3 -Xdebug-dwarf2 -Xdebug-local-all -Xdebug-local-cie -Xdebug-struct-all -Xnested-interrupts -Xforce-declarations -ee1481 -Xmacro-undefined-warn -Xno-common -Xaddr-sconst=0x11 -Xaddr-sdata=0x11 -W:as:,-l -Xsmall-data=8 -I[Path_to_Diab]/include -DOSDIABPPC
LINKEROPTIONS = -tPPCE200Z4204N3VEN:simple -lc -li -m6 -Xelf
Thank you for your reply. What I did is as shown in the picture. I made some changes to the link file and the system starup.S file should be used
(C:\NXP\AUTOSAR\ MPC574XG_AUTOSAR_OS_4_0_92_rtm_1_0_3 \ SSC \hwspec\diabppc\ CRTS) as a startup file
Please add these below preprocessor:
into list of preprocessor in the project, which can be found in Project >> Properties >> C/C++ Build >> Settings >> Preprocessor
And honestly, I highly recommend you to use the make procedure in sample application. This porting is like a pain in the neck.
What should I look for here? As I have said, please add
into preprocessor (-D defines)
Which is the correct format the first one or the second one
I tried no compile error
They should be added in -D (Defines) not Include path. Just try with two types of slash (either left "/" or right "\").
Honestly this is too much of wasting time. You should learn about makefile and take this in the original sample application.
Thank you for your reply. I have read the content of Redme, but I cannot understand the good Makefile file.
My idea is that the tools used are EB Tresos, the DIAB compiler, the S32DS IDE,
The plugin for the Diab compiler is installed in the S32DS environment
C, oscfg.h, os_memmap. h, os_prop. h)
File in the S32DS project and MPC574XG_AUTOSAR_OS_4_0_92_rtm_1_0_3 in the AUTOSAR_OS source code,
create an S32DS project, with the DIab compiler compiler link generation can be downloaded to MPC5748G
development run AUTOSAR_OS sample routine.Feasible?
Theoretically, it's feasible. Just make sure that you have copied all the source code (OS codebase, OS generated files, linker/startup) and follow with all compiler/linking options which are defined in the sample. However we haven't tried it yet.
Thank you for your reply. I did not find the location of OS generated files. As for whether LINKER/STARTUP is the file as shown in the picture,
there is also a question about how to select the compiler link option in the example, could you please give me some guidance