Hi,
It should of course be 64 bytes (remark to my self: never post anything before lunch!!!) This is why we have our application offset to 64 (the 128 number came from an other part of my project)
Different Basic usees different ways to put the software in the desired addresses. This way by changing in the PBP18LIB file is maybe not what the designers had in mind but I can not find any better way. PBP always puts the library first (probably because older PICs have pages and stuff inside) even if you use an assembler ORG to try to move it. We can not share the library with the application program since it changes depending what functions are used in the application code. So we need to relocate the library.
PBP supports the use of a loader, but there is less support to write one.
It is really not that hard to make the program, just remember that we always goto the loader, then in the loader we decide if we want to program the PIC or start our application software.
In the application software we only need to add the DEFINE RESET_ORG 64 and then we can forget that we will use a loader later. If the PIC has the loader inside or not doesn't matter for when we have started the application software we have passed that stage.
If you want you can of course jump to the loader from your application software but then you would need to have either en EE-prom flag or an address in the flash to indicate that the loader should enter the programming phase. (PIC starts up -> goto loader --> check EE-prom -> enter or jump back and restart the application software)
More questions? Just post them....
/me
Bookmarks