Problems with OTA2: flashing device and firmware_reset

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

cross mob
Anonymous
Not applicable

Hi there,

I would like to implement an OTA2 update service for an embedded device which has the BCM943907_QUADRO module on it. Within the WICED SDK directory there is a PDF which explains a lot of the OTA2 procedure. Sadly I can not flash the board with the compiled image from that tutorial.

I was very happy to flash the device with the documentation written on thread OTA2 Update for SDK-3.7.0  because there are different calls for the makefiles (which could have an effect on the actual software built I guess) I tried both ways for getting the OTA2 working. Therefore the PDF given by the WICED SDK was outdated but the revision log didn't say so. Please change the PDF contents in a future revision to avoid complication! Especially 14.2 (how to build ota2_extract) was my guideline. Even the comments within the ota2_extract.c and ota2_example.c were not helpful

Nevertheless I was able to build an OTA2 update support with the required functionality. The soft ap mode worked fine and I was able to upload the snip.scan example to my board

Now there are new errors on the current progress:

I've build the ota2_extract and ota2_example and was able to flash the board. After updating to the snip.scan example I wanted to get into the firmware reset state of the bootloader so I hold the defined reset pin for around 11 seconds. Then I've got this output on the command line:

Hi, I'm the OTA2 extraction app (ota2_extract).

Extract the Factory Reset!

Do not copy over Saved DCT.

Extract From Factory Reset FAILED!

Extract done - REBOOTING

Hi, I'm the OTA2 extraction app (ota2_extract).

Extract the Factory Reset!

Do not copy over Saved DCT.

Extract From Factory Reset FAILED!

Extract done - REBOOTING

...

...(repeating forever)

Did I forget to compile a firmware reset image and flash it to the board? How can I achieve this? What are the available makefile calls? What is the correct syntax to create some failsafe images?

Thanks in advance

Thomas

PS: In a prior question I asked something similar (Struggling creating a factory reset app ) but to be honest I hadn't heard of the OTA2 Update for SDK-3.7.0  thread at that time.

0 Likes
1 Solution
PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Hi Thomas,

When the OTA2_example application is build by making the target as "snip.ota2_example-<platform> download ota2_image run", the example get is build and downloaded to the current application area of your device. Now if hold the reset button for >10 sec, the ota2_extract application comes into picture and extracts the factory reset application. Now by default the factory reset application is scan application which should run.

In your case the factory reset image is not valid or present and so extraction is getting failed. You can proceed by downloading a factory reset image before downloading ota2_example application. Section 10 of the OTA document refers to building an ota2 factory reset image + dowmload to FALSH ota2 factory reset Area at the end of build. To generate+ download a factory reset image, make the target as follows:

<application>-<platform> ota2_factory_download

Failsafe application: If the device resets while OTA2 extraction, the device could be in an unknown state. There is a OTA2 failsafe application which gets loaded with OTA2_bootloader that can restore the system to valid ota2 image in staging area or factory reset image.

If your device resets or power cycles during factory reset image extraction, the failsafe application will take over and extract the factory reset image on power up.

View solution in original post

1 Reply
PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Hi Thomas,

When the OTA2_example application is build by making the target as "snip.ota2_example-<platform> download ota2_image run", the example get is build and downloaded to the current application area of your device. Now if hold the reset button for >10 sec, the ota2_extract application comes into picture and extracts the factory reset application. Now by default the factory reset application is scan application which should run.

In your case the factory reset image is not valid or present and so extraction is getting failed. You can proceed by downloading a factory reset image before downloading ota2_example application. Section 10 of the OTA document refers to building an ota2 factory reset image + dowmload to FALSH ota2 factory reset Area at the end of build. To generate+ download a factory reset image, make the target as follows:

<application>-<platform> ota2_factory_download

Failsafe application: If the device resets while OTA2 extraction, the device could be in an unknown state. There is a OTA2 failsafe application which gets loaded with OTA2_bootloader that can restore the system to valid ota2 image in staging area or factory reset image.

If your device resets or power cycles during factory reset image extraction, the failsafe application will take over and extract the factory reset image on power up.