Skip to content

janjongboom/binary-diff-mbedos5

Repository files navigation

Binary diff application demo - SD card

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.

Usage

  1. Put demo/blinky-k64f-old.bin and demo/blinky.patch on an SD card.

  2. Put SD card in FRDM-K64F development board.

  3. Build this application:

    $ mbed compile -m K64F -t GCC_ARM
    
  4. Run the application and inspect serial output (on baud rate 9,600).

  5. 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
    

How to create diffs

See the documentation for JANPatch.

About

Using JANPatch to apply a binary diff in Mbed OS 5

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages