You are not logged in.

1

Saturday, September 17th 2016, 4:07pm

Debugger doesn't stop at breakpoint. Maybe because PC has offset of 0x80000000 in the IDE

Hello,

the breakpoints are not broken but the Debugger with ICD3 or PickIt 3 doesn't stop at the programmed breakpoint.
I download the debug image with "Debug Main Project" and it seems that the target is running fine.
But also the debug functions like "Run to Curser" or "Focus Curser at PC" doesn't work.
Only "Set PC at Curser" works fine. Then I can use "Step Into" and I see all variables and Ports.
But with e.g. "Step Over" step mode is lost and the targed runs again.

Reason could be that the PC have an Offset of 0x80000000 in the IDE.

If I let stop the debugger with "Set PC at Curser" at a function call,
the "Execution Memory" Window shows 0x1d0279dc, but the PC value at the
Icon bar shows 0x9d0279dc.

Please see attached picture and Project PingPong_BSP from:
http://www.roundsolutions.biz/media/pdf/…ezip%20file.zip


I've tried to use asm("nop") and have set optimization level to 0, but it doesn't help.
I'm also not sure about the configuration Bits, I read them out and add them to the end of this text.

--> Has anyone an idea how I can make the breakpoints working?

I use :
RoundSolutions PingPong IoT Board
MPLAB X Version 3.35, Compiler XC32 Version 1.42, Harmony Version 1.05
Debugger: ICD 3
OS: Windows 10 Home
JAVA: Windows System says: Version 8 Update 102 (Build 1.8.0_102-b14)
But the "Aboutbox" of MPLAB X says:
Java: 1.8.0_91; Java HotSpot(TM) 64-Bit Server VM 25.91-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_91-b14
Licence: I think I use a evolution license, I downloaded it 4 weeks ago but haven't payed yet


// PIC32MZ2048ECM144 Configuration Bit Settings

// 'C' source line config statements

// DEVCFG3

// USERID = No Setting

#pragma config FMIIEN = OFF // Ethernet RMII/MII Enable (RMII Enabled)

#pragma config FETHIO = ON // Ethernet I/O Pin Select (Default Ethernet I/O)

#pragma config PGL1WAY = ON // Permission Group Lock One Way Configuration (Allow only one reconfiguration)

#pragma config PMDL1WAY = ON // Peripheral Module Disable Configuration (Allow only one reconfiguration)

#pragma config IOL1WAY = ON // Peripheral Pin Select Configuration (Allow only one reconfiguration)

#pragma config FUSBIDIO = OFF // USB USBID Selection (Controlled by Port Function)

// DEVCFG2

#pragma config FPLLIDIV = DIV_3 // System PLL Input Divider (3x Divider)

#pragma config FPLLRNG = RANGE_5_10_MHZ // System PLL Input Range (5-10 MHz Input)

#pragma config FPLLICLK = PLL_POSC // System PLL Input Clock Selection (POSC is input to the System PLL)

#pragma config FPLLMULT = MUL_50 // System PLL Multiplier (PLL Multiply by 50)

#pragma config FPLLODIV = DIV_2 // System PLL Output Clock Divider (2x Divider)

#pragma config UPLLFSEL = FREQ_24MHZ // USB PLL Input Frequency Selection (USB PLL input is 24 MHz)

#pragma config UPLLEN = ON // USB PLL Enable (USB PLL is enabled)

// DEVCFG1

#pragma config FNOSC = SPLL // Oscillator Selection Bits (System PLL)

#pragma config DMTINTV = WIN_127_128 // DMT Count Window Interval (Window/Interval value is 127/128 counter value)

#pragma config FSOSCEN = OFF // Secondary Oscillator Enable (Disable SOSC)

#pragma config IESO = OFF // Internal/External Switch Over (Disabled)

#pragma config POSCMOD = EC // Primary Oscillator Configuration (External clock mode)

#pragma config OSCIOFNC = OFF // CLKO Output Signal Active on the OSCO Pin (Disabled)

#pragma config FCKSM = CSECME // Clock Switching and Monitor Selection (Clock Switch Enabled, FSCM Enabled)

#pragma config WDTPS = PS1048576 // Watchdog Timer Postscaler (1:1048576)

#pragma config WDTSPGM = STOP // Watchdog Timer Stop During Flash Programming (WDT stops during Flash programming)

#pragma config WINDIS = NORMAL // Watchdog Timer Window Mode (Watchdog Timer is in non-Window mode)

#pragma config FWDTEN = OFF // Watchdog Timer Enable (WDT Disabled)

#pragma config FWDTWINSZ = WINSZ_25 // Watchdog Timer Window Size (Window size is 25%)

#pragma config DMTCNT = DMT31 // Deadman Timer Count Selection (2^31 (2147483648))

#pragma config FDMTEN = OFF // Deadman Timer Enable (Deadman Timer is disabled)

// DEVCFG0

#pragma config DEBUG = OFF // Background Debugger Enable (Debugger is disabled)

#pragma config JTAGEN = OFF // JTAG Enable (JTAG Disabled)

#pragma config ICESEL = ICS_PGx1 // ICE/ICD Comm Channel Select (Communicate on PGEC1/PGED1)

#pragma config TRCEN = ON // Trace Enable (Trace features in the CPU are enabled)

#pragma config BOOTISA = MIPS32 // Boot ISA Selection (Boot code and Exception code is MIPS32)

#pragma config FECCCON = OFF_UNLOCKED // Dynamic Flash ECC Configuration(ECC and Dynamic ECC are disabled (ECCCON bits are writable))

#pragma config FSLEEP = OFF // Flash Sleep Mode (Flash is powered down when the device is in Sleep mode)

#pragma config DBGPER = PG_ALL // Debug Mode CPU Access Permission (Allow CPU access to all permission regions)

#pragma config EJTAGBEN = NORMAL // EJTAG Boot (Normal EJTAG functionality)

// DEVCP0

#pragma config CP = OFF // Code Protect (Protection Disabled)

// SEQ0
Tom B has attached the following image:
  • Screenshot 2016-09-08 15.16.57.png

2

Monday, September 19th 2016, 11:15am

Hi Tom,

We have tried to replicate the issue and we didn't face a problem in the debugger. We think it might have to do with the firmware of the ICD3 or the settings inside MPLABX. We tried changing some to replicate it but it breakpoints still worked. Please post the issue in Microchip support Forum or create a ticket to get direct support from Microchip.

http://www.microchip.com/forums/
http://www.microchip.com/support/hottopics.aspx

Tom B

Unregistered

3

Wednesday, September 21st 2016, 8:25pm

:) Hello Mazen,

OK, but what do you think about the offset off the PC. Is it normal? You can see it at the attached picture.

I've raised a ticket at microchip already last week. But I didn't get an answer yet.

Which SW version should I use in the icd3?

Can it be a problem of the connection between icd3 and pingpong board? Or wouldn't work it at all?

Thank you for your support .

4

Saturday, September 24th 2016, 11:44am

Hello Mazen,

I have uploaded the debug map file. Can you please have a look at it and compare it to the map file which were generated in your project?
I'm not sure about the adresses which starts with 0x9...

Best Regards,
Tom
Tom_B has attached the following file:

Abdul_H

Unregistered

5

Tuesday, September 27th 2016, 11:30am

Hi Tom,

just curious if you have a linker script under the folder "Linker Files" in the MPLAB project. Can you check if you have "app_p32MZ.ld" there? If you do, please try once after removing it from the project.

Regards,
Abdul

Tom B

Unregistered

6

Tuesday, September 27th 2016, 8:59pm

Hello Abdul,

thank you for the hint!
I've tried it right now and indeed the map file contains some different and some new entries which let me hope that it could work now.


Ofcourse I had to change also:


Makefile-PingPong_ECM144.mk MP_LINKER_FILE_OPTION=
And:

configurations.xml <!-- <itemPath>../src/app_p32MZ.ld</itemPath> -->


The new map file is attached.
But for the final test with the targed device we have to wait for friday - currently I'm on a business trip and have no access to the HW.

May be you like to make a diff between the attached file and the one from my last posting.

And if you have some deeper knowlage about the difference - please share them with us!!

I'll keep you informed about my test on friday.

Best Regards,
Tom
Tom B has attached the following file:

7

Saturday, October 1st 2016, 9:33am

Hello Mazen,

Abdul was right! After taking out the "app_p32MZ.ld" the breakpoints are working fine.
The linker script was part of the original RoundSolution project and the manual
PCB-HEDGN-R1501-PS_Pingpong_Manual_26-05-2015_Rev_04.pdf does not high light that it can make trouble.
I think you should add this information there, because this problem have other developers too.
Or does it work with your project?

Best Regards,
Tom

8

Wednesday, October 12th 2016, 8:45am

Hello Tom,

Thank you for your feedback. The linker script is needed when you are using the bootloader to download a new compiled hex file. It is true that for debugging you shouldn't use it. It is mentioned in the USB Bootloader section in the manual but we will try to make it more clear.

Mazen

Rate this thread