How do you create a Combination-Launcher project?

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

cross mob
EtHa_3840976
Level 2
Level 2

Hello,

I need to be able to upgrade the firmware on my board without exiting the application. There are states that need to be maintained and interrupts that need to stay active during the firmware upgrade process. I found that the best way to do this is to have a combination-launcher project. This allows me to upgrade the firmware from within the application.

I understand the concept: one bootloader, one bootloadable, and one communication interface. Then there is a launcher project that just has a bootloader.

In my case the communication interface is custom and I have implemented the read/write functions for use in the HostLink() function.

The issue I am running into is that I cannot build my project because it does not recognize it as a combination project. I get the following errors:

A project referencing a single application bootloader cannot contain both Bootloader and Bootloadable instance

or if I enable dual application bootloader in the bootloader settings I get:

A project may not contain both a Bootloadable Instance and a MultiAppBootloader Instance

Bootloader Configuration:

1. Custom interface

2. I am pretty sure I should have the bootloader set to a single-app bootloader. Is this correct?

3. Everything else is default.

Bootloadable Configuration:

1. I am not sure which hex file to link to. I get two hex files when I build now and I don't really understand why.

The CYDEV_PROJ_TYPE is set to 4 (CYDEV_PROJ_TYPE_LOADABLEANDBOOTLOADER). I assume this is correct...

Do all of the components need to be on the exact same schematic page? I have my bootloader and bootloadable on one schematic page and my communication component on another page. I feel like this should not matter.

Are there any examples of a combination-launcher project?

Thanks,

Ethan

0 Likes
1 Solution
EtHa_3840976
Level 2
Level 2

I figured out my issue. I was linking the bootloadable component to the wrong hex file. I was linking it to the application hex file when I should have linked it to the launcher hex file. Obviously, this makes sense since the launcher needs to know where the bootloadable applications are in flash.

My next question is:

- How do I flash the application on the chip?

In the single/dual application bootloader cases, you first flash your bootloader application onto the chip and then you use that bootloader to flash the application on the chip via the communication interface.

In the case of the combination-launcher project, there is no stand-alone bootloader. It is just a launcher. How does the launcher get flashed? How does the combination project get flashed? If you flash the launcher first, then you have no way to flash another image without erasing the launcher. If you flash the combination project first then can you flash the launcher? That feels strange...

View solution in original post

0 Likes
3 Replies
EtHa_3840976
Level 2
Level 2

I figured out my issue. I was linking the bootloadable component to the wrong hex file. I was linking it to the application hex file when I should have linked it to the launcher hex file. Obviously, this makes sense since the launcher needs to know where the bootloadable applications are in flash.

My next question is:

- How do I flash the application on the chip?

In the single/dual application bootloader cases, you first flash your bootloader application onto the chip and then you use that bootloader to flash the application on the chip via the communication interface.

In the case of the combination-launcher project, there is no stand-alone bootloader. It is just a launcher. How does the launcher get flashed? How does the combination project get flashed? If you flash the launcher first, then you have no way to flash another image without erasing the launcher. If you flash the combination project first then can you flash the launcher? That feels strange...

0 Likes

Normal and bootloader project hex files contain code and data bytes for just that project. Whereas, Bootloadable.hex files are different in that they contain code and data bytes for the bootloadable and the associated bootloader project. When you program Bootloadable.hex file; both projects are programmed in at the same time. You can follow these steps to program both combination application and get started;

(1) Program Combination_Application1.hex file which contains both launcher and combination application 1. Later, bootload the Combination_Application2.cyacd and device flash would contain launcher, Combination_Application1 and Combination_Application2.

(2) You can merge both combination applications (Combination_Application1.hex and Combination_Application2.hex) and program the device. Please go through Combine Dual-application Bootloadable Hex Files for Production Programming– KBA224390

Thank you! This is good information.

0 Likes