S32DS project to compile with DIAB compiler AUTOSAR_OS installation package sample in the routine

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32DS project to compile with DIAB compiler AUTOSAR_OS installation package sample in the routine

2,111 Views
lubo_NEW
Contributor III

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

0 Kudos
15 Replies

2,036 Views
namnguyenviet
NXP Employee
NXP Employee

Hello,

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.

namnguyenviet_0-1614221313963.png

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

 

0 Kudos

2,032 Views
lubo_NEW
Contributor III

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

0 Kudos

2,095 Views
namnguyenviet
NXP Employee
NXP Employee

Hello,

Please see the readme.txt in sample/standard folder, which will guide you to compile the sample with DIAB compiler.

0 Kudos

2,025 Views
lubo_NEW
Contributor III

The prompt after the error is shown in the figure below3333.png

0 Kudos

2,012 Views
lubo_NEW
Contributor III

111111.png

 

0 Kudos

2,001 Views
namnguyenviet
NXP Employee
NXP Employee

Please add these below preprocessor:

APPTYPESH="<sample.h>"

OSCFGH="<sample1_cfg.h>"

OSPROPH="\"[your_os_folder]/sample/standard/sc1/output/obj/Os_prop.h\""

into list of preprocessor in the project, which can be found in Project >> Properties >> C/C++ Build >> Settings >> Preprocessor

namnguyenviet_0-1614234825534.png

And honestly, I highly recommend you to use the make procedure in sample application. This porting is like a pain in the neck.

0 Kudos

1,984 Views
lubo_NEW
Contributor III

6666.png7777.pngAdding paths and errors at compile time

0 Kudos

1,954 Views
namnguyenviet
NXP Employee
NXP Employee

What should I look for here? As I have said, please add 

APPTYPESH="<sample.h>"

OSCFGH="<sample1_cfg.h>"

OSPROPH="\"[your_os_folder]/sample/standard/sc1/output/obj/Os_prop.h\""

into preprocessor (-D defines)

0 Kudos

1,951 Views
lubo_NEW
Contributor III

Which is the correct format the first one or the second one
1,OSPROPH="\"D:\S32DS_Power\EBSC1OS_test\EBSC1OS_test_Z4_0/sample/standard/sc1/output/obj/Os_prop.h\""

2,OSPROPH="\"D:/S32DS_Power/EBSC1OS_test/EBSC1OS_test_Z4_0/sample/standard/sc1/output/obj/Os_prop.h\""

I tried no compile errorQQ图片20210226140003.pngQQ图片20210226141249.png

0 Kudos

1,945 Views
namnguyenviet
NXP Employee
NXP Employee

They should be added in -D (Defines) not Include path. Just try with two types of slash (either left "/" or right "\"). 

namnguyenviet_0-1614320675490.png

Honestly this is too much of wasting time. You should learn about makefile and take this in the original sample application.

 

0 Kudos

2,084 Views
lubo_NEW
Contributor III

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?

0 Kudos

2,073 Views
namnguyenviet
NXP Employee
NXP Employee

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.

0 Kudos

2,018 Views
lubo_NEW
Contributor III

But I put enableAllPeriph ();The.elf file can be generated by masking the function as shown in the figure3333.png

0 Kudos

2,068 Views
lubo_NEW
Contributor III
 

222.png

0 Kudos

2,069 Views
lubo_NEW
Contributor III

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

0 Kudos