How to get the S32 Design Studio to write in MPC5748G flash?

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

How to get the S32 Design Studio to write in MPC5748G flash?

2,015 Views
CodeWriter
Contributor I

I have an application which I’m trying to debug for the first time using S32 Design
Studio on a new MPC5748G processor and the debugger fails to write into flash.  See below -

 

Connection
from "127.0.0.1" via 127.0.0.1

Copyright
2012 P&E Microcomputer Systems,Inc.

Command
Line
:E:\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=1000 -resetdelay=300 -?

 

 

CMD>RE

 

 

Initializing.

Target
has been RESET and is active.

CMD>CM
E:\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
(E:\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
(E:\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.

Interrupt
command received. Halting execution.

 

In Eclipse I have access to memory and some control over the processor which I halt.  Looking over post on this forum I’m speculating
it’s a Censorship/Flash Write enable issue.  Here is a memory dump of 0xFFFF_4000 (PASS_LCSTAT), etc. which looks like
there are bits needing to be set to zeros that I could to manually.

158326_158326.pngMemory Dump 0xFFFF000 8-11-2016.png

Is there a script I can run in powerpc-eabivle-gdb or a tool for JTAG which will set the

processor up for code development assuming it’s not bricked up?

 

Also what changes a processors Life Cycle status.  Is there any type of  timer/counter performing this processes in the core?

 

Any help on this matter would be appreciated.

 

Best regards,

Kent

Labels (1)
0 Kudos
4 Replies

931 Views
xiemeijuan
Contributor II

The same issues with you but finally I found the PE multilink universal emulator has problem. After use another emulator, the flashing is ok.

0 Kudos

931 Views
martin_kovar
NXP Employee
NXP Employee

Hi Kent,

GDB does not support manual flash programming.

About your question "Is there a script I can run in powerpc-eabivle-gdb or a tool for JTAG which will set the processor up for code development assuming it’s not bricked up?" I am not sure if I understand correct, but I do not know about any script.

Did you modify UTest flash? Are you able to read Flash memory? Could you please send me the dump of Utest flash?

Are you able to try different chip? This can tell us, if there is a problem with S32 Design Studio, or with the chip.

Regards,

Martin

0 Kudos

931 Views
CodeWriter
Contributor I

Hi Martin,

At the time I placed my original post, I ported a large application from another processor to the MPC5748G core and was observing errors when programming flash in the output log when going into the debugger.  I went to P&E Micro's website to find solutions to the debugger errors and found some pointers for when working with their USB Multilink FX.  So I tried compiling and debugging the standard starter application in the S32 Design Studio which worked in the MPC5748G core.  I was able to load code into flash and debug it in all three processors.  So I'm going to go back to the ported source code and break it into smaller portions and see at what point it will load or not load.

I avoided modifying UTest flash because there are parameters in the MPC5748G core that one has to be careful not to tweak. Here is a snap shot of the UTest flash memory.

UTEST.png

So at this point I can load compiled code into flash, but I'm trying to figure out why I'm having issues loading a larger application.

Thank you for your help.

Best regards,

Kent

0 Kudos

931 Views
CodeWriter
Contributor I

Found the answer to what changes a processors Life Cycle status.  The SSCM.

Best regards,

Kent

0 Kudos