You are here

Bootloader programming | Cypress Semiconductor

Bootloader programming

Summary: 5 Replies, Latest post by hli on 06 Jun 2013 02:09 AM PDT
Verified Answers: 2
Last post
Log in to post new comments.
Vardae's picture
1 post


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 

user_14586677's picture
7646 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



Regards, Dana.

user_1377889's picture
9300 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.




PSoC Rocks's picture
141 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.

sri4ever's picture
10 posts

hai...i need to work with cy7c67300 controller.iam a new user for this would i write bootloader program for this controller and how would i built the bootloader code into eeprom.please anyone can give me suggestion.

user_78878863's picture
2553 posts

Since the cy7c67300 is an UDB controller, and not a PSoC: you might be better of to ask in the corresponding forums.

Also, please don't hijack an old thread with a new question. You will get better answers when opening a new one instead.

Log in to post new comments.