I think you need to set the Active Application Status Matadata before starting the bootloading in Bootloader project. We will check and let you know our updates.
Meanwhile you can start your development by programming the Bootloadble1 project along with the bootloader project itself and then switch to Bootloader ( by pressing button ) and update the second image.
how can I programm the bootloadable project along with the bootloader project itself?
Do I have to use BLE?
Just build the bootloader project -> Build the Bootloadable project by adding the bootloader dependencies -> Program the bootloadable project. ( The Bootloader project will be automatically programmed along with Bootloadable project )
For bootloading and running a new image , you need to deactivate the current image running already ( need to update the metadata) either in bootloadable ( before switching to bootloader ) or in bootloader project by means of an external/internal control.
To make a application active or deactive, you need to use the following API.
Bootloader_SetFlashByte((uint32) (Bootloader_MD_BTLDB_ACTIVE_OFFSET(0)),1); // First argument corresponds to the Application ID ( First (0) or second(1)) and the second argument is corresponds to Active (1) or deactive (0)
it helped to programm the Bootloader along with Bootloadable #0, but the API didn't support the programming process. After sending the Bootloadable#1 the computed checksum might be false.
Am I right, assuming bootloadable #0 symbolize file: "BLE_OTA_FixedStack_Bootloadable01_1.cyacd" and bootloadable #1 symbolize file: "BLE_OTA_FixedStack_Bootloadable01_2.cyacd"?
Programming the Bootloadable#0 with Bootloader works fine and Bootloadable #0 is execute as desired. Sending Bootloadable#1 / "BLE_OTA_FixedStack_Bootloadable01_2.cyacd" returns error ("The row checksum...."), if option auto application switching is disabled. If auto application switching is enabled, the Bootloader runs application#0 instead of application #1 and returns no error.
The Command "Get Row Checksum (0x3A)" is declared as optional. Either turning off this command in bootloader options, didn't help. After sending the whole file "BLE_OTA_FixedStack_Bootloadable01_2.cyacd" CySmart returns an error: " The bootloader reported error 'Command not recognized: the supported commands are defined in the Bootloader section of the System Reference Guide'".
Please find the attached modified version of the project.
Description: Bootloader Project selects the Active App based on GPIO Status (P3.0). See the function active_app() in bootloader project. Please note that to bootload an image we need to make it inactive before the bootloading starts.
Since both the images are exactly same in this project , so you might not be able to distinguish between two images based on UART prints.