AnsweredAssumed Answered

KBOOT BCA edits for purpose of dual application

Question asked by Jason Philippi on Sep 29, 2015
Latest reply on Sep 30, 2015 by Jorge_Gonzalez

I read Adapting KDS project for KBOOT flash resident bootloader and I would like to adapt the BCA to work with a ping pong or dual application setup.


I am going to have two identical applications, but different revisions, in two separate banks.

I'll alternate between the two banks for every update of the application. In other words, the new application is an update, and the old application is a backup.

Since my boards are in hard to reach areas, the boards are being flashed over the air (ota). Also, I can't have long periods of down time, so the new application will be flashing while running the current application.


/* Bootloader Configuration Area (BCA) */

  .section .bca, "a"

    .ascii "kcfg" // [00:03] tag

    .long 0xFFFFFFFF // [07:04] crcStartAddress

    .long 0xFFFFFFFF // [0B:08] crcByteCount

    .long 0xFFFFFFFF // [0F:0C] crcExpectedValue

    .byte 0xFF // [10] enabledPeripherals

    .byte 0xFF // [11] i2cSlaveAddress

    .short 5000 // [13:12] peripheralDetectionTimeout (milliseconds)

    .short 0xFFFF // [15:14] usbVid

    .short 0xFFFF // [17:16] usbPid

    .long 0xFFFFFFFF // [1B:18] usbStringsPointer

    .byte 0xFF // [1C] clockFlags

    .byte 0xFF // [1D] clockDivider

    .byte 0xFF // [1E] bootFlags

    .byte 0xFF // [1F] reserved



    .rept (0x400-0x3E0)/4 // To fill binary range 0x3E0 - 0x400 with 0xFF

    .long 0xFFFFFFFF




Can I shorten .rept and add my own version/age ID?

What bootloader source files should I change to accommodate?

Are there future intentions to support a structure like this with KBOOT?