• AVR Freaks

Helpful ReplyHot!MPLABX Debugger for PIC18F26K22 MCU

Author
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
2019/11/22 00:55:30 (permalink)
0

MPLABX Debugger for PIC18F26K22 MCU

Does it exist working MPLABX debugger ?

Could you tell me which version MPLAB X debugger has less bugs to debug PIC18F26K22 MCU ?
 
May be older version of MPLAB 8 more suitable for those controllers ?

Name it please.
 
MPLABX 5.30 completely useless for debugging PIC18F26K22 MCU.  Too many bugs in debugger :(
 
#1
ric
Super Member
  • Total Posts : 24540
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 01:07:37 (permalink)
+1 (1)
It's certainly not perfect, but it would help if you mentioned which problems in particular you are having.

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#2
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 01:53:11 (permalink)
0
When i trying to step through the code , debugger jumping between functions unpredictably. Ignoring breakpoints and everything it should consider. No sequence in code execution - it begins debugging process not from Main() function. Then it begins some cycle between code lines ignoring functions calls.

I tried quit MPLAB and restart it, recompile project and check project settings - useless
post edited by Kabak - 2019/11/22 02:40:52
#3
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 01:59:21 (permalink)
0
I/O pins view at PORT B works wrong. MCC Configurator loses pin assignments for MSSP2 module when project loaded after restart ( it does not matter How much times i saved whole project before quit )
post edited by Kabak - 2019/11/22 02:05:33
#4
ric
Super Member
  • Total Posts : 24540
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 01:59:25 (permalink)
+1 (1)
C or assembler?
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#5
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 02:03:19 (permalink)
0
C + inline ASM

#asm
.
.
.
#endasm
#6
ric
Super Member
  • Total Posts : 24540
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 02:12:54 (permalink)
0
Kabak
I/O pins view at PORT B works wrong.

What does this mean?
You haven't just left the pins in analog mode?
 

MCC Configurator loses pin assignments for MSSP2 module when project loaded after restart ( it does not matter How much times i saved whole project before quit )

I thought you were talking about the debugger, not MCC.

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#7
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 02:27:10 (permalink)
0

#8
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 02:55:13 (permalink)
0
may be you have some thoughts about:
MCC Configurator loses pin assignments for MSSP2 module when project loaded after restart ( it does not matter How much times i saved whole project before quit
 
Now it does not even show pins assignment for MSSP2 module after deleting it and adding MSSP2 again.
#9
Mysil
Super Member
  • Total Posts : 3464
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 03:20:56 (permalink) ☄ Helpfulby Jim Nickerson 2019/11/22 07:29:03
+3 (3)
Hi,
You shouldn't by chance be trying to debug in optimized code?
In XC8 version 2.x compilers, I have the impression that optimization level 1 is available also in Free mode.
Then experiences like described in message #3, would be expected.
 
Or do you have a license to use even higher optimization, maybe the time-limited license for trying out the compiler.
Then global optimization (Omniscent code generation) will be free to bypass function calls.
 
In 'Project Properties'  'XC8 Compiler'  'Option Categories:'  'Optimizations' 
you may see what optimizations is currently used.
Change it to '0' and recompile to make code that is more easy to debug.
 
Regards,
    Mysil 
#10
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 04:21:34 (permalink)
0
Thank you, Mysil
 
I forgot to switch to Free mode optimization and set Debug - "Favor accurate debug over optimization."
 
The problem with debugger hopping through code disappeared.
 

But the problems with MCC pins assignment and I/O Viewer not gone
 
I need to use both MSSP blocks at the same time.  MSSP2 assign to work with SRAM.   MPLAB 5.30 does not save this setting into project when i exit. MPLAB delete MSSP2 from project. When i loaded project  SRAM is assign to MSSP1 block and MSSP2 block not included. MSSP2 pins free to use.
#11
NKurzman
A Guy on the Net
  • Total Posts : 18027
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 07:25:18 (permalink)
+1 (1)
Your issues with MCC are not part of MPLabX. It is a separate product, With its own separate forum.
#12
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 12:35:17 (permalink)
0
Thanks for advice.

My quistion about I/O viewer in correct place ?
#13
NKurzman
A Guy on the Net
  • Total Posts : 18027
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/22 12:55:56 (permalink)
0
If  I/O Veiw does not work, Try Target Memory Views -> Peripherals then filer for the I/O.  see if that works.  Or you can enter the Registers in the watch Window.
#14
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/25 02:27:10 (permalink)
0
Yes, Thank you.
 
But the value written into PORTB wrong at all places,  not only in I/O Veiw.
LATB - correct = 0x3C
PORTB - wrong = 0x1C
 
Problem with bit 5.  I do not use 6,7 bits.  Only 0 - 5.


#15
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/25 02:38:25 (permalink)
+1 (1)
BUG : File Registers are not updating on the fly.  I should scroll File Registers addresses out of scope, and when i scroll it back, changed address became written in red and contains changed value as expected.
post edited by Kabak - 2019/11/25 02:44:40
#16
JPortici
Super Member
  • Total Posts : 833
  • Reward points : 0
  • Joined: 2012/11/17 06:27:45
  • Location: Grappaland
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/25 03:55:23 (permalink)
0
Discrepancies between LAT and PORT may be due to wrong TRIS and ANSEL setting, or because a peripheral has taken control of the Pin. If optimizations are enabled the debugger will jump over lines that are optimized in such a way that the assembly flow doesn't match the source code flow anymore. You'd have a better view by following the DISASSEMBLY view
 
Mysil
Hi,
You shouldn't by chance be trying to debug in optimized code?
In XC8 version 2.x compilers, I have the impression that optimization level 1 is available also in Free mode.

 
Level 1 in free mode has been available since long time.
Recent versions of XC8 (>2.05? i don't remember) also have Level 2 available.
 
 
#17
Kabak
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2014/07/30 03:47:55
  • Location: 0
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/25 04:54:01 (permalink)
0

 
I am working in the simulator.
 
Project compiled : Free Level + Debug option  = No optimization.
 
Pins and settings on the screenshot
#18
Mysil
Super Member
  • Total Posts : 3464
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: MPLABX Debugger for PIC18F26K22 MCU 2019/11/25 09:00:54 (permalink)
0
Hi,
So you are debugging the Simulator, not PIC18F26K22 MCU, why didn't you tell that first thing?
Try hardware, to see whether problem is in simulator, in debugger, or in your code.
 
    Mysil
#19
Jump to:
© 2019 APG vNext Commercial Version 4.5