How to download my code to the flash of MPC5744P with S32DS?

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

How to download my code to the flash of MPC5744P with S32DS?

1,718 Views
nathan_
Contributor IV

I want to down load my code to the flash of MPC5744P by usting S32DS,

Actually I want to make the MCU run the code auto when it is powered on, rather than download the code again.So I think

the code needs to be downloaded to the flash of the MCU.

 How to do that?

Thanks in advance.

0 Kudos
5 Replies

1,042 Views
jiri_kral
NXP Employee
NXP Employee

Hello, 

change your build target from _RAM to debug (or debug_FLASH)
pastedImage_1.png

Build your project and select debug configurations

pastedImage_2.png

Choose GDB PE Micro debug configuration 

pastedImage_3.png

After upload you can disconnect PE micro (or build in Open SDA debugger)  and reset/re-power your board. Your program will start from Flash memory. 

Jiri

0 Kudos

1,042 Views
nathan_
Contributor IV

Thank you. 

But I met another problem.

In my controller board, I tried to download the code to flash and re-power my board, but after I re-power, the MCU does not work.

When I download the same code to the flash of my demo board in the same way, the demo board will work after I re-power.

What is the problem? Is it a problem with something called boot mode?Or something else?

This bothers me a lot.

0 Kudos

1,042 Views
stanish
NXP Employee
NXP Employee

Hello

See this  for more info about howto program the board using S32DS: HOWTO: download separate elf/srec/hex file to microcontroller using S32 Design Studio 

* Please check if both your boards are using the same crystal/oscillator. If they differs same firmware may not run on both devices if external clock is used for PLL.

* Check the FAB pin on your custom (controller) board. It should be set to 0 in order to boot from internal memory.

pastedImage_3.png

If it does not help you can try to attach the debugger and pause running on the controller board to figure out where the execution "get lost". 

pastedImage_4.png

hope it helps.

 Stan

0 Kudos

1,042 Views
nathan_
Contributor IV

Thank you for your advice.

Is the FAB pin the A[4] pin of MPC5744P?

As is shown in the following picture:

FAB_PIN.png

0 Kudos

1,042 Views
stanish
NXP Employee
NXP Employee

Yes, this is correct.

0 Kudos