S32K2XX Platform Integration 2019_07 Linker and CMM scripts

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

S32K2XX Platform Integration 2019_07 Linker and CMM scripts

1,722 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello team,

I have a couple questions with regards to the platform integration release for S32K2XX:

1) User manual for Lighting integration example says only RAM linkage is available

pastedImage_2.png

However when building the integration app it seems to link to FLASH by default, and actually building for RAM fails.

Since there is a boot_header, I guess the app was already tested in FLASH.

Could you clarify?

2) The package comes with a collection of CMM lauterbach script files:

[1] s32k2xx.cmm

[2] s32k2xx-hse.cmm

[3] s32k2xx-sbaf-cm7.cmm

[4] s32k2xx-sbaf-cm33.cmm

- User manual for Lighting example references [1] and [2] for devices without or with HSE correspondingly.

- User manual for Memory example references only [1].

- [3] and [4] are not mentioned in the documents.

Please let me know what is the correct script to use.

Best Regards!

Jorge Gonzalez

0 Kudos
4 Replies

1,655 Views
nxf45013
NXP Employee
NXP Employee

@Jorge,

1. The last application, delivered by us is not using an HSE-enabled device. Yes, the application is tested for Flash linkage. 
2. We shall update the user manual for each .cmm file, thank you for this comment. (As of right now, you can use s32k2xx.cmm). 

0 Kudos

1,655 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

@Vlad,

Thank you for the comments. I was able to test the application with a non-secure S32K2 device using the script s32k2xx.cmm as you suggested. However after disconnecting Lauterbach and resetting the board by either Power On reset or pin reset the MCU keeps resetting and application does not boot.

As I knew the delivered application should run standalone without Lauterbach. Can you confirm?

Thank you!

/Jorge Gonzalez

0 Kudos

1,655 Views
nxa07100
NXP Employee
NXP Employee

Hi Jorge,

The solution to your issue is a bit more complicated. You basically want to have an application that runs even if the debugger is not connected. Correct?

If yes you need two things:

1) Make sure that you have a chip that has the SBAF enabled from factory. If your chip does not have the sBAF than is virtually impossible to run the application without debugger because the core that is started by default is the M7-HSE and there is no-one telling the target Core (the M7 or M33) when to start and where is the start address for that core.

2) If the chip has the SBAF then the default boot_header there should indicate the start address and which core should be started. As far as I know the default core should be M33_core0. Now, if this is true, then in order to flash a new application for the M33_core0 you need to run s32k2xx-sbaf-cm33.cmm. This cmm will update the boot_header and will do an initial start of the M33_core.

If you build the application for M7 core, then you need to run s32k2xx-sbaf-cm7.cmm. 

Troubleshooting:

1)  After a initial flash for one core, when changing from one core to an other you need to remember for which core you previously did the flashing. The reason for this is that the T32 can only attach to a running core in order to flash the new application and there is no way (that I know off) to determine which core is currently running. Basically this is a trial and error phase. You need to change the System.CPU command from line ~40 so that you will attach to the proper core. So (for example) if the current code was flashed for M7 and you want to change it to M33, you need to update the s32k2xx-sbaf-cm33.cmm so that the T32 will initially attach to the running M7 core and you do this by changing line 39 from: SYStem.CPU S32K2-M33-0 to SYStem.CPU S32K2-M7. (Default value is M33-0 since its supposed that the boot_header is default configured to M33_0.

You need to do a similar activity, but on the s32k2xx-sbaf-cm7.cmm when you want to change from M33 to M7.

2) If no core was started (except M7-HSE) that you need to attach to HSE core in order to do a flashing operation.

This is done in a similar way as for either M33 and M7 core (as described above)  but you also need un-comment the HSE watchdog disable procedure from lines 72, 73 and 74.

Please let me know if you are running into any issues.... Just email me :smileyhappy:

BR,

Alin

0 Kudos

1,655 Views
nxf45013
NXP Employee
NXP Employee

Jorge, 

A colleague of mine will guide you through the process (it's a bit more complicated and was not documented, unfortunately). 

If you want to use the crypto-enabled application, there is some release on flexera. Also, you could do that by configuring crypto and cryptodal (which is already in the packet). Cryptodal configuration is present in the user manual.

Vlad

0 Kudos