cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

New Contributor

Hallo Community!

   

I have a question regarding the bootloading support of the EZ-Serial BLE Firmware Platform (Firmware):

   

Currently I am working with the development board CY8CKIT-042-BLE (Devboard) mounted with an CYBLE-214009-EVAL board (Appboard).

   

After loading the Firmware to the Appboard with the PSoC Progammer I can send the Appboard into the bootloader section via CySmart 1.2 by writing "0200" to handler 001C and "2F524446552C4D310A" to handler 001B. 

   

If I now want to update Stack and Application the Stack gets updated as intended but then the automatic connection establishment for the Application update fails. I came to the conclusion, that the Stack is not advertising. It stops in the Function "AfterImageUpdate();".

   

The Stack and the Application were developed according to AN97060 for Upgradable Stack OTA Bootloader.

   

If I compile and load the code with PSoC Creator 4.0 directly to the Appboard and carry out a Stack and Application update afterwards everything works.

   

I hope you can help me on that one 😉

   

 

   

Ben

0 Likes
Reply
1 Solution
Anonymous
Not applicable

Hello Ben,

   

The most likely issue in this case concerns the "loader" project that you compiled your new target firmware image against. The EZ-Serial platform implements the "UpgradableStack" architecture demonstrated in one of the PSoC Creator example project sets, but in order for this to work correctly, all three projects (launcher, stack, app) must be built using the correct bootloader -> bootloadable chaining. In short, this means:

   
        
  1. The "loader" project has one Bootloader component
  2.     
  3. The "stack" project has:     
            
    1. One Bootloadable component referencing the "loader" project's .hex/.elf set
    2.       
    3. One Bootloader component
    4.      
  4.     
  5. The "app" project has one Bootloadable component referencing the "stack" project's .hex/.elf set
  6.    
   

If you perform a stack upgrade using a stack image compiled against a different loader image, it won't boot correctly because the stack and loader projects aren't correlated correctly.

   

This is a bit of a catch-22 at the moment because there is no place (yet) to download the EZ-Serial launcher binary images. Part of the reason for this is that the OTA bootloader within EZ-Serial is primarily intended to facilitate future upgrades of EZ-Serial specifically, rather than generically switching to a different project. However, there is no technical limitation as long as you are able to use the correct launcher as a foundation.

   

I've attached a .zip file with the .hex/.elf files for your target module (CYBLE-214009-00) to test. Download and extract the two images wherever you prefer, then update the stack project's Bootloadable component to point to those files instead of your original. Then recompile both your stack project and app project, reflash EZ-Serial (via SWD) to return to the original state, and finally attempt the full OTA update process again.

   

(If I have made incorrect assumptions about what you are trying to do, please let me know and I'll revise my instructions.)

View solution in original post

0 Likes
Reply
4 Replies
Anonymous
Not applicable

Hello Ben,

   

The most likely issue in this case concerns the "loader" project that you compiled your new target firmware image against. The EZ-Serial platform implements the "UpgradableStack" architecture demonstrated in one of the PSoC Creator example project sets, but in order for this to work correctly, all three projects (launcher, stack, app) must be built using the correct bootloader -> bootloadable chaining. In short, this means:

   
        
  1. The "loader" project has one Bootloader component
  2.     
  3. The "stack" project has:     
            
    1. One Bootloadable component referencing the "loader" project's .hex/.elf set
    2.       
    3. One Bootloader component
    4.      
  4.     
  5. The "app" project has one Bootloadable component referencing the "stack" project's .hex/.elf set
  6.    
   

If you perform a stack upgrade using a stack image compiled against a different loader image, it won't boot correctly because the stack and loader projects aren't correlated correctly.

   

This is a bit of a catch-22 at the moment because there is no place (yet) to download the EZ-Serial launcher binary images. Part of the reason for this is that the OTA bootloader within EZ-Serial is primarily intended to facilitate future upgrades of EZ-Serial specifically, rather than generically switching to a different project. However, there is no technical limitation as long as you are able to use the correct launcher as a foundation.

   

I've attached a .zip file with the .hex/.elf files for your target module (CYBLE-214009-00) to test. Download and extract the two images wherever you prefer, then update the stack project's Bootloadable component to point to those files instead of your original. Then recompile both your stack project and app project, reflash EZ-Serial (via SWD) to return to the original state, and finally attempt the full OTA update process again.

   

(If I have made incorrect assumptions about what you are trying to do, please let me know and I'll revise my instructions.)

View solution in original post

0 Likes
Reply
New Contributor

Hello Jrow!

   

Thank you for your fast response! You totally got my point. I already guessed that it had something to do with the launcher/loader but I did not get what 😉

   

Thanks a lot I'll try the solution you suggested and keep you up to date about the progress here.

   

Can you tell me the main difference between the launcher from the EZ-Seial and the one of the example project for the OTA Upgradeable Stack bootloader?

   

Ben

0 Likes
Reply
New Contributor

Hello again,

   

Just tried your solution! Worked fine! You cannot imagine how much time you saved me 😉

   

Best regards,

   

Ben

0 Likes
Reply
Anonymous
Not applicable

Hi Ben,

   

I'm glad to hear that everything worked as expected, and especially that you saved a lot of time! The difference between launcher projects mainly concerns what debug code options and output methods are available, since EZ-Serial requires none of these things for production. The core functionality of the launcher (i.e. what the bootloader component does) is basically identical.

0 Likes
Reply