MBDToolbox_S32K1xx_4.1.0 PIL example running error

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

MBDToolbox_S32K1xx_4.1.0 PIL example running error

Jump to solution
1,373 Views
liuqimin
Contributor IV

Hello:

    I'm running a PIL example of mbdtoolbox_s32k1xx_4.1.0: (sim_pil_top_s32k1x.mdl) until RappID downloads without connecting to the MCU board.  Before using the old MBDToolbox_S32K1xx, MCU board power switch several times, may be connected to the MCU board, is there some development tools need to upgrade to adapt to the new version?

pastedImage_1.png

Best regards!

Liu qimin

1 Solution
1,067 Views
mariuslucianand
NXP Employee
NXP Employee

Hi liuqimin‌,

No, it should choose itself the right linker file but looks to be a issue there. For now this is a workaround. Use it like this (choosing the _bam.ld) for all the PIL models on which you deploy the code using the Serial way until we post a patch for that.

Best Regards,

Marius 

View solution in original post

0 Kudos
11 Replies
1,067 Views
wjandsq
Contributor IV

Download Code after Build

Baud Rate is 115200

0 Kudos
1,067 Views
mariuslucianand
NXP Employee
NXP Employee

Hello liuqimin‌,

In order to download the code using RappId Bootloader, you need to flash the bootloader on the MCU. You can find the right rbf file under \S32K\src\tools\BootLoader\RBF_Files.

If you are using the EVB you can download it via OpenSDA, just need to select this in the Config Block.

Hope this helps,

Marius

0 Kudos
1,067 Views
liuqimin
Contributor IV

Hi, Marius,

    RBF files have been downloaded to MCU using DS32, because MCU board does not have OpenSDA interface, only serial port can be used to download.Now the RappId Bootloader has never been able to connect to the MCU board.

  BRs!

 Liu qimin

0 Kudos
1,067 Views
mariuslucianand
NXP Employee
NXP Employee

Hello liuqimin‌,

The Bootloader uses the LPUART1 PC6 PC7 UART pins on S32K144. Please double check that :smileyhappy:.

Hope this helps,

Marius

0 Kudos
1,067 Views
liuqimin
Contributor IV

Hi,Marius,

    I could not find the reason for the error. I used MATLAB2017B, and MATLAB2018B to run the model all got the same error.MCU board serial pin is not wrong, because when using the old version (2018 R1), sometimes can be downloaded. RBF file writing error?Is there a way to check that the RBF file is correctly written?

    Below are the Settings for SIMULINK.

pastedImage_1.png

pastedImage_2.png

Computer side serial port Settings:

pastedImage_3.png

MCU board serial port pin:

pastedImage_4.png

Error Display

pastedImage_5.png

Attached is the model I used.

 Best regards!

 Liu qimin

0 Kudos
1,067 Views
mariuslucianand
NXP Employee
NXP Employee

Hello liuqimin‌,

Please try checking this Boot Restart Request checkbox. If not checked, Simulink will start sending the code immediately after the code was built and the processor is NOT in Bootloader. If the Simulink waits until you restart the board and press the OK button in a window that will appear, this will run the bootloader and Simulink will be able to program the board.

pastedImage_1.png

Hope this helps,

Marius

0 Kudos
1,067 Views
liuqimin
Contributor IV

Hi,Marius,

    Checking BAM will not solve the problem. See below.

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

       It's the same several times.

  Best regards!

  Liu qimin

0 Kudos
1,067 Views
mariuslucianand
NXP Employee
NXP Employee

Hello liuqimin‌,

Please try the following approach and please reply me if this worked.

Go to the Build Toolchain tab, uncheck the 'Default Target Memory Definitions' and select the User Defined Target Memory Definitions the one which ends up with _bam.ld like in the attached image.

pastedImage_1.png

Hope this helps,

Marius

0 Kudos
1,067 Views
liuqimin
Contributor IV

Hi,Marius,

    Now it's ready to run! Does PIL need to be set in this way?

pastedImage_1.png

  Best regards!

  Liu qimin

1,068 Views
mariuslucianand
NXP Employee
NXP Employee

Hi liuqimin‌,

No, it should choose itself the right linker file but looks to be a issue there. For now this is a workaround. Use it like this (choosing the _bam.ld) for all the PIL models on which you deploy the code using the Serial way until we post a patch for that.

Best Regards,

Marius 

0 Kudos
1,067 Views
mariuslucianand
NXP Employee
NXP Employee

Hello liuqimin‌,

We will investigate this and reply soon with new instructions.

Best Regards,

Marius

0 Kudos