• AVR Freaks

Hot!FIRMWARE UPDATE FROM EXTERNAL FLASH

Author
SincPelp
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2020/03/17 08:55:32
  • Location: 0
  • Status: offline
2020/03/20 23:18:08 (permalink)
0

FIRMWARE UPDATE FROM EXTERNAL FLASH

Hi.
I have a custom PCB with the PIC32MZ2048 microcontroller and a flash memory chip.
The firmware .hex file is recorded on this flash memory chip from a specific location.
What are the steps for the PIC to know that the firmware is in a full memory location
and start the update? Do I have to activate the bootloader library framework in Harmony?
what type? Can it be done without activating this library?

I never updated the PIC firmware from memory chip and I am a little confused.

Thanks for your help.
#1

4 Replies Related Threads

    muellernick
    Super Member
    • Total Posts : 476
    • Reward points : 0
    • Joined: 2015/01/06 23:58:23
    • Location: Germany
    • Status: offline
    Re: FIRMWARE UPDATE FROM EXTERNAL FLASH 2020/03/26 02:09:48 (permalink)
    0
    I did that with Harmony 1.09.
    There is no bootloader that fits the task, so I started with the serial one.
    I had to implement a stripped down version of I2C to read from my EEPROM (using **no** interrupts).
    I made my own layout of the binary image in the EEPROM that included location in the PIC, size and a CRC.
    I set a flag that signals the bootloader to update the firmware, reboot and then the bootloader starts flashing the new firmware.
     
    For preparing the image:
    I used hex2bin, as the hex file is way too large to fit into my EEPROM. Also had to write a helper tool that generated the additional info (offset, size, CRC) and wrote a single binary image.
    To add pain, the image is encrypted and the bootloader first verifies that he received a valid image.
     
    After all, that wasn't a simple task. :-)
    #2
    SincPelp
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2020/03/17 08:55:32
    • Location: 0
    • Status: offline
    Re: FIRMWARE UPDATE FROM EXTERNAL FLASH 2020/03/30 11:24:22 (permalink)
    0
    Thanks for reply, muellernick.

    I know it is not an easy task but I have to do it. Is it possible that you share the code or at least the parts necessary for development? You would do me a great favor, because right now I am a little lost with this.

    Thanks again for your help.
    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 18796
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: FIRMWARE UPDATE FROM EXTERNAL FLASH 2020/03/30 12:10:30 (permalink)
    0
    Look at the USB Bootloader example.
    There are "Data stream" functions.  That gets the data from a file.
    If you saved the File you can feed your data in there.
    If not you need to skip the Intel Hex Parsing.
    #4
    SincPelp
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2020/03/17 08:55:32
    • Location: 0
    • Status: offline
    Re: FIRMWARE UPDATE FROM EXTERNAL FLASH 2020/04/08 11:34:01 (permalink)
    0
    Thank you, NKurzman
    I will study this option.
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5