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?
已解决! 转到解答。
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
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\
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:
Hope it helps.
Jiri
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
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
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
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\
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:
Hope it helps.
Jiri
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