How to build S32K3xx AutoSAR example project?

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

How to build S32K3xx AutoSAR example project?

Jump to solution
623 Views
cranes
Contributor III

Hello,

I am trying to build an example project from SW32K3_S32M27x_RTD_4.4_4.0.0_P20_D2403.

From its readme.txt, the build method to run "make build" from the command line.

But there is video a few years ago which shows the way to use S32DS IDE to build AutoSAR example project for MPC574x MCU.

https://www.nxp.com/video/introduction-to-nxp-autosar-mcal-software:AUTOSAR-OnDemand-Training-Video

Is the way to use S32DS available for S32K3XX MCU?

Thanks!

Crane

 

0 Kudos
1 Solution
241 Views
cranes
Contributor III

Hello,

It is from an example project. An example project, including EB config, from NXP's RTD, not a project I created myself. 

Do you know who might know this? Or should I raise another question about this?

Thanks!

Crane

View solution in original post

0 Kudos
15 Replies
574 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I am bit confused here.

The video shows EB Tresos configuration tool and how to generate project files.

Those are later put into S32DS and compiled there.This is a common use case.

Is the way to use S32DS available for S32K3XX MCU?

I apologize, but I do not understand this question. Could you please specify it closer?

Best regards,

Peter

 

0 Kudos
564 Views
cranes
Contributor III

Hello Peter,

After 30 minutes of the video, it shows how to import an example project for MPC574x and build the project under S32DS. 

My question is, is there a way to use S32DS to import an example project for S32K3xx MCU and build it? It doesn't work using the same way shown in the video as the example projects have a different project structure.

In the readme.txt in the example project folder (C:\NXP\SW32K3_RTD_R21-11_3.0.0_P07\eclipse\plugins\Pwm_TS_T40D34M30I0R0\examples\EBT\S32K3XX\Pwm_example_S32K344, the file is attached), it shows how to build the project in Windows command prompt. (I tried but I couldn't make it work as it seems something is still missing). How can I import and build this project under S32DS as what's done in the video for MPC574 project?

Thanks!

Crane

0 Kudos
546 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

My question is, is there a way to use S32DS to import an example project for S32K3xx MCU and build it? It doesn't work using the same way shown in the video as the example projects have a different project structure.

I do not know if there is automatic import script in S32DS for tresos generated files.

But you can always do it by hand. Simply create black project in S32DS and move the C and H files to the project. This way you should be able to compile project.

In the past when there was no S32DS I was doing it this way with Windriver or GHS compilers.

Best regards,

Peter

0 Kudos
532 Views
cranes
Contributor III

Hello,

I tried the way you mentioned. I create an empty project in S32DS, then move the folder of include and src in the example project to the empty project. It doesn't work and I got the build log as attached.

Do you know who might know how to import the example project from the RTD for S32K3xx? What I am trying is an example project from the MCU's RTD package. There should be a guideline about how to build and test the example project. There is readme.txt in the example project folder, but unfortunately, it doesn't work to follow what's in it as described in my previous post.

Thanks!

Crane

0 Kudos
508 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Your log says you are missing header files.

Do you have those header file in your project?

petervlna_0-1716966137911.png

Best regards,

Peter

0 Kudos
493 Views
cranes
Contributor III

Hello,

Yes, I see that.

But the issue is, I searched through the folder of the example project and files generated by EB Tresos, there are no such files. They are the files from RTD. Obviously, the example project needs the header files from RTD.

Here is the file structure of an empty project created in S32DS. No RTD there, which is understandable.

cranes_3-1716995457010.png

It can be built and run. 

Here is the file structure of the example project with the files generated by EB Tresos. (include and src under generate are generated from EB Tresos.) There are no Mcl_Types.h and other header files that are needed.

cranes_1-1716994181267.png

Then my question is, how to include RTD in the project so that the missing header files can be found by the compiler?

Thanks!

Crane

0 Kudos
457 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

As in any other compiler, you simply add paths for your header locations in include options:

petervlna_0-1717053086753.png

Best regards,
Peter

 

0 Kudos
448 Views
cranes
Contributor III

Hello,

Yes, it removed the previous errors, but still miss things as in the attached log.

This project file structure is as below now:

cranes_0-1717084537357.png

The RTD folder is copied from the non-AutoSAR example project for the same module. It seems that there possibly should be something else inside for AutoSAR project. 

Thanks!

Crane

0 Kudos
417 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I still see the same issue. You do not have all header files in the project:

petervlna_0-1717138644216.png

Best regards,

Peter

0 Kudos
411 Views
cranes
Contributor III

Hello,

Yes, that's correct. But if we look at the errors occur from the beginning as first a few in the below screenshot, which come from the files generated by EB Tresos and RTD, they are not relevant to this file. And actually adding check_example.h indeed doesn't remove any of these errors. Attached is the new build log file.

cranes_0-1717163634610.png

At the end of the log file, there is "error: 'VV_RESULT_ADDRESS' undeclared". This macro 'VV_RESULT_ADDRESS' is in the Makefile in the example project folder. Do we need to add this file to the project generated in S32DS? If so, where to add? I already tried and it didn't work to add it in the project root folder as in the example project.

Obviously it doesn't work to just copy the folders of include and src from the example project to the newly generated project in S32DS. There are many things missing, not just check_example.h.

So, what is the correct way to build an example AutoSAR project from S32K3xx RTD? Just feel so weird that there is example projects in RTD but there are no guidelines about how to build the example project. What is missing here?

Thanks!

Crane 

 

0 Kudos
283 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I personally always used GHS for code generated from EB Tresos.

I will test it following days with S32DS and let you know if there are any special constraints.

Best regards,

Peter

0 Kudos
218 Views
cranes
Contributor III

Hi,

The issues is addressed and the project is built successfully by using command line.

Thanks!

Crane

0 Kudos
266 Views
cranes
Contributor III

 

Hello,

I found that the MCU model "S32K344" is not defined. This causes some symbols are not recognized.

cranes_0-1717533961639.png

But this is supposed to be defined in the code generated from EB Tresos, right? I couldn't find why it is not defined in the S32K344 example project.

Thanks!

Crane

0 Kudos
250 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I do not have knowledge on your EB config, nor generated code.

The package is defined in Resource plugin.

Best regards,

Peter

0 Kudos
242 Views
cranes
Contributor III

Hello,

It is from an example project. An example project, including EB config, from NXP's RTD, not a project I created myself. 

Do you know who might know this? Or should I raise another question about this?

Thanks!

Crane

0 Kudos