Bootloader for device with SD card


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2009
    Location
    Canada
    Posts
    68

    Default Bootloader for device with SD card

    Hello again, Guys,

    Thanks to I have a device with SD card (still not that advanced as Makrakit's one but it works) and now start thinking that having SD card already connected, it would be very nice to have an option to update firmware from it...

    Will very much appreciate if someone could share a sample code for loading firmware from SD card

    Thank you,

    Alexey

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Bootloader for device with SD card

    I've actually been thinking along similar lines recently since i've finally go FSSD3 working... ish...

    The first question becomes, what do you want to do with the system?

    I don't know much about the HEX file format, but, theoretically, the hex file could be saved to SD with a specific file name...
    When the PIC boots, it looks for that specific file name on the card, loads it sector by sector into ram, and with each sector it self programs into a specific memory location.

    The only issues i see, is reconfiguring the fuses... and re-configuring interrupts...

    The interrupt issue, if we use DT's interrupt system as an example. All you's need to do is to define every single interrupt and give it it's own sub routine. Make sure each sub routine has it's own specific small block of memory (just enough to add in a jump to your own custom sub routine) then with each new firmware it overwrites all the interup sub routines with jumps to your own sub routines for the interrupts your actually using.
    If an interrupt that your not using goes off then it jumps into an empty sub routine and then returns clearing the interrupt...

    Another way of doing it, is to use one pic to program the other from the new hex... but that has it's own problems too...

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Bootloader for device with SD card

    A friend of mine actually has something like this running. He said it is not quite ready to release into the wild. He will sooner or later.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Dec 2009
    Location
    Canada
    Posts
    68


    Did you find this post helpful? Yes | No

    Default Re: Bootloader for device with SD card

    Thank you, Mackrackit, we will wait

  5. #5
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Bootloader for device with SD card

    did some sample bootloader code using a SD eventuate for release

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