Embedding bootloader?


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    10

    Default Embedding bootloader?

    I know it may seem a bit counter-intuitive, but has anyone here had any luck embedding one of the many available bootloaders into their own application? What I'd really like to be able to do is get my own program and the bootloader taken care of in a single program step, cutting down on initial programming time. Thereafter, of course, I'd be able to update my own program over serial (no need to send the bootloader at this point).

    Any pointers would be much appreciated.

    Thanks,
    Kevin

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Mecanique Bootloader is the ONLY one i use. It comes with the full version of MicroCode Studio.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Mar 2005
    Location
    Magnolia, TX
    Posts
    7


    Did you find this post helpful? Yes | No

    Smile

    In your "mainline" code, make sure that you have it offset:
    DEFINE RESET_ORG 200h ' or something appropriate

    Then, you will have to just merge the two hex files together:
    stripping the EOF record on the first hex file
    append the second hex file
    (you may want to strip out the config bits on either file, whichever is appropriate)

    Now you have a single hex file with both code bases.

  4. #4
    Join Date
    Jan 2007
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    mister_e: Hmm . . . I've seen that one mentioned a few times here. At the risk of going a bit OT, do you happen to know if the source code for that can be licensed? I'm using RS485 rather than 232 for my main comm, so I need to add some init code for the RS485 transceiver.

    dman: Wow. I had wondered if that was possible, but it sounded like too easy a solution. I guess Occam's Razor prevails!

  5. #5
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Plan B

    Write your own loader in PBP.

    Search the forum for bootloader, there is a post somewhere how to do it by modifying PBP in some ways, but in the end you probably have to merge the hex files if you want to program both at the same time.

    and if you go for using the hardware uart it will not be that big either

    /me

  6. #6
    Join Date
    Jan 2007
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    Jumper: After reflecting on my needs a bit more, I've come to the conclusion that writing my own bootloader would be the best option. At the very least, it'll be educational. Unfortunately, scouring the fora, I was unable to find any example code as you had suggested.

    I've been looking at the TinyBld and Pikme bootloaders, so I have a pretty good idea conceptually how to proceed. I'll just have to account for ASM vs PBP. One issue I haven't been able to work out is how to handle the hex files to reprogram themselves. It looks to me that the Pikme client loads the hex file and produces a binary image that it sends to the PIC for sequential programming. Is this the norm? Or is there a more appropriate way of handling the hex file for the non-bootloader program?

    Thanks,
    Kevin

Similar Threads

  1. PIC18F4680 bootloader
    By vinyl_theif in forum General
    Replies: 1
    Last Post: - 29th January 2009, 17:45
  2. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51
  3. USBDemo with Bootloader
    By vacpress in forum USB
    Replies: 4
    Last Post: - 25th January 2007, 22:29
  4. Bootloader Problems
    By rossfree in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th February 2005, 17:51
  5. Replies: 3
    Last Post: - 26th January 2005, 13:41

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