Suppose if you are developing a dual application bootloader, let us say you have 3 projects:
The DUAL_APP_BOOTLOADER is the application that contains bootloader component and communication component and that bootloads APPLICATION_1 and APPLICATION_2.
The Bootloadable component of the projects APPLICATION_1 and APPLICATION_2 are referenced to bootloader component of DUAL_APP_BOOTLOADER.
When you build the three projects you will see the following files:(path: .cydsn\CortexM0\ARM_GCC_541\Debug)
APPLICATION_1: APPLICATION_1_1.hex, APPLICATION_1_1.cyacd, APPLICATION_1_2.hex, APPLICATION_1_2.cyacd
APPLICATION_2: APPLICATION_2_1.hex, APPLICATION_2_1.cyacd, APPLICATION_2_2.hex, APPLICATION_2_2.cyacd
You can do any one of the following steps to fill your flash with 3 applications:
1. Pogram the DUAL_APP_BOOTLOADER.hex. After programming DUAL_APP_BOOTLOADER, you can bootload APPLICATION_1_1.cyacd and APPLICATION_2_2.cyacd.
You can also bootload APPLICATION_1_2.cyacd and APPLICATION_2_1.cyacd.
2. Program APLICATION_1_1.hex and then bootload APPLICATION_2_2.cyacd
Or, Program APPLICATION_1_2.hex and then bootload APPLICATION_2_1.cyacd
3. Program APLICATION_2_1.hex and then bootload APPLICATION_1_2.cyacd
Or, Program APPLICATION_2_2.hex and then bootload APPLICATION_1_1.cyacd
Hope the above explanations answers to your questions 1 and 2.
>>"3) How to properly test a "dual-application bootloable" project ?"
--> Using Bootloader_Exit() API from the DUAL_APP_BOOTLOADER project, you can switch between APPLICATION_1 and APPLICATION_2 during boot process.
I am attaching a project for your reference. Kindly let us know if you have any queries:
Thank you for your feedback GaneshD_41. Much appreciated.
In the AN73854- PSOC Introcuction to Bootloaders (https://www.cypress.com/documentation/application-notes/an73854-psoc-introduction-bootloaders) page 23 says : "For a high-reliability application, you can place two copies of the same bootloadable project into flash".
How to accomplish this case in which the 2 apps are the same?
How to tell the bootloader what application should start or be marked as active?
My guess the in the bootloader code something else besides calling "Bootloader_Start()" is needed but I could not find any examples in the case when App1 = App2 .
In a classic dual-app bootloader 3 hex files ( Hello.exe, Hello_1.exe, Hello_2.exe ) and 2 cyacd files are generated .
Is the Hello.exe generated for production purposes. ( In order to flash the bootloader + the 2 apps) using one single hex file?
Can anyone please help with these questions?
1 of 1 people found this helpful
If you want both Application_1 and Application_2 both as single application (say Application_1) you have to do the following steps:
1. Program the Bootloader.hex in to your board. In the Bootloader application you have to call the Bootloader_Start().
2. Now in bootloader host use Application_1_1.cyacd and Application_1_2.cyacd one by one and bootload those applications into flash. Please note that after bootloading Application_1_1.cyacd, you have to comeback to Bootloader project and then call the API either Bootloader_Start() or Bootloader_Exit(Bootloader_EXIT_TO_BTLDR) to bootload Application_1_2.cyacd
3. After botloading both the .cyacd files, from the bootloader application you have to call either Bootloader_Exit(Bootloader_EXIT_TO_BTLDB_1); or Bootloader_Exit(Bootloader_EXIT_TO_BTLDB_2); to switch between Application 1 or application_2. (In your case both applications are same).
4. From Application_1 or Application_2, you need to call Bootloadable_Load() to come back to Bootloader and start the selection process. Please check the attached project which implements the above steps.