How are convert GreenHills project to S32 project?

cancel
Showing results for 
Search instead for 
Did you mean: 

How are convert GreenHills project to S32 project?

868 Views
Contributor II

How are convert GreenHills project to S32 project?

I want convert project example for mac57d5.

0 Kudos
4 Replies

24 Views
Contributor I

Hello

Depending on amount of low level driver, the compiler migration is a matter of few weeks to several months. We've used S32D on a BSP for an off the shelf ECU running with a MPC5748G, and decided to go back with GHS. Despite of the price, the time lost due to GCC cost us more that a GHS license ( We are uising GHS for years ).

Now if you're really willing to go with GCC , here are the main steps:

1) Setup you make file : Goal is to get a linker file and a build script that works with minimal compiler options

2) Work on startup and run-time : Goal is to get your board booting and reach the main ( With MPU, PLL , other clock properly configured, this shall also takes care of memories init)

3) Port you C code, replace GHS pragma by GCC's ones.

Jérôme

0 Kudos

24 Views
NXP Employee
NXP Employee

Hello Anton,

Unfortunately, there is no automatic GHS -> GCC migration tool available.

If your existing GHS project has been created in S32DS then the migration is pretty straightforward whereas if it's MULTI .gpj project the migration is more complex especially when it comes to a multi-core project.

Anyway I'd recommend you to create a new GCC project in S32DS project and transfer all the source files to new S32DS GCC project(s). 

Migration of the C/C++ code should not be a big deal (except perhaps GHS specific pragmas).

e.g.

GHS:

#pragma ghs section rodata =".isrvectbl"

uint32_t const IntcIsrVectorTable[] = {

GCC:

const uint32_t __attribute__ ((section (".intc_vector_table"))) IntcIsrVectorTable[] = {

Linker script files are quite similar.

I attached two S32DS projects - one created for GHS and the other one GCC so you can compare the diffs.

If you have more specific question about the migration please let us know or share a snippet of your project.

Hope it helps.

Stan

24 Views
Contributor II

Hello Stanislav.

Tell me please. Why example projects are development on GreenHills? If there is S32 St.
S32 is less qualitative or other reason?

Regards,

Anton

0 Kudos

24 Views
NXP Employee
NXP Employee

Hello Anton,

Basically GHS tools could be considered as a premium tools whereas S32DS is free-of-charge product based on GCC compiler. So in case the compiler performance or safety certification is the project priority then GHS is currently probably a better option.

Second aspect is the application engineers who typically creates the examples are familiar with GHS Multi environment since it has been on the market many years. S32DS is on the market  ~ 2 years and it is maturing gradually version by version.

Stan

0 Kudos