Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

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

PSoC™ 4 Forum Discussions

PaSw_2578827
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

I am working on a project that communicates via TCP/IP and I'm trying to implement a firmware upgrade functionality. My current approach is to have a dual application setup with a bootloader that operates as a launcher only (no communication) and an application that handles the network communication (this already exists for my actual application), this application will also have to handle the actual loading of the firmware from the host server into flash (this is the part I'm working on now).

Are there any examples that work like this? It seems as though a lot of my task involves pulling out all of the existing bootloader generated source, cleaning it up and compiling it into my application (adjusting the communication interface stuff). I don't think I can incorporate the bootloader into my project and have it operate as a runtime component rather than an actual bootloader, is that correct? I'm basically implementing the following data flow (Ref: AN86526 Appendix C) but built on top of the TCP/IP communication interface, am I going in the right direction or is there an easier way?

bootloader_flow.png

0 Likes
1 Solution

Hello Patrick,

It is possible to add bootloading functionality to a user application (without creating stand alone bootloader). This is defined through incorporation of a Bootloader Component, a Bootloadable Component, and a communication Component. This configuration is called Combination Project. As you have communication protocol already setup in your project, you can add a Bootloader component and use the Custom Interface instead of pulling out the bootloader functions.

Thus, target flash will consist of launcher, combination project 1, combination project 2. One application is loaded into target flash by other combination project. Please let me know if it helps.

Best Regards,

Geona Mary

View solution in original post

0 Likes
5 Replies
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

Hello Patrick,

Bootloader supports Custom Interface option which allows to add bootloader support to any existing communication component. As you have the network application up and running, you need to implement functions to support bootloading. They are used by the bootloader for setting up the communications interface and relaying packets back and forth with the host. Please make use of the details in Section 10.1.2 of PSoC Creator Component Author Guide and Custom communication interface support for PSoC 3/5 bootloaders

Best Regards,

Geona Mary

0 Likes

This would mean the full communication would need to be supported in the bootloader correct? And I would have to exit the main program, enter the bootloader, reopen the network connection and setup a new socket to my server in order to receive the firmware. This is not desirable behaviour and I don't really want the bootloader to have to support that entire communication protocol as it's quite an involved process to setup the network and register with server that I will be communicating with. I'd prefer the main application to support reading the firmware over the existing open socket to the server, with the existing command infrastructure that has already been written into the application and simply write it to flash.

0 Likes

Hello Patrick,

It is possible to add bootloading functionality to a user application (without creating stand alone bootloader). This is defined through incorporation of a Bootloader Component, a Bootloadable Component, and a communication Component. This configuration is called Combination Project. As you have communication protocol already setup in your project, you can add a Bootloader component and use the Custom Interface instead of pulling out the bootloader functions.

Thus, target flash will consist of launcher, combination project 1, combination project 2. One application is loaded into target flash by other combination project. Please let me know if it helps.

Best Regards,

Geona Mary

0 Likes

This sounds like what I want, are there any example projects of this?

0 Likes

Hello Patrick,

There is no code example on Launcher+combination project with custom communication interface. Please make use of this Knowledge Base Article Custom communication interface support for PSoC 3/5 bootloaders

Best Regards,

Geona Mary

0 Likes