s32k144 command line flash

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

s32k144 command line flash

Jump to solution
7,435 Views
ainwood
Contributor I

Hello,

I'm currently using the S32 Design Studio to flash the S32K144 evaluation board, but for our automated build and testing framework I need a means of flashing the board through command line.

I figured I could do this simply by copying our generated .elf file to the USB device, since the board supports OpenSDA, but I haven't been able to get feature of OpenSDA to work (I have tried on both Mac and Linux).

What are my options for command line flashing of the board?

1 Solution
6,117 Views
jiri_kral
NXP Employee
NXP Employee

Hi Andrew, 

you can use PE micro debug server and client directly. pegdbserver_console.exe is located in 

[YOUR_S32DS_INSTALL_PATH]\S32DS_ARM_v2018.R1/eclipse/plugins/com.pemicro.debug.gdbjtag.pne_3.6.5.201808141630/win32

pastedImage_2.png

and use gdb client arm-none-eabi-gdb.exe located in 

[YOUR_S32DS_INSTALL_PATH]\S32DS_ARM_v2018.R1\Cross_Tools\gcc-arm-none-eabi-4_9\bin\

pastedImage_3.png

You can add your commands into file - in my case my_commands.txt which contains (attached for reference): 

target remote localhost:7224
load c:/nxp/hello_world_s32k144.elf

This flashes hello_world_s32k144.elf into board. You can find more gdb client commands with help command:

pastedImage_4.png

Hope it helps. 

Jiri 

View solution in original post

0 Kudos
Reply
5 Replies
6,116 Views
raghavendra_sai
Contributor I

How can i select the option "preserve partitioning of the device" , i am trying to flash s32k144 board using command line.Capture.PNG if 

0 Kudos
Reply
6,117 Views
mikedoidge
NXP Employee
NXP Employee

Hi ainwood‌,

The OpenSDA works with s-record files only, it will not work with ELF. Check out this guide https://community.nxp.com/docs/DOC-340965 to see how to generate an s-record file from your project.

Hope it helps,

Mike

0 Kudos
Reply
6,117 Views
ainwood
Contributor I

Hi Mike,

Unfortunately I have tried s-records without success already. My method is to use objcopy directly to generate the srec from elf (I need command line build/deploy), start the board in BOOTLOADER mode, copy the file over, and then restart the board. I always find that the new code doesn't "stick", and when I reboot I'm left with the previous code.

Are there steps I'm missing?

Andrew

0 Kudos
Reply
6,118 Views
jiri_kral
NXP Employee
NXP Employee

Hi Andrew, 

you can use PE micro debug server and client directly. pegdbserver_console.exe is located in 

[YOUR_S32DS_INSTALL_PATH]\S32DS_ARM_v2018.R1/eclipse/plugins/com.pemicro.debug.gdbjtag.pne_3.6.5.201808141630/win32

pastedImage_2.png

and use gdb client arm-none-eabi-gdb.exe located in 

[YOUR_S32DS_INSTALL_PATH]\S32DS_ARM_v2018.R1\Cross_Tools\gcc-arm-none-eabi-4_9\bin\

pastedImage_3.png

You can add your commands into file - in my case my_commands.txt which contains (attached for reference): 

target remote localhost:7224
load c:/nxp/hello_world_s32k144.elf

This flashes hello_world_s32k144.elf into board. You can find more gdb client commands with help command:

pastedImage_4.png

Hope it helps. 

Jiri 

0 Kudos
Reply
6,117 Views
BlackNight
NXP Employee
NXP Employee

In addition to that, there is an article on that subject available here:

Command Line Programming and Debugging with GDB | MCU on Eclipse 

I hope this helps,

Erich