• AVR Freaks

FIRMWARE UPDATE FROM EXTERNAL FLASH

Author
SincPelp
New Member
  • Total Posts : 2
  • 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

1 Reply 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
    Jump to:
    © 2020 APG vNext Commercial Version 4.5