MultiApp bootloader

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I had initially posted requesting for info on MultiApp bootloader, but the post wasn't successful. 

   

Is there any documentation on how to use MultiApp bootloader which can be of use..

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

The multi-App Bootloader allows users to place two images in the flash.The typical reason for having this option is that if a bootload operation fails for one Bootloadable project, or that Bootloadable project becomes corrupted for some other reason, then the other Bootloadable project can still be executed. This ensures that there is always a valid application image residing in flash. With this feature, you can place two images of the same project or place two different applications altogether.

   

With the "dual mode" option the second Bootloadable project shall occupy flash starting at the row that is halfway between the start of the first Bootloadable project and the end of flash. This limits the flash size of multi-app Bootlodable to half of that of a normal Bootloadable project.

   

Whenever a Bootloadable project having a dependency to a Multi-app Bootloader project is built, two CYACD files are created with suffixes *_1.cyacd and *_2.cyacd. The former will always occupy the initial half of the Bootloadable flash area and the later the remaining half.      

   

 

   

Steps to switch between applications

   

Let us assume that there are two Bootloadable projects: 1) Project_A and 2) Project_B

   

When these are built with a dependency to a MABL, two cyacd files are generated for each project:

   

Project_A_1.cyacd and Project_A_2.cyacd

   

Project_B_1.cyacd and Project_B_2.cyacd

   

The *_1.cyacd file will always occupy first half of the flash and *_2.cyacd will occupy second half. An application set as active and running cannot be overwritten. The following demonstrates the commands used in (BCP)  to switch application.

   

Switching from application_1 to application_2

   

w 08 01 36 01 00 01 c7 ff 17

   

r 08 x x x x x x x

   

Switching from application_2 to application_1

   

w 08 01 36 01 00 00 c8 ff 17

   

r 08 x x x x x x x

   

where

   

08 – Bootloader I2C slave address

   

01 - Bootloader packet start

   

36 – Set active application command

   

01 00 – Number of bytes to follow (Lower byte first)

   

00 – Set image #1 as active

   

C8FF – Basic Summation checksum (FFFF-(01+36+01+00+00)+01)

   

17 – Packet End

   

 

   

The other details can be found in the Bootloader datasheet. Let me know if you need more info on this.

   

 

   

Thanks,

   

srim

View solution in original post

0 Likes
5 Replies
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

The multi-App Bootloader allows users to place two images in the flash.The typical reason for having this option is that if a bootload operation fails for one Bootloadable project, or that Bootloadable project becomes corrupted for some other reason, then the other Bootloadable project can still be executed. This ensures that there is always a valid application image residing in flash. With this feature, you can place two images of the same project or place two different applications altogether.

   

With the "dual mode" option the second Bootloadable project shall occupy flash starting at the row that is halfway between the start of the first Bootloadable project and the end of flash. This limits the flash size of multi-app Bootlodable to half of that of a normal Bootloadable project.

   

Whenever a Bootloadable project having a dependency to a Multi-app Bootloader project is built, two CYACD files are created with suffixes *_1.cyacd and *_2.cyacd. The former will always occupy the initial half of the Bootloadable flash area and the later the remaining half.      

   

 

   

Steps to switch between applications

   

Let us assume that there are two Bootloadable projects: 1) Project_A and 2) Project_B

   

When these are built with a dependency to a MABL, two cyacd files are generated for each project:

   

Project_A_1.cyacd and Project_A_2.cyacd

   

Project_B_1.cyacd and Project_B_2.cyacd

   

The *_1.cyacd file will always occupy first half of the flash and *_2.cyacd will occupy second half. An application set as active and running cannot be overwritten. The following demonstrates the commands used in (BCP)  to switch application.

   

Switching from application_1 to application_2

   

w 08 01 36 01 00 01 c7 ff 17

   

r 08 x x x x x x x

   

Switching from application_2 to application_1

   

w 08 01 36 01 00 00 c8 ff 17

   

r 08 x x x x x x x

   

where

   

08 – Bootloader I2C slave address

   

01 - Bootloader packet start

   

36 – Set active application command

   

01 00 – Number of bytes to follow (Lower byte first)

   

00 – Set image #1 as active

   

C8FF – Basic Summation checksum (FFFF-(01+36+01+00+00)+01)

   

17 – Packet End

   

 

   

The other details can be found in the Bootloader datasheet. Let me know if you need more info on this.

   

 

   

Thanks,

   

srim

0 Likes
Anonymous
Not applicable

 Hi,

   

Is there a way to switch between two bootloadable programs without using a debugger/programmer?

   

I'm trying to load two different programs in flash and select between them by changing a DIP switch position using multi-app bootloader.

   

The reason for avoiding the use of MiniProg3 or the like is to enable "post-PCB reconfiguration" at a flip of a switch. 

   

Thanks and regards,

   

Shreesha

0 Likes
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

 Hello,

   

 

   

There is no option for that from the PSoC Programmer. You can design your bootloader in such a way that the Active Application in the metadata is written by the bootloader based on the DIP switch status.

   

 

   

Thanks,

   

Hima

0 Likes
Anonymous
Not applicable

Hima;

How do you get both apps loaded into flash? I have the bootloader logic written to look to see which app is active but I cannot get both apps to be loaded at the same time in the different memory locations. I would expect to see 2 metadata rows also which I do not.

Please help! Thanks, Jeff

0 Likes

Hello Jeff,

If you program the bootloadabale.hex you will get the same copy of application copied to both App1 memory and App2 memory. There is no direct way to program different applications to App1 and App2 memory region. You will have to perform Bootloading.

Thanks,

Hima

0 Likes