View Full Version : Relocating PBP
Charles Linquis
- 28th April 2007, 07:12
I have been trying without success to relocate PBP so it will run in high memory.
I iniitially thought that an @ ORG 0x1000 at the beginning of the program might do the trick, but no.
It may be that PBP is not relocatable without major surgery, but I was wondering if anyone had successfully done this, and if so, how you did it.
T.Jackson
- 28th April 2007, 07:41
I have been trying without success to relocate PBP so it will run in high memory.
I iniitially thought that an @ ORG 0x1000 at the beginning of the program might do the trick, but no.
It may be that PBP is not relocatable without major surgery, but I was wondering if anyone had successfully done this, and if so, how you did it.
Kind of wondering why you would want to do that for. If it's because you're having problems compiling large programs, why don't you just use PBPW.exe that will swallow up as much memory as needed. I did a rather large burglar alarm project last year, had no choice but to use PBPW.
Acetronics2
- 28th April 2007, 13:51
Hi, Charles
For 12 to 17 series ... PbP libs. HAD to be in the 1st or Half 1st page ... could explain non relocatable code.
but, for the 18 Series with no more paging , I didn't see anything.
So, It certainly might be a good question for MeLabs ... ( didn't see anything in the FaQ ...)
That could allow Much Bigger Personnal libraries ...
Alain
Charles Linquis
- 28th April 2007, 15:56
I'm very close to the point where I can (and need to) write my own bootloader. I would like to write most of the program in PBP, so I need it to reside right at the top of memory. 18F8722 only.
Acetronics2
- 28th April 2007, 18:05
Did you try a "DEFINE LOADER_USED 1" ... to see in MPLAB prog window what it does ???
Alain
Charles Linquis
- 28th April 2007, 18:19
I ALWAYS use that define, because it is necessary if you use MCLoader. It appears to move the RESET vector up by 8 locations.
Below is a cut-and-paste from PBPP18.LIB
ifdef LOADER_USED
LIST
ORG RESET_ORG + 8 ; Make sure no library code in first 4 locs
NOLIST
endif
Charles Linquis
- 28th April 2007, 18:34
I might have found it - one of the first lines of PBPP18.lib is
If I change that line, it does relocate the code. Now I just have to test to see if it still runs.
ifndef RESET_ORG
RESET_ORG EQU 0
endif
Darrel Taylor
- 28th April 2007, 22:34
Instead of changing the library file, you can ....
DEFINE RESET_ORG xxxx
In your bootloader program.
That way it doesn't mess things up for your other programs.
<br>
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.