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_22.214.171.124706282002/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:
In response to the load commands (in S32 Studio), the server (pegdbserver_power_console) runs the mpc5777m flash script a single time:
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.