Bootloader + Mainline code in single HEX file


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Hi,

    My understanding is that if you set the code "protect" bit then the bootloader will not be able to write to program memory.
    Seems logical to me but I could be wrong.

    Regards,
    ---> picnaut

  2. #2


    Did you find this post helpful? Yes | No

    Red face

    Hello again,

    I've done a little more digging on the web and came up with the following:

    http://www.embeddedrelated.com/group.../show/9151.php


    http://www.electro-tech-online.com/m...t=code+protect


    http://www.picbasic.co.uk/forum/show...t=code+protect

    So, is it true that code protect makes it so that you can't read the PIC's memory but you can write to it with a bootloader?

    If so, how do you verify that the code is correct?

    Has anybody here used a reliable bootloader with code protect enabled?

    If so, I'd be very interested.

    I did a search within this forum (search words: bootloader code protect) and only came up with this thread.

    Cheers!
    ---> picnaut

  3. #3
    Join Date
    Apr 2005
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    I have done this reliably with Mechanique's Bootloader. I would also like to figure out a way to combine the bootloader and mainline code into a single hex and use code protect.

    I have done it in the past by not code protecting the bootloader hex, bootloading the main file onto the chip, and then reading the whole thing back. This works and I can manually select code protect in my programmer to code protect the combination.

    I would like to figure out a way to correct the CP fuse in the hex once I have the combined file so I don't have to keep remembering to adjust the fuses in my programmer.

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


    Did you find this post helpful? Yes | No

    Default

    My bootloader is working fine with CP on. I've obviously left TBLWRT and TBLRD enabled, so that the bootloader works. (I'm working with an 18F).

    I ended up taking the bootloader.hex and appending the mainline.hex together (after stripping out the EOF line from the first hex file). It seems to work ok using it to program both in a single run.

    If anyone finds a better way to do it, let me know.
    Last edited by dman776; - 19th May 2006 at 23:11.

Similar Threads

  1. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  2. can someone post example to code a bootloader using pbp?
    By nimonia in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th May 2005, 16:28
  3. Code dsigner lite problems
    By toalan in forum Off Topic
    Replies: 2
    Last Post: - 23rd February 2005, 20:08
  4. need hex code to make 12c509 a flip flop,
    By bruce3mn in forum General
    Replies: 1
    Last Post: - 15th November 2004, 03:23
  5. PICbasic pro HEX file size
    By winsthon in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th January 2004, 08:11

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