Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Building firmware under Arduino actually only compiles the M4 elf image and combines it with a precompiled M0+ image stored in the Arduino Gumband install (subject to change 10/20...). The generated cyacd2 file is sent directly to a gumband_loader executable which performs the firmware update via the COM port, the default behaviour is to overwrite the existing internal flash on the hardware during this process (this file is not written to external flash). Based on the current board selection within the Arduino IDE a partial update (M4 app only) or full update (including the M0+ app) is performed. After compilation, the precompiled M0+ gbm0 file and and M4 gbm4 files are copied into the sketch folder.

Partial Firmware Updates

Overview

...

  • Opens a complete cyacd2 file and determines which sections that don't need to be uploaded. 

  • Updates the header info appId to reflect the correct image location in external or internal flash1 and the new image size. 

  • Recalculates the final CRC for the new application size and appends it at the end of the new image. 

Notes:

  1. Memory location must always be external for OTA updates and internal for USB updates - if not a flash row error will be seen and the update will fail.

 Current Issues

  • This only works if the M4 code is larger than the previous M4 code

  • This parser only works if the Linker script matches exactly what's defined at compile time in the gumband_parser executable

...