Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > Bootloader programming

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Bootloader programming
Moderator:
ANCY

Post Reply
Follow this topic



Bootloader programming

Vardae posted on 17 Dec 2012 5:42 AM PST

1 Forum Post

 Hi 

I have a bootloader in my project , I'm using this to upgrade my firmware of my project over the air and i'm able to successfully do it. My project receives the hex code over the air using GSM/GPRS Modem which is then stored in an external memory EEPROM. After receiving the code completely it calls the   Bootloadable_1_Load(); function. Tough i'm able to receive the ed hex file over the air and re-program the device on the field, Sometime if the code gets corrupt the device hangs after programming, How is it possible to recover from this failure, Is there a way to get back to the previously  running code 




Re: Bootloader programming

danaaknight posted on 17 Dec 2012 05:53 AM PST
Top Contributor
1773 Forum Posts

Not being a bootloader expert I assume in that environment bootloader must

have at minimum checksum or CRC of file to be programmed. Then recovery

would be based on successfull completion or non-completion of a comparison

of these checks.

 

If no checks like this are done and bootloader kernal becomes corrupt, you are

hosed.

 

Regards, Dana.



Re: Bootloader programming

Bob Marlowe posted on 17 Dec 2012 07:10 AM PST
Top Contributor
1768 Forum Posts

Besides the checksum Dana suggested the question may arise WHERE the error comes from and to act accordingly.

Hex-file currupt BEFORE transmission. Can be detected by programming a sample.

Hex-Data corrupt after transmission into target eeprom: The eeprom must be checked for a valid checksum that includes checking for multiple errors before attempting to program the target. This would require a change to the bootloader to check the eeprom. Re-transmission will help out of this error.

Programming of Bootloadable fails. When up to this point the data is correct but (only) the programming fails we have to consider tha a re-programming with any other code would fail as well. A new hardware seems to be requiterd.

 

You will have to check for each stage in your transmission chain for possible data corruption and act accordingly. With the Help of your PSoCs CPU the proof-reading of the data can be done before the bootloadable is replaced.

 

Bob

 



Re: Bootloader programming

PSoC Rocks posted on 22 Dec 2012 02:17 AM PST
Top Contributor
128 Forum Posts

 One option is to go for Multi-app Bootloading when you face issue while bootloading but not on reception & storing on EEPROM.

Other option if the size of the code is more than 32KB (half of PSoC 5LP flash size) is to use two external EEPROMs - one for storing the old version of firmware and other for storing the new version of the firmware. If you face any issues on bootloading the device with the new version of the firmware, then you can write a logic in Bootloader to switch to 2nd EEPROM which still contains the old version of the firmware.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20