AnsweredAssumed Answered

S32 Flash and debug two elf files

Question asked by Kfir Ben shimon on Jun 6, 2017
Latest reply on Jun 9, 2017 by Kfir Ben shimon

Hi,

 

I have 2 elfs that I try and flash and than debug on S32.

 

The flashing seems to work, and and debug even goes from startup to main.

 

BUT ...

 

When I look at the section to which I refer it seems messed up, and does not match either elf:

 

pegdbserver console:

Command Line :C:\Freescale\S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.3.3.201605241936\win32\pegdbserver_power_console -device=MPC5748G -startserver -singlesession -serverport=7224 -interface=USBMULTILINK -speed=5000 -resetdelay=300 -ˆ


CMD>RE


Initializing.
Target has been RESET and is active.
CMD>CM C:\Freescale\S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.3.3.201605241936\win32\gdi\P&E\freescale_mpc5748g_1x32x1524k_cflash.pcp


Initializing.
Initialized.


;version 1.01, 04/23/2015, Copyright P&E Microcomputer Systems, www.pemicro.com [5748G_6096k]


;device Freescale, MPC5748G, 1x32x1524k, desc=CFlash


;begin_cs device=$00F8C000, length=$005F4000, ram=$40000000


Loading programming algorithm ...


WARNING - Selected .PCP file has been modified. CRC16 = $6D58
Done.
CMD>EM


Erasing.
Module has been erased.
CMD>PM


Programming.
Processing Object File Data ...

Error during programming.
Error Programming flash of device

Error occured during Flash programming.

 

Starting reset script (C:\Freescale\S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.3.3.201605241936\win32\gdi\P&E\s32e200_mpc574xg.mac) ...

REM This script is compatible with MPC574xG devices.

REM Initialize all of the Main SRAM - 768KB

Initializing RAM from $40000000 to $400BFFFF.

 

Reset script (C:\Freescale\S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.3.3.201605241936\win32\gdi\P&E\s32e200_mpc574xg.mac) completed.

 

PE-ERROR: Error downloading to the device.
Preset breakpoint encountered.


Preset breakpoint encountered.


Preset breakpoint encountered.


Disconnected from "127.0.0.1" via 127.0.0.1
Target Disconnected.
Target Disconnected.

 

map file from both elf's with relevant section:

elf1:

*(.modulelist)
.modulelist 0x011cf004 0x20 ./src/ar.o
0x011cf004 module_list

elf2:

*(.modulelist)
.modulelist 0x011cf004 0x20 ./src/ar.o
0x011cf004 module_list

srecord data from relevant address:

elf1:

S319011CF0000000000201002FB00000000001002E16006600004C
S315011CF01401002FB80000000001002DB0006600009D

elf2:

S319011CF000000000020100836C0000000001008092006600006E
S315011CF01401008374000000000100802C00660000BE

and from reading the flash while in debug:

Outcomes