Relocating PBP


Closed Thread
Results 1 to 8 of 8

Thread: Relocating PBP

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default Relocating PBP

    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.
    Charles Linquist

  2. #2
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Charles Linquis View Post
    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.
    Last edited by T.Jackson; - 28th April 2007 at 07:44.

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Question Good Question !!!

    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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    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.
    Charles Linquist

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink the first question ... to be asked.

    Did you try a "DEFINE LOADER_USED 1" ... to see in MPLAB prog window what it does ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    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 Linquist

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    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
    Charles Linquist

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    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>
    DT

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP, ASM and LST files
    By HenrikOlsson in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th January 2010, 13:43
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30
  5. PBP / XP Crash
    By pondindustrial in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th November 2005, 03:16

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts