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
.endr
Questions:
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?
解決済! 解決策の投稿を見る。
Hello Jason Philippi:
The repetition pattern is just to fill the resulting binary with 0xFF. You can instead use that space for your own data.
Unfortunately there are no plans to support a use case like the one you mention. The KBOOT bootloader is not designed to operate at the same time as the application. For your requirement then KBOOT could be taken as reference, but I would not recommend you to use it as base project, due to its complexity you may find that it is not easy to adapt it to your needs. Instead I think it is easier to start fresh with your own bootloader with an interface driver (UART, I2C, SPI, USB) and a flash driver. For flash driver you can use the C90TFS integrated with KSDK platform.
Regards!
Jorge Gonzalez
Hello Jason Philippi:
The repetition pattern is just to fill the resulting binary with 0xFF. You can instead use that space for your own data.
Unfortunately there are no plans to support a use case like the one you mention. The KBOOT bootloader is not designed to operate at the same time as the application. For your requirement then KBOOT could be taken as reference, but I would not recommend you to use it as base project, due to its complexity you may find that it is not easy to adapt it to your needs. Instead I think it is easier to start fresh with your own bootloader with an interface driver (UART, I2C, SPI, USB) and a flash driver. For flash driver you can use the C90TFS integrated with KSDK platform.
Regards!
Jorge Gonzalez