Multlink FX flash programming problem

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

Multlink FX flash programming problem

2,596 Views
mauriciomendesn
Contributor II

Hi People,

As we flash more code into the MPC564xA processor memory, we are starting to get errors and can not successfully load the code into flash. Sometimes it's start to debug but can not be trusted. I updated the debug tool with the latest version.

Bellow I added my console log. Any hints, tips or tricks?

Connection from "127.0.0.1" via 127.0.0.1
Copyright 2012 P&E Microcomputer Systems,Inc.
Command Line :C:\Freescale\S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.3.3.201605241936\win32\pegdbserver_power_console -device=MPC5644A -startserver -singlesession -serverport=7224 -interface=USBMULTILINK -speed=5000 -port=USB1 -confi

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_mpc5644a_1x32x1024k.pcp

Initializing.
Initialized.

;version 1.08, 09/28/2012, Copyright P&E Microcomputer Systems, www.pemicro.com [5674f_5646a_4meg]
;device Freescale, MPC5644A, 1x32x1024k
;begin_cs device=$30000000, length=$00400000, ram=$00300000

Loading programming algorithm ...
Error loading .PCP file : C:\Freescale\S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.3.3.201605241936\win32\gdi\P&E\freescale_mpc5644a_1x32x1024k.pcp at address 003004A0
Error loading programming algorithm - load aborted.
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_mpc564xa.mac) ...
REM This script is compatible with MPC564xA devices.
REM Setup MMU for for Periph B Modules
REM Base address = $FFF0_0000
REM TLB0, 1 MByte Memory Space, Guarded, Don't Cache, All Access

Once Status Register Result = $0209
REM Set up MMU for Internal SRAM
REM Base address = $4000_0000
REM TLB3, 256 KByte Memory Space, Not Guarded, Don't Cache, All Access

Once Status Register Result = $0209
REM Set up MMU for Periph A Modules
REM Base address = $C3F0_0000
REM TLB4, 1 MByte Memory Space, Guarded, Don't Cache, All Access

Once Status Register Result = $0209
REM Set up MMU for External Memory
REM Base address = $2000_0000
REM TLB2, 16 MByte Memory Space, Not Guarded, Cachable, All Access

Once Status Register Result = $0209
REM Set up MMU to put internal Flash at 0...
REM Virtual address 0x0 -> Physical address = $0000_0000
REM TLB1, 16 MByte Memory Space, Not Guarded, Cachable, All Access

Once Status Register Result = $0209
REM Set up MMU for External Memory - SRAM
REM Base address = $3FC0_0000
REM TLB5, 4 MByte Memory Space, Not Guarded, Cachable, All Access

Once Status Register Result = $0209

REM Initialize all of the Main SRAM - 192KB
Initializing RAM from $40000000 to $4002FFFF.


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

PE-ERROR: Error downloading to the device.

Many Thanks,

Mauricio

Labels (1)
11 Replies

1,634 Views
mauriciomendesn
Contributor II

Sorry for the trouble Martin

In attachment the project.

Kindly Regards,

Mauricio

0 Kudos

1,634 Views
jiri_kral
NXP Employee
NXP Employee

Hi Mauricio, 

well - I'm not able reproduce your issue. I can normally debug your project without any errors or flash delays. 

It also may be related to PE Micro revision. Mine is PE Multilink Universal FX, Rev B. You are using old S32DS v1.1. In the new vesion S32DS Power v1.2 is lot of updates and I strongly recommended to update your S32DS. Here guide for project migrating from v1.1 to v1.2  https://community.nxp.com/docs/DOC-335361  

From my console output I can see that my PE  micro plugin is from 2017 (yours is from 2012). Here is output from my debug console.

Connection from "127.0.0.1" via 127.0.0.1
Copyright 2017 P&E Microcomputer Systems,Inc.
Command Line :C:\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.7.2.201709281658\win32\pegdbserver_power_console -device=MPC5644A -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=USBMULTILINK -speed=5000 -portÔ

CMD>RE

Initializing.
MPC564xA Device detected.
Target has been RESET and is active.
CMD>CM C:\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.7.2.201709281658\win32\gdi\P&E\nxp_mpc5644a_1x32x1024k.pcp

Initializing.
MPC564xA Device detected.
Initialized.

;version 1.09, 12/08/2016, Copyright P&E Microcomputer Systems, www.pemicro.com [5674f_5646a_4meg]

;device NXP, MPC5644A, 1x32x1024k

;begin_cs device=$30000000, length=$00400000, ram=$00300000

Loading programming algorithm ...

WARNING - Selected .PCP file has been modified. CRC16 = $FAF2
Done.
CMD>VC
Verifying object file CRC-16 to device ranges ...
block 00000000-00000007 ...
Calculated CRC-16 does not match block. (File = $063C, Device = $6820)

CMD>EM

Erasing.
Module has been erased.
CMD>PM

Programming.
Processing Object File Data ...


.
Programmed.
CMD>VC
Verifying object file CRC-16 to device ranges ...
block 00000000-00000007 ...
Ok.
block 00001000-00001119 ...
Ok.
block 00002000-000020F3 ...
Ok.
block 00003000-00011FA7 ...
Ok.
Checksum Verification Successful. (Cumulative CRC-16=$968D)

CMD>RE

Initializing.
MPC564xA Device detected.
Target has been RESET and is active.

Starting reset script (C:\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.7.2.201709281658\win32\gdi\P&E\s32e200_mpc564xa.mac) ...
REM This script is compatible with MPC564xA devices.
REM Clean GPRs to remove residual data after using algorithm
REM Setup MMU for for Periph B Modules
REM Base address = $FFF0_0000
REM TLB0, 1 MByte Memory Space, Guarded, Don't Cache, All Access
Once Status Register Result = $0209
REM Set up MMU for Internal SRAM
REM Base address = $4000_0000
REM TLB3, 256 KByte Memory Space, Not Guarded, Don't Cache, All Access
Once Status Register Result = $0209
REM Set up MMU for Periph A Modules
REM Base address = $C3F0_0000
REM TLB4, 1 MByte Memory Space, Guarded, Don't Cache, All Access
Once Status Register Result = $0209
REM Set up MMU for External Memory
REM Base address = $2000_0000
REM TLB2, 16 MByte Memory Space, Not Guarded, Cachable, All Access
Once Status Register Result = $0209
REM Set up MMU to put internal Flash at 0...
REM Virtual address 0x0 -> Physical address = $0000_0000
REM TLB1, 16 MByte Memory Space, Not Guarded, Cachable, All Access
Once Status Register Result = $0209
REM Set up MMU for External Memory - SRAM
REM Base address = $3FC0_0000
REM TLB5, 4 MByte Memory Space, Not Guarded, Cachable, All Access
Once Status Register Result = $0209
REM Initialize all of the Main SRAM - 192KB
Initializing RAM from $40000000 to $4002FFFF.

Reset script (C:\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.7.2.201709281658\win32\gdi\P&E\s32e200_mpc564xa.mac) completed.

MPC564xA Device detected.

1,634 Views
mauriciomendesn
Contributor II

Hello Jiri,

I did reply at forums.

Many Thanks,

Mauricio

0 Kudos

1,634 Views
mauriciomendesn
Contributor II

Hello Jiri, Thanks for your fast response and support.

I did update our S32 for 1.2 and update the pemicro. As you can see at log file i am using same version as yours.

I've tested a little bit more and i got new variables to think about.

Using SPC564A-DISP board and a changed device SPC5644AMLU20MT4X(4M Flash, 176LQFP) i could make it work with small code of flash(~5K) and a large code(~114K).

Using our custom board with the device SPC5644AMVZ10M14X(4M Flash, 324TEBGA) only works the small code. the large code won't work.

in attachment i added the log file of a failed programming. Is there any settings i should do in order to properly flash the device?

Kindly regards,

Mauricio Mendes

0 Kudos

1,634 Views
mauriciomendesn
Contributor II

Hello Martin, thanks for your fast answer.

I tried both S32DS versions, 1.1 and 1.2 version. I downloaded the latest version of PEMicro drivers on pemicro website.

It might be a eclipse plugin issue, i tried to re-install a couple of times. 

On 1.1 the debugger works, but as i increase the code size it will look like it is debugging but in fact show all errors as shown above and do not debug properly.

Any suggestion?

Kindly Regards,

Mauricio

0 Kudos

1,634 Views
martin_kovar
NXP Employee
NXP Employee

Hello Mauricio,

have you already installed Update1 into S32 Design Studio v1.2? It improves some features in PEMicro debugging interface.

Also could you please send me back s19 record? I would like to check it on my side. Which debug probe you use?

Regards,

Martin

1,634 Views
mauriciomendesn
Contributor II

Hello Mark, Thanks again.

Even better i attached a link to a simple project. Could you show me your debug log?

Teste.zip - Google Drive 

0 Kudos

1,634 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

I am not able to download your project. I tried default project from S32DS v1.2 with PEMicro Multilink FX debug probe and I am able to connect to the board.

Here is the log from GDB server:

Connection from "127.0.0.1" via 127.0.0.1
Copyright 2012 P&E Microcomputer Systems,Inc.
Command Line :C:\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.6.9.201706282002\win32\pegdbserver_power_console -device=MPC5644A -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=USBMULTILINK -speed=5000 -portØ
 
CMD>RE
 
Initializing.
MPC564xA Device detected.
Target has been RESET and is active.
CMD>CM C:\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.6.9.201706282002\win32\gdi\P&E\nxp_mpc5644a_1x32x1024k.pcp
 
Initializing.
MPC564xA Device detected.
Initialized.
 
;version 1.09, 12/08/2016, Copyright P&E Microcomputer Systems, www.pemicro.com [5674f_5646a_4meg]
 
;device NXP, MPC5644A, 1x32x1024k
 
;begin_cs device=$30000000, length=$00400000, ram=$00300000
 
Loading programming algorithm ...
 
WARNING - Selected .PCP file has been modified. CRC16 = $FAF2
Done.
CMD>VC
Verifying object file CRC-16 to device ranges ...
   block 00000000-00000007 ...
Calculated CRC-16 does not match block. (File = $063C, Device = $F8B7)
 
CMD>EM
 
Erasing.
Module has been erased.
CMD>PM
 
Programming.
Processing Object File Data ...
                                
                                
.
Programmed.
CMD>VC
Verifying object file CRC-16 to device ranges ...
   block 00000000-00000007 ...
Ok.
   block 00001000-000011E5 ...
Ok.
   block 00002000-000020F3 ...
Ok.
   block 00003000-00004497 ...
Ok.
   Checksum Verification Successful. (Cumulative CRC-16=$2C69)
 
CMD>RE
 
Initializing.
MPC564xA Device detected.
Target has been RESET and is active.
 
Starting reset script (C:\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.6.9.201706282002\win32\gdi\P&E\s32e200_mpc564xa.mac) ...  
REM This script is compatible with MPC564xA devices.                                                                                                                                                     
REM Clean GPRs to remove residual data after using algorithm                                                                                                                                             
REM Setup MMU for for Periph B Modules                                                                                                                                                                   
REM Base address = $FFF0_0000                                                                                                                                                                            
REM TLB0, 1 MByte Memory Space, Guarded, Don't Cache, All Access                                                                                                                                         
Once Status Register Result = $0209
REM Set up MMU for Internal SRAM                                                                                                                                                                         
REM Base address = $4000_0000                                                                                                                                                                            
REM TLB3, 256 KByte Memory Space, Not Guarded, Don't Cache, All Access                                                                                                                                   
Once Status Register Result = $0209
REM Set up MMU for Periph A Modules                                                                                                                                                                      
REM Base address = $C3F0_0000                                                                                                                                                                            
REM TLB4, 1 MByte Memory Space, Guarded, Don't Cache, All Access                                                                                                                                         
Once Status Register Result = $0209
REM Set up MMU for External Memory                                                                                                                                                                       
REM Base address = $2000_0000                                                                                                                                                                            
REM TLB2, 16 MByte Memory Space, Not Guarded, Cachable, All Access                                                                                                                                       
Once Status Register Result = $0209
REM Set up MMU to put internal Flash at 0...                                                                                                                                                             
REM Virtual address 0x0 -> Physical address = $0000_0000                                                                                                                                                 
REM TLB1, 16 MByte Memory Space, Not Guarded, Cachable, All Access                                                                                                                                       
Once Status Register Result = $0209
REM Set up MMU for External Memory - SRAM                                                                                                                                                                
REM Base address = $3FC0_0000                                                                                                                                                                            
REM TLB5, 4 MByte Memory Space, Not Guarded, Cachable, All Access                                                                                                                                        
Once Status Register Result = $0209
REM Initialize all of the Main SRAM - 192KB                                                                                                                                                              
Initializing RAM from $40000000 to $4002FFFF.
 
Reset script (C:\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.6.9.201706282002\win32\gdi\P&E\s32e200_mpc564xa.mac) completed.
 
MPC564xA Device detected.

Regards,

Martin

1,634 Views
mauriciomendesn
Contributor II

Hello Martin, its look like you could flash the device successfully and i am using a pretty old tool.

Could you compile this dummy code of code and try to flash or debug the device? because as i am increase the code size it stops to debug and flash the device correctly. 

main.c - Google Drive 

thank you Martin for all kindly support.

Mauricio

0 Kudos

1,634 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

could you please attach the whole project directly to the post using Advanced editor? I am not able to download the files from Google Drive.

Regards,

Martin

0 Kudos

1,634 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

which version of S32DS you use? Do you have already updated PEMicro drivers?

Regards,

Martin