Failed to debug MPC5748G at 98% for S32DS v1.2

cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to debug MPC5748G at 98% for S32DS v1.2

Jump to solution
2,394 Views
fortunely
Contributor III

I've tested the problem on 6 different PCs several times and I find that I can not download my code to MPC5748G using S32DS v1.2 when I am going to debug , but I can do it using S32DS v1.1. Even every time it stops at 98%.

The error log prompts

Loading programming algorithm ...

Error loading programming algorithm - load aborted.

Error occured during Flash programming.

I don't know why ? How can I solve the problem? 

Details:

1) Test condition

MCU
MPC5748G
evb
DEVKIT-MPC5748G
IDE
S32DS for Power v1.2 with atest patches (S32DS Power v1.2 UP2 AMMCLIB);

S32DS for Power v1.1
debuggeropensda on evb
Operating System
Win7x64, Win10x64

 

2) Test case

IDE's demo: Hello, Hello_World+PLL+Interrupt, ADC, rtc_alarm_mpc5748g, freertos_mpc5748g

 

3) Test Result

v1.1: all OK;

v1.2: every time it stops at 98%, then error message appears; But it success to debug if I use RAM mode instead of FLASH mode;

The following is screenshot:

figure1 s32ds version.png

figure1 s32ds error message.png

error log

Connection from "127.0.0.1" via 127.0.0.1
Copyright 2012 P&E Microcomputer Systems,Inc.
Command Line :"E:\Program Files (x86)\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.6.9.201706282002\win32\pegdbserver_power_console" -device=MPC5748G -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=OPENSDA T
CMD>RE
Initializing.
MPC574xC Device detected.
Target has been RESET and is active.
CMD>CM E:\Program Files (x86)\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.6.9.201706282002\win32\gdi\P&E\nxp_mpc5748g_1x32x1520k_cflash.pcp
Initializing.
MPC574xC Device detected.
Initialized.
;version 1.05, 06/26/2017, Copyright P&E Microcomputer Systems, www.pemicro.com [5748G_6080k]
;device NXP, MPC5748G, 1x32x1520k, desc=CFlash
;begin_cs device=$00F90000, length=$005F0000, ram=$40000000

Loading programming algorithm ...
Error loading programming algorithm - load aborted.
Error occured during Flash programming.

Starting reset script (E:\Program Files (x86)\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.6.9.201706282002\win32\gdi\P&E\s32e200_mpc574xg.mac) ... 
REM This script is compatible with MPC574xG devices.                                                                                                                                                    
REM Clean GPRs to remove residual data after using algorithm                                                                                                                                            
REM Initialize all of the Main SRAM - 768KB                                                                                                                                                             
Initializing RAM from $40000000 to $400BFFFF.
REM Core 0 I-MEM 16K                                                                                                                                                                                    
Initializing RAM from $50000000 to $50003FFF.
REM Core 0 D-MEM 64K                                                                                                                                                                                    
Initializing RAM from $50800000 to $5080FFFF.
REM Core 1 I-MEM 16K                                                                                                                                                                                    
Initializing RAM from $51000000 to $51003FFF.
REM Core 1 D-MEM 64K                                                                                                                                                                                    
Initializing RAM from $51800000 to $5180FFFF.
REM Core 2 I-MEM 16K                                                                                                                                                                                    
Initializing RAM from $52000000 to $52003FFF.
REM Core 2 D-MEM 32K                                                                                                                                                                                    
Initializing RAM from $52800000 to $52807FFF.
REM overlay memory 16K                                                                                                                                                                                  
Initializing RAM from $0D000000 to $0D003FFF.
REM Overlay SRAM Emulation device only                                                                                                                                                                  
Initializing RAM from $0C000000 to $0C0FFFFF.

Reset script (E:\Program Files (x86)\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.6.9.201706282002\win32\gdi\P&E\s32e200_mpc574xg.mac) completed.
MPC574xG Device detected.
Labels (1)
1 Solution
611 Views
hoatathi
NXP Employee
NXP Employee

Hi Martin,

This issue maybe related to firmware of board DEVKIT-MPC5748G when using OpenSDA connection to debug, It is not compatible with new version of P&E plugin.

You could update new firmware for DEVKIT-MPC5748G by using DEBUG-OPENSDA-E200_Pemicro_v110.SDA file
(download OpenSDA Firmware (MSD & Debug). Updated June 28th, 2017. at link "http://www.pemicro.com/opensda/".)

You could try this way to solve your problem.

Regards

Hoa

View solution in original post

14 Replies
611 Views
stanish
NXP Employee
NXP Employee

Hi Martin,

Unfortunately I  cannot  reproduce this issue using DevKit MPC5748G + OpenSDA + S32DS Power v1.2.

Could you try to create a bare board empty project in S32DS Power v1.2 for MPC5748G and try to program it?

You can also experiment with Target Communication Speed:

pastedImage_1.png

Stan

0 Kudos
611 Views
fortunely
Contributor III

Hi Stanislav,

Sorry, I still get the same error result.

下载错误_empty.png

I create an empty project (Helloworld) without any example or SDK for MPC5748G , using only first core + S32DS Power v1.2 .

Then I find something different with your debug configurations when I debug. That is , I can not change my Target Communication Speed and my debug configuration's name doesn't contain the word FLASH PEmicro but yours does (item Debug Shif Freq(KHz) is always 5000 with gray color, and it can't be changed ).

Does it matter ? I do not know why I can debug using the next debug configuration "helloworld_Z4_0_Debug_RAM".

下载配置.png

appendix

The figure is my S32DS for power version :

s32ds powerpc version.png

The figure is my S32DS 's install details:

s32ds powerpc install details.png

0 Kudos
611 Views
timwang
Contributor II

Hi,Martin:

I have the same problem as you ,can you tell me how to update the firmware? My system is win8

0 Kudos
611 Views
fortunely
Contributor III

Hi, Tim Wang

You can do the steps:

 

1. Download OpenSDA Firmware (MSD & Debug) at link http://www.pemicro.com/opensda

Firmware Apps (.zip file).

Latest MSD & Debug applications. Updated June 28th, 2017.

 

2. You can find the update steps in file OpenSDA Firmware Update Instructions.pdf file.

 

3. Extract the DEBUG-OPENSDA-E200_Pemicro_v110.SDA file from the zip file.

 

4. Keep pressing the button SW3 (not SW1) , and connect the  DEVKIT-MPC5748G to the your PC using OPENSDA by USB cable.

 

5. You'll find a new BOOTLOADER driver on your PC, then copy the SDA file to the driver .

6. reset the DEVKIT-MPC5748G .

 

 

0 Kudos
611 Views
naderkhamess
Contributor III

Hi Martin,

Firstly I would like to thank you for your info. 

Secondly, I followed your instructions but after copying the file into the bootloader driver and I reconnect the uC again through usb, I can't find again the "DEBUG-OPENSDA-E200_Pemicro_v110.SDA" file in the bootloader driver.

as well as the debugging still stuck on 98%. You wrote reset the DEVKIT-MPC5748G, you meant disconnect it and connect it right? 

thanks.

0 Kudos
611 Views
fortunely
Contributor III

Hi Nader Khamess,

What IDE and OS version  you use? Your IDE is S32DS for Power v1.2?

Could see the following disk driver icon like figure1, after finishing step4?

Figure1 Bootloader disk driver icon

evb_bootloader_driver.png

I also can not see anything about the file "DEBUG-OPENSDA-E200_Pemicro_v110.SDA" in the disk driver, when you update the firmware successfully(figure2 ).

Figure2 Files in the bootloader driver of DEVKIT-MPC5748G 

evb_bootloader_driver_files.png

I think the way of reset the DEVKIT-MPC5748G is not very important(figure3), and you can try both. The target of reset is to ensure the OpenSDA MCU loads the newest firmware.

Figure3 OpenSDA Firmware Update Steps

evb_update_firmware.png

0 Kudos
611 Views
naderkhamess
Contributor III

Hi Martin Zhang,

Thank you so much for your fast reply :smileyhappy:.

My os is windows 10 and i was using S32DS power 2017.R1 until today, then after reading your message i tried to install S32DS v1.2 and the result is identical with both.

From the screenshot I guess the update is already installed! Even though i still get the results!

I even tried to debug another codes that already exists "project codes from example" and also stuck at 98%.

4.png

0 Kudos
611 Views
fortunely
Contributor III

Hope the following reply will help you solve your problem.

Your MCU may be locked. Pls try to erase all the flash of the MCU mpc5748g.

Originally I am not sure about your problem. One of my friends meets the same problem with you. Although he uses devkit-mpc5744p, his debug progress is stuck in 98%. Finally

I find out that the mcu had been locked since he pulled out when debugging. Especially, he can debug in debug_RAM mode, but fail to debug in debug_flash mode.

Then I use cyclone universal read all flash memory data and write back the data into the memory. Now the mcu works out well.

0 Kudos
611 Views
timwang
Contributor II

Hi,Martin:

Thank you very much! I have solve this problem according to your guidance!

0 Kudos
612 Views
hoatathi
NXP Employee
NXP Employee

Hi Martin,

This issue maybe related to firmware of board DEVKIT-MPC5748G when using OpenSDA connection to debug, It is not compatible with new version of P&E plugin.

You could update new firmware for DEVKIT-MPC5748G by using DEBUG-OPENSDA-E200_Pemicro_v110.SDA file
(download OpenSDA Firmware (MSD & Debug). Updated June 28th, 2017. at link "http://www.pemicro.com/opensda/".)

You could try this way to solve your problem.

Regards

Hoa

View solution in original post

611 Views
sampathkumar
Contributor I

Hello

I am also encountering the same problem,

The Firmware detail is showing as

Your Hardware Information
MicroBoot Kernel Version is: 1.09
Bootloader Version is: 1.13
Installed Application: PEMicro PowerPC Debug App
Application Version is: 1.09
DUID is: 4CC33938-AC9281E1-375EC818-B9CCE678
EUID is: 4661A239-42B8876B-185DAA0B-93D568D6
TUID is: 74823938-47328196-37239802-92389832
TOA is: 86B6E505-47328196-37239802-358EFD70
TOA2 is: 86B6E505-47328196-37239802-57B2A182
SUID is: 86B6E505-47328196-37239808-8003EC65

But still I am facing the same issue

S32_Issue.png

Please Advice me, how to resolve this issue

Thank you in Advance

Gobi Durairaj

0 Kudos
611 Views
fortunely
Contributor III

Hi, sampath kumar,

Please try:

1. Update OpenSDA fireware for DEVKIT-MPC5748G by using DEBUG-OPENSDA-E200_Pemicro_v110.SDA file
(download OpenSDA Firmware (MSD & Debug) at link http://www.pemicro.com/opensda/ ).

2. Your S32DS for PowerPC v1.2 has installed the newest patches, especially Pemicro e200 debugging support plugin. You also can refer to the answser here: https://community.nxp.com/message/894488?commentID=894488#comment-894488).

0 Kudos
611 Views
fortunely
Contributor III

Hi, Hoa Ta Thi

Yes, you're right. I've solved the problem by updating the firmware. Thanks.

0 Kudos
611 Views
ludwigschreier
Contributor IV

Hello,

same problem over here since beginning of new S32DS release v1.2, but it seems that the firmware update fixed the problem. Thanks for sharing this information. Stability needs to be confirmed, but I assume it works now.

Regards

0 Kudos