MultiApp Bootloader

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

cross mob
Anonymous
Not applicable

 I am stuck up with MultiApp Bootloader .I dont know how exactly to have 2 bootloadable projects in the flash and select between these two. Is there any example project? I tried searching in Cy Website , Creator. but no sign of it. Has anyone worked on it ?

0 Likes
5 Replies
Anonymous
Not applicable

 Any documents on how to get the programs working wil be good enough. I have programmed two projects into flash of PSoC and I dont know how to select between the two. I am stuck!

0 Likes
Anonymous
Not applicable

 This post is replica of MultiApp Bootloader from MicroHari. As Srim had already posted it on the other post, i am reposting it here

   

   

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.

0 Likes
Anonymous
Not applicable

Thanks for your reply @Avagadro. Does it apply to PSoC3 devices as well?

0 Likes
Anonymous
Not applicable

 Yes it applies to both PSoC3 and 5 devices.

0 Likes
Anonymous
Not applicable

Can switching between Project_A and Project_B be automatic? In other words, no user intervention? So if there's a CRC error with Project_A, then Project_B is then used?

   

If A_1 and A_2 are identical, and B_1 and B_2 are indentical, and A and B are different then where do they all reside in memory? Or is only one (either A or B) present in the memory at any one time?

   

Can I flash the bootloadables in the device using the Bootloader Host program or do I have to use BCP? Bootloader Host only allows me to select one file, unless I'm missing something.

   

In the end, I would like to have one bootloadable (A) with all my functions such as LEDs, USB, PWM, etc. The other bootloadable (B) is simple and very robust with minimal commands. When the product is in the field, A is running most of the time. If something goes wrong then B takes over. The user will get a message to contact Service and I can remotely log in and update A. Is this possible? Thanks!

0 Likes