Loading executables into different mpc5777m cores with gdb in a terminal

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

Loading executables into different mpc5777m cores with gdb in a terminal

417 Views
nicholaswernick
Contributor I

I want to use pegdbserver_power_console and powerpc-eabivle-gdb to load the executable code from a terminal without involving S32 Studio. My strategy for this is to look at the GDB terminal commands that S32 Studio runs when I click the bug button, and then make a script to run those commands from a bash terminal. This strategy is failing.

First I will present what I see S32 Studio doing when I click the bug, then I will explain what happens differently when I run the same commands in a terminal.

When I click on the bug in S32 studio, S32 studio runs the GDB server, which connects to the mpc5777m processor via the PE Multilink Universal with this command:

/home/nwernicke/NXP/S32DS_Power_v1.2/eclipse/plugins/com.pemicro.debug.gdbjtag.ppc_1.6.9.201706282002/lin/pegdbserver_power_console -device=MPC5777M -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=USBMULTILINK -speed=5000 -port= -configfile=/home/nwernicke/workspaceS32DS/.metadata/.plugins/com.pemicro.debug.gdbjtag.ppc/config.ini


Then it runs the client, which connects to the server with this command:

/home/nwernicke/NXP/S32DS_Power_v1.2/eclipse/../Cross_Tools/powerpc-eabivle-4_9/bin/powerpc-eabivle-gdb --interpreter=mi2 --nx --command=/home/nwernicke/load_test_runner.txt

I am running an mpc5777m processor, and there are 3 binaries that get loaded onto it to run in 3 of the powerpc cores. The client (powerpc-eabivle-gdb) tells the server (pegdbserver_power_console) to load three files with the following console commands:

load /home/nwernicke/mpc5777m_test_runner/mpc5777m_test_runner_Z4_2/../build_z7_0/debug/src/mpc5777m_test_runner_z7_0
load /home/nwernicke/mpc5777m_test_runner/mpc5777m_test_runner_Z4_2/../build_z7_1/debug/src/mpc5777m_test_runner_z7_1
load /home/nwernicke/mpc5777m_test_runner/build_z4_2/debug/src/mpc5777m_test_runner_z4_2

In response to the load commands (in S32 Studio), the server (pegdbserver_power_console) runs the mpc5777m flash script a single time:

CM /home/nwernicke/NXP/S32DS_Power_v1.2/eclipse/plugins/com.pemicro.debug.gdbjtag.ppc_1.6.9.201706282002/lin/gdi/P&E/nxp_mpc5777m_1x32x1984k_cflash.pcp

The flash load script consists of a reset, ram initialize, memory erase, flash load, and reset cycle. In S32 studio, this runs only once, and then the 3 processor cores are loaded with the 3 programs and everything is great. If I could get the production techs to use S32 design studio to load code into our boards, there would be no issue, but we need to run this with a really simple script that is a 1-click type-thing.

Here is my problem:

When I use a bash terminal to run the same commands as shown above to load the 3 executables, the "load" commands each cause the server (pegdbserver_power_console) to run the mpc5777m flash script, which includes a full flash erase. Each new executable that gets loaded erases the executable that was loaded before it. I suspect there may be a monitor command from the client (powerpc-eabivle-gdb) that can tell pegdbserver_power_console to wait for more files before running the flash script, but that command is not echoed to the S32 studio console.

Or it could be something else.

0 Kudos
0 Replies