Debugging in MPLAB

19 views
Skip to first unread message

David VB

unread,
Feb 3, 2025, 8:33:07 AMFeb 3
to jallist
Hi all,

For a long time, I was able to debug my programs by using MPLAB SIM in MPLAB v.8.92, and loading the asm file produced by the jal compiler.

New, with newer PICs, this is no more possible, because they are not supported in MPLAB 8.92

It seems that MPLAB X (I'm currently vith 6.20) does not support the "old" asm format.   Or at least, I don't know how to do it.

==> Is there another way to simulate a asm program in any available tool
==> Or, is there a way to convert the old asm to the new format ?

About material debugging, I only have ICD2, PicKit3 and PicKit4, and since I'm only an hobbyist, I cannot afford to buy "professional" debuggers

Thanks for any answer,

David

Rob CJ

unread,
Feb 3, 2025, 12:40:15 PMFeb 3
to jal...@googlegroups.com
Hi David,

I did not know that they changed the asm format. Do you have any information on what they changed?

I have a tip for you since you have a PICKit3 (I am also a hobbyist and I even do not have a PICKit4 🙂) and that is that you download the PICkitminus software, it works very well with newer PICs (Evan won't like it when I write this ...) and your PICkit3..

Kind regards,

Rob


Van: jal...@googlegroups.com <jal...@googlegroups.com> namens David VB <pinhe...@gmail.com>
Verzonden: maandag 3 februari 2025 14:33
Aan: jallist <jal...@googlegroups.com>
Onderwerp: [jallist] Debugging in MPLAB
 
--
You received this message because you are subscribed to the Google Groups "jallist" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallist+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jallist/4e17d24b-87a1-4d20-99a6-068660345f9dn%40googlegroups.com.

David VB

unread,
Feb 4, 2025, 4:58:53 AMFeb 4
to jallist
Hi Rob,

Here's a full description of the changes between MPASM (the "old" assembler) and PIC Assembler (the "new" one).
As you will see, this is far from being simple.....

Kr,

David

David VB

unread,
Feb 4, 2025, 4:58:54 AMFeb 4
to jallist
Hi Rob,

Here's a full description of the changes between MPASM (the "old" assembler) and PIC Assembler (the "new" one).
As you will see, this is far from being simple.....

Kr,

David

Le lundi 3 février 2025 à 18:40:15 UTC+1, Rob CJ a écrit :

Rob CJ

unread,
Feb 4, 2025, 1:00:58 PMFeb 4
to jallist
Hi David,

Is there an attachment?

Kind regards,

Rob

Verzonden: dinsdag 4 februari 2025 10:58
Aan: jallist <jal...@googlegroups.com>
Onderwerp: Re: [jallist] Debugging in MPLAB
 

Rob CJ

unread,
Feb 4, 2025, 1:25:18 PMFeb 4
to jallist
Hi David,

I found the issue with the serial port. There is an error in the device file for ..... PPS. Apparently the error is created by Microchip (or the script is wrong but I will check that later) since several PPS values have  the value 0.

For PPS_TX this value should be 0x14.

If you change this:
pps_control_lock(FALSE)
RB6PPS = PPS_TX   -- TX re-assigned to B6
RXPPS  = PPS_RB7  -- B7 re-assigned to RX
pps_control_lock(TRUE)

Into this:
pps_control_lock(FALSE)
RB6PPS = 0x14     -- TX re-assigned to B6, fix for error in device file.
RXPPS  = PPS_RB7  -- B7 re-assigned to RX
pps_control_lock(TRUE)

It works.

Kind regards,

Rob


Van: jal...@googlegroups.com <jal...@googlegroups.com> namens Rob CJ <rob...@hotmail.com>
Verzonden: dinsdag 4 februari 2025 18:29

David VB

unread,
Feb 6, 2025, 5:53:40 AMFeb 6
to jallist
Oups....   Sorry.  Forgot to add the link.....

Here it is: https://onlinedocs.microchip.com/oxy/GUID-6EF91A11-1A5C-4C0A-8A18-67AD6D50B17B-en-US-2/index.html 

Rob CJ

unread,
Feb 6, 2025, 12:38:38 PMFeb 6
to jal...@googlegroups.com
Hi David,

Will have a look at it, thanks.

Did you try the fix for the serial port?

Kind regards,

Rob


Verzonden: donderdag 6 februari 2025 11:53

pinhe...@gmail.com

unread,
Feb 6, 2025, 12:43:09 PMFeb 6
to jallist
I had not much time today, but tomorrow, i will take another pic, and make experiments on a breadboard with minimal coding.
First without PPS, and then with PPS. 
I'll keep you informed.

Kr,

David

Télécharger BlueMail pour Android
You received this message because you are subscribed to a topic in the Google Groups "jallist" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jallist/56mm9KgMAbc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jallist+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jallist/AM7PR02MB6098D510D3C7B84DB3D3AAFDE6F62%40AM7PR02MB6098.eurprd02.prod.outlook.com.

rob...@hotmail.com

unread,
Feb 7, 2025, 6:56:46 AMFeb 7
to jallist
Hello David,

I investigated this further. The problem is caused by errors in the files that Microchip delivers with MPLABX. This only applies to the 16F1713 and 16F1716 so you where the unlucky one to use that PIC. I modified the Python script that generates all device file as to fix the issue. The device file is now correct and I will keep the fix in the script until Microchip has solved the issue. Next to that I reported the problem to Microchip (which is quite relevant since if you use MPLABX it will also not work for their chips) and they said they will pick it up.

Attached the corrected device files. I will add them to GitHub too so that are part of the upcoming Jallib release.

With the new device file you can remove the fix I had sent you earlier.

Kind regards,

Rob



Op donderdag 6 februari 2025 om 17:43:09 UTC schreef pinhe...@gmail.com:
16f1716.jal
16f1713.jal
Reply all
Reply to author
Forward
0 new messages