Ooops!!!!
how stupid of me...of course E is 14 decimal and you are correct!
So the code is assembling at the correct location....hmmm
Joe
Ooops!!!!
how stupid of me...of course E is 14 decimal and you are correct!
So the code is assembling at the correct location....hmmm
Joe
Jumper,
I went back to the other method (your special DEFINE), and here's what the (partial) assembly code looks like. It apears that something's putting another ORG after the one we defined. I wonder if it's another INCLUDE file that's doing it:
00037 LIST
00EB00 00038 ORG 60160 ; type the adress for loader here
00088 LIST
00089 ; Oscillator is 8MHz
01140 LIST
000000 01141 ORG RESET_ORG ; Reset vector at 0
01150 LIST
000000 EF66 F000 01151 goto INIT ; Finish initialization
02058 LIST
000004 02059 HSERIN
02060 ifdef HSER_CLROERR
02061 btfsc RCSTA, OERR ; Check for overflow error
02062 bcf RCSTA, CREN ; Toggle continuous receive to clear error
02063 bsf RCSTA, CREN
Jumper,
OK, I think I have it. In the .lib file, there was another ORG statement further down that was apparently overriding the special ORG DEFINE that we put in. It looked like this:
ORG RESET_ORG ; Reset vector at 0
I commented it out, and all seems to work OK now, org'ing at 0 if nothing is specified and ORG'ing at 60160 using your special DEFINE to select the desired starting location.
Joe
We need the DEFINE RESET_ORG in the lib file when we write the application software to move the code to a suitable address (I like 64).
Have you tried if that part works?
/me
I think this is a worthwhile project, but don't forget those of us that use parts with more than 64K of code space!
Charles Linquist
I agree. Funny... those i did with more than 64K, as now, don't use the bootloader, just ICSP. Case by case i guess.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Sure it would be nice if all PIC's could be using this loader but:
How do we address the memory above 65535 ($FFFF) in READCODE and
WRITECODE when PBP only have 16-bit variables. It seems to me that Microchip has outgrown PBP, 32-bit variables in PBP would be nice.
ICSP is probably the way to go, unless it is done in ASM.
Let's start with the 64K devices and see if we run into any mines. We are still far from finished.....
/me
Bookmarks