PDA

View Full Version : Debug and some 18F pics



sinoteq
- 20th June 2007, 11:50
I found out the hard way today that Debug is a popular word. As we all know there is a DEBUG command in PBP, we can say it is a simple version of SEROUT. So what? The thing is that Debug does not work anymore with some 18F devices because Microchip is also using the word DEBUG in their .INC files. Brilliant!!! When trying to compile with these chips you will get a warning "Duplicate label yaka yaka yaka in PBPPIC18.LIB" Look in P18F4620 and you will see this:
;================================================= ========
;
; Register Definitions
;
;================================================= ========

;----- Register Files -----------------------------------------------------

DEBUG EQU H'0FD4'


The fix for this would be to change the DEBUG command to DEBUGOUT, this would also make more sense because DEBUGIN already exists, so does PULSOUT, SEROUT and so on so forth. Or edit the Microchip .INC files everythime they release a new MPLAB.

Now you know and that is alot more than I knew this morning

skimask
- 20th June 2007, 17:32
I found out the hard way today that Debug is a popular word. As we all know there is a DEBUG command in PBP, we can say it is a simple version of SEROUT. So what? The thing is that Debug does not work anymore with some 18F devices because Microchip is also using the word DEBUG in their .INC files. Brilliant!!! When trying to compile with these chips you will get a warning "Duplicate label yaka yaka yaka in PBPPIC18.LIB" Look in P18F4620 and you will see this:
;================================================= ========
;
; Register Definitions
;
;================================================= ========
;----- Register Files -----------------------------------------------------
DEBUG EQU H'0FD4'
The fix for this would be to change the DEBUG command to DEBUGOUT, this would also make more sense because DEBUGIN already exists, so does PULSOUT, SEROUT and so on so forth. Or edit the Microchip .INC files everythime they release a new MPLAB.
Now you know and that is alot more than I knew this morning

That's wierd...I've been using MCS v3, MPLAB 7.61, PBP 2.46a (patched), programming an 18F4620...I don't have any issues...
Wonder what's going on here...more after I get home and can check it out...

mister_e
- 20th June 2007, 17:37
Depending if you're using ANY ICD, i feel you could just comment that line and forget about it.

It's working here so far.

EDIT: i knew it reminded me something... Bellow a blast from the past...almost 3 years ago
http://www.picbasic.co.uk/forum/showthread.php?t=990

sinoteq
- 21st June 2007, 14:56
Yes that is exactly what will happen. I edit the file now and forget about it and when I upgrade MPLAB next time it is trouble again. I have a good but short memory when it comes to these things.

Any other ideas how to fix it? Sure I must edit the file anyway when I upgrade because I always write the Config settings in the code and that also gives warnings unless you fiddle with the files. But the less things I have to edit the better.

mister_e
- 21st June 2007, 15:10
mmm... unfortunately ASM #UNDEFINE won't work...

I'm not sure there's a way to bypass it unless MicroChip or Melabs change something...