Open source PBP bootloader


Closed Thread
Results 1 to 40 of 41

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Open source PBP bootloader

    I need to create bootloader for PIC18F that program flash from external I2C memory, eg 24lc512.
    I'll probably write bootloader in pbp and asm.

    If I understand correctly how bootloader works, there is 2 ways to implement bootloader.
    -One is to make bootloader that sits on beginning of flash, then on address 4 and 8, need to be GOTO to new int vector. That will add one more GOTO before executing int, PBP already add one. I don't like that GOTO's.
    -Other option is that first instruction in flash is GOTO Bootloader, and to put bootloader on end of flash. Then there is no need to remap interrupt. When bootloader finish job, then GOTO 1
    In main program only need to remap reset vector to 1.
    Am I understand how it works?

    For now I'll create LED blink program, that use bootloader with reset vector at 1.
    And then try to make bootloader that will program that hex to flash. For start hex will be in LOOKUP2, until I get flesh erase and write to work, then comunication...

    Probably I should start with analyzing syntax of hex file.

    Is there anyone interested and willing to help?

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Open source PBP bootloader

    Edit timeout...
    Address for int are 8 and 24, and GOTO takes 2 program word so, reset org should be 4.

  3. #3
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Open source PBP bootloader

    Is there way to move RESET_ORG to other address, without moving interrupt vector?
    DEFINE RESET_ORG 004h also move vectors. In .LST file interrupt vector are defined as RESET_ORG+8h or 18h.
    DEFINE LOADER_USED 1 doesn't do anything. I'm looking in disassembled hex file...
    This is test code:
    Code:
        DEFINE NO_CLRWDT 1
        DEFINE LOADER_USED 1
        DEFINE INTHAND myint    ' Define interrupt handler
        DEFINE INTLHAND myint    ' Define interrupt handler
    
    Start:
        PORTD.6=1
        PORTD.6=0
    GOTO Start
    
    @myint bcf PORTB,1
    Name:  disasm.png
Views: 3168
Size:  12.2 KB

    Also I noticed that with or without NO_CLRWDT 1, there is no CLRWDT in hex file.

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: Open source PBP bootloader

    I have VERY limitted knowledge in this area, but can't you set config fuses from the programmer?

    (NO_CLRWDT is a config fuse right?)

    If input to the programmer is the hex file, wouldn't that mean that fuses are handled separately than the hex file?

    Robert
    Last edited by Demon; - 10th March 2014 at 22:20.

  5. #5
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Open source PBP bootloader

    PBP should put CLRWDT if there is no defined NO_CLRWDT 1. DEFINE NO_CLRWDT 1 isn't config, it is PBP's define.

  6. #6
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Open source PBP bootloader


    This is exactly what I'm trying to do.

  7. #7
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Open source PBP bootloader

    wayneandlayne.com have a pretty neat solution for a bootloader, it uses two LED's as light detectors to receive the code that is "flashed" or "blinked" to your PC's monitor screen. One LED light sensor is for clocking and one LED light sensor is for the data.


    I'm not sure if this is actually a boot loader... or more of just a way of changing the message that this little kit displays...
    but I would think it could be modified to act as a boot loader.

    It may even work from a smart phones browser (it does play from a phones browser)



    Here is their actual programming web page where you can scroll down and click on the "GO" button and see it in action.
    http://www.wayneandlayne.com/blinky_programmer/


    and a description of their bootloader...
    http://www.wayneandlayne.com/project...ign/#questions

    Their project is open source but I'm not sure if the programming web page code is available.
    Last edited by Heckler; - 22nd March 2014 at 14:40.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

Members who have read this thread : 1

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