Using JANPatch. Does binary patching of firmware using FATFileSystem on Mbed OS 5.
There is also a demo which uses BlockDevice instead.
Takes:
- Source binary.
- Diff file.
Produces:
- A new binary.
This application does not use dynamically allocated memory. See macro in main.cpp
.
-
Put
demo/blinky-k64f-old.bin
anddemo/blinky.patch
on an SD card. -
Put SD card in FRDM-K64F development board.
-
Build this application:
$ mbed compile -m K64F -t GCC_ARM
-
Run the application and inspect serial output (on baud rate 9,600).
-
When the application is done, inspect the SD card.
blinky-k64f-new.bin
should have appeared, and it should match the file in the demo directory:$ diff /Volumes/SD/blinky-k64f-new.bin demo/blinky-k64f-new.bin # should not return anything
See the documentation for JANPatch.