Issues with a bootloader


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Issues with a bootloader

    Surely a boot loader can’t be written in a few instructions...
    Have you scrolled right down the bottom of your hex file when only the boot loader is loaded?
    I think it would be written to the last locations it could fit.

  2. #2
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Issues with a bootloader

    Art, I think the bootloader contains the "goto" section at the start, and then the actual loader is at the end of the code space as shown below and confirmed in the attachment.



    @Henrik, Line added to the main code - thanks
    Attached Images Attached Images  

  3. #3
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Issues with a bootloader

    It's still flakey, but seems to work 8 out of 10 times !

    Cheers guys

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Issues with a bootloader

    If the boot loader can write your program over serial the pic must support program memory read/write.
    So you should be able to check if the loader exists with your own pic program.
    If you think you're overwriting it with your program you'd only need to check the first word is correct.
    Code:
    pword var word
    index var word
    
    index = $7F40
    LCDOUT ... clear screen and home command
    READCODE index,pword
    IF pword = $700E THEN
    LCDOUT “  Loader exists   "
    ELSE
    LCDOUT “Loader Overwrite"
    ENDIF
    Last edited by Art; - 15th May 2015 at 00:48.

Similar Threads

  1. pic18F6722 issues
    By ptig185 in forum General
    Replies: 8
    Last Post: - 2nd September 2011, 17:37
  2. EEPROM issues
    By timmers in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 25th March 2010, 16:19
  3. Comparator Issues
    By Freman in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd May 2008, 12:58
  4. Pulsein issues...
    By cpayne in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th April 2006, 18:45

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