s32k144 command line flash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

s32k144 command line flash

跳至解决方案
7,281 次查看
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 解答
5,963 次查看
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 项奖励
回复
5 回复数
5,962 次查看
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 项奖励
回复
5,963 次查看
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 项奖励
回复
5,963 次查看
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 项奖励
回复
5,964 次查看
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 项奖励
回复
5,963 次查看
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