How to implement OTA Fixed Stack in "normal" project from scratch - PSoC 4 - CYBLE-212020-01

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

cross mob
Fpoli
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hello to all.

I am new to the community.

I am writing to ask you how I can build a workspace from scratch including two projects to build an OTA bootloader.

I have a project called "normal/application" that I didn't make that has BLE stack and all the components needed for its purpose ..

How can I make it Bootloadable?

I have read the AN97060 application, but the application/normal project was not made by me.

Where to start if I want to implement a "Fixed Stack OTA Bootloader" project since the BLE stack must only be in the "Bootloader" project?

How do I extract the BLE stack from the application project and transport it to that bootloader, leaving everything untouched?

I ask for kind help.

 

BR

F

0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Sorry for the delayed response. If you want to change the BLE component from your application project to bootloader project, you can first save the BLE component configurations as shown in attached image. And, open the BLE component in Bootloader project and load these configurations. 

SW2 are used as a trigger to enter bootloader mode. Please refer to the function BootloaderSwitch() in the code, this function polls SW2 button and if it is pressed - shedules bootloader project launch. If your project has some other mechanism to enter bootloader mode, then you can avoid using the SW2.

Please let me know if i'm missing anything. 

Thanks,

P Yugandhar.

View solution in original post

0 Likes
6 Replies
Fpoli
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi

any info about..

BR

f

0 Likes
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello, 

Could you please refer to the "BLE_OTA_FixedStack_Bootloader" and "BLE_OTA_FixedStack_Bootloadable" projects from the PSoC Creator ?

In Fixed Stack OTA Bootloader, the purpose of the Bootloader project is to replace a bootloadable image on the device with an image sent OTA by the Bluetooth protocol.
The bootloadable project uses BLE APIs implemented in the bootloader part of the memory

Thanks,

P Yugandhar.

0 Likes

Hi Yugandhar, thanks for your reply.

I have read AN97060, all well described, I am working on a project which is not "bootloadable", and I have to do these steps (AN97060 page 17):

If the bootloadable project of your choice already contains a BLE Component, then:
a. Replace the BLE Component present in the BLE_OTA_FixedStack_Bootloader01 project with the BLE Component from your bootloadable project.

b. Add and configure the bootloader service in the existing BLE Component (see Adding Bootloader Service).

c. Remove the BLE Component from the bootloadable project schematic.
By replacing the BLE component, some of the services/profiles related code might have to be removed or added, to prevent compile time errors, depending on the new BLE component configuration.

 

Everything ok, but I need help to understand how to extract the BLE Component from the original application project, to be brought into the new OTA bootloader project without altering the operation of the application project, which I have not developed and which I cannot modify.

I don't know how to physically extract the code, libraries or what else, to get the BLE Component into the bootloader project.

For me the point a. on page 17 it is not clear how to do this in the "real world.."😬

Other information I need is how I can start the bootloader if I don't have the button (SW2 for example) to give the GO to the firmware update ..

Thanks, I hope you can help me as I have difficulty not having developed the original application project myself.

 

BR

f

 

 

 

0 Likes
Fpoli
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi, can someone help me on this:

a. Replace the BLE Component present in the BLE_OTA_FixedStack_Bootloader01 project with the BLE Component from your bootloadable project.

How to do it in a real project?

 

BR

f

0 Likes
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Sorry for the delayed response. If you want to change the BLE component from your application project to bootloader project, you can first save the BLE component configurations as shown in attached image. And, open the BLE component in Bootloader project and load these configurations. 

SW2 are used as a trigger to enter bootloader mode. Please refer to the function BootloaderSwitch() in the code, this function polls SW2 button and if it is pressed - shedules bootloader project launch. If your project has some other mechanism to enter bootloader mode, then you can avoid using the SW2.

Please let me know if i'm missing anything. 

Thanks,

P Yugandhar.

0 Likes

Hello,

very thanks for your reply. I try, and update you.

BR

Francesco

0 Likes