- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ota_fr test app builds but seg faults when it tries to download. I am testing with a BCM943362WCD4_3 board. When I try and integrate the ota server code into my application it seems to work with respect to running the AP mode and managing the HTTP transactions but it only intermittently reboots correctly and even when it does the code has not been written properly. I added some debug printf's and it seems that the sflash inteface is not reading/writing properly because it reads an app_header.count = 0 and this causes wiced_apps_get_physical_address() to fail, which ultimatley causes the process_upgrade_chunk() to fail, even though it's not inidicated in the WICED console output. Any help would be appreciated!
(1) Log except from my application runing the wiced OTA server(note that this log as the augmented debug output I added) :
Error#1:
============
Network ready IP: 192.168.10.1
Error setting application size!!
current_size: 0, file_size: 461632
Error setting application size!!
current_size: 0, file_size: 461632
Error setting application size!!
current_size: 0, file_size: 461632
Error setting application size!!
current_size: 0, file_size: 461632
Error setting application size!!
current_size: 0, file_size: 461632
Error setting application size!!
current_size: 0, file_size: 461632
Error setting application size!!
current_size: 0, file_size: 461632
Error setting application size!!
current_size: 0, file_size: 461632
Error setting application size!!
current_size: 0, file_size: 461632
Error setting application size!!
current_size: 0, file_size: 461632
Error#2:
============
Writing chunk 449 of size 1024 from offset 458752
wiced_apps_write: offset: 0x1800, app_header.count: 0x0
process_upgrade_chunk: Error writing chunk (err = 4)
Writing chunk 450 of size 1024 from offset 459776
wiced_apps_write: offset: 0x1800, app_header.count: 0x0
process_upgrade_chunk: Error writing chunk (err = 4)
Writing chunk 451 of size 832 from offset 460800
wiced_apps_write: offset: 0x1800, app_header.count: 0x0
process_upgrade_chunk: Error writing chunk (err = 4)
Uploaded file size = 461632
(2) Log output when trying to build and download ota_fr:
root@ubuntu:/home/confocus/WICED/WICED-SDK-3.3.0# ./make clean
Cleaning...
Done
root@ubuntu:/home/confocus/WICED/WICED-SDK-3.3.0#
root@ubuntu:/home/confocus/WICED/WICED-SDK-3.3.0#
root@ubuntu:/home/confocus/WICED/WICED-SDK-3.3.0#
root@ubuntu:/home/confocus/WICED/WICED-SDK-3.3.0# ./make snip.ota_fr-BCM943362WCD4 download download_apps run
Making config file for first time
+-----------------------------------------------------------------------------------------------------+
| IMPORTANT NOTES |
+-----------------------------------------------------------------------------------------------------+
| Wi-Fi MAC Address |
| The target Wi-Fi MAC address is defined in <WICED-SDK>/generated_mac_address.txt |
| Ensure each target device has a unique address. |
+-----------------------------------------------------------------------------------------------------+
| MCU & Wi-Fi Power Save |
| It is *critical* that applications using WICED Powersave API functions connect an accurate 32kHz |
| reference clock to the sleep clock input pin of the WLAN chip. Please read the WICED Powersave |
| Application Note located in the documentation directory if you plan to use powersave features. |
+-----------------------------------------------------------------------------------------------------+
Building Bootloader
Building Serial Flash Loader App
Making config file for first time
+-----------------------------------------------------------------------------------------------------+
| IMPORTANT NOTES |
+-----------------------------------------------------------------------------------------------------+
| Wi-Fi MAC Address |
| The target Wi-Fi MAC address is defined in <WICED-SDK>/generated_mac_address.txt |
| Ensure each target device has a unique address. |
+-----------------------------------------------------------------------------------------------------+
| MCU & Wi-Fi Power Save |
| It is *critical* that applications using WICED Powersave API functions connect an accurate 32kHz |
| reference clock to the sleep clock input pin of the WLAN chip. Please read the WICED Powersave |
| Application Note located in the documentation directory if you plan to use powersave features. |
+-----------------------------------------------------------------------------------------------------+
Compiling App_SFlash_write
Compiling Platform_BCM943362WCD4
Compiling WWD_NoOS_Interface
Compiling WWD_NoNS_Interface
Compiling Lib_SPI_Flash_Library_BCM943362WCD4
Compiling WWD_for_SDIO_NoOS
Compiling Lib_Wiced_RO_FS
Compiling STM32F2xx
Compiling Lib_TLV
Compiling common_GCC
Compiling STM32F2xx_Peripheral_Drivers
Finished Building Bootloader
Processing resources
Creating security credentials
Compiling Lib_Ring_Buffer
Compiling STM32F2xx_Peripheral_Libraries
Making DCT image
Compiling App_OTA_fr_run
Compiling Platform_BCM943362WCD4
Compiling NetX_Duo
Compiling WICED
Making waf_sflash_write-NoOS-NoNS-BCM943362WCD4-SDIO.elf
waf_sflash_write-NoOS-NoNS-BCM943362WCD4-SDIO
----------------------------------|---------|---------|
| | Static |
Module | Flash | RAM |
----------------------------------+---------+---------|
App | 0 | 21130 |
Host MCU-family library | 0 | 12034 |
Interrupt Vectors | 0 | 388 |
libc | 0 | 548 |
platform | 0 | 972 |
Ring_Buffer | 0 | 34 |
SPI_Flash_Library_BCM943362WCD4 | 0 | 792 |
Startup Stack & Link Script fill | 0 | 486 |
WWD | 0 | 144 |
----------------------------------+---------+---------|
TOTAL (bytes) | 0 | 36528 |
----------------------------------|---------|---------|
Making waf_sflash_write-NoOS-NoNS-BCM943362WCD4-SDIO.bin
Build complete
Finished Building Serial Flash Loader App
Compiling Lib_OTA_Server
Compiling Lib_SPI_Flash_Library_BCM943362WCD4
Compiling WWD_ThreadX_Interface
Compiling WICED_ThreadX_Interface
Compiling WWD_NetX_Duo_Interface
Compiling WICED_NetX_Duo_Interface
Compiling Supplicant_BESL
Compiling Lib_DNS
Compiling WWD_for_SDIO_ThreadX
Compiling Lib_Wiced_RO_FS
Compiling STM32F2xx
Compiling Lib_DHCP_Server
Compiling Lib_Linked_List
Compiling Lib_base64
Compiling Lib_TLV
Compiling Lib_crypto_open
Compiling common_GCC
Compiling STM32F2xx_Peripheral_Drivers
Compiling Lib_Ring_Buffer
Compiling STM32F2xx_Peripheral_Libraries
Making snip_ota_fr-BCM943362WCD4.elf
Making snip_ota_fr-BCM943362WCD4.bin
snip_ota_fr-BCM943362WCD4
----------------------------------|---------|---------|
| | Static |
Module | Flash | RAM |
----------------------------------+---------+---------|
App | 293 | 0 |
base64 | 519 | 0 |
crypto_open | 50125 | 0 |
DHCP_Server | 1510 | 132 |
DNS | 64 | 44 |
Host MCU-family library | 14093 | 2740 |
Interrupt Vectors | 388 | 0 |
libc | 34815 | 3136 |
Networking | 4534 | 14909 |
NetX-Duo - Interfaces & Stacks | 0 | 16 |
OTA_Server | 8283 | 684 |
Other | 43276 | 535 |
Packet Buffers | 0 | 23142 |
platform | 1116 | 168 |
RAM Initialisation | 2424 | 0 |
resources | 16 | 0 |
Ring_Buffer | 94 | 0 |
SPI_Flash_Library_BCM943362WCD4 | 760 | 0 |
Startup Stack & Link Script fill | 63 | 10 |
Supplicant - BESL | 15226 | 504 |
ThreadX | 8612 | 396 |
Wi-Fi Firmware | 210412 | 0 |
WICED | 2840 | 616 |
WWD | 12957 | 1604 |
----------------------------------+---------+---------|
TOTAL (bytes) | 409996 | 48636 |
----------------------------------|---------|---------|
Downloading Bootloader ...
Segmentation fault (core dumped)
make: *** [main_app] Error 139
Solved! Go to Solution.
- Labels:
-
Over The Air Updates (OTA)
-
SDK 3.x
-
SPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First you should replace your tools/Linux??/common/make with your system make to fixed the Segmentation fault under Linux!
Then build the ota_fr with download_apps to download the ota_fr into external flash include APPS_LUT !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry,
The module is: BCM943362WCD4_3
The eval board is: BCM943362WCD4_EVB (Rev 1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Could you make sure your makefile is as follows:
snip.ota_fr-BCM943362WCD4 download download_apps run
It is important to include "download_apps" in your makefile name.
Thanks,
Arsh Buch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First you should replace your tools/Linux??/common/make with your system make to fixed the Segmentation fault under Linux!
Then build the ota_fr with download_apps to download the ota_fr into external flash include APPS_LUT !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is correct, but a little more detail would have been helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ota_fr demo app build fails when the 'download_apps' option is passed with Broadcom's version of make, located in this directory:
.../WICED-SDK-3.3.0/tools/common/Linux32
FIX: replace Broadcom make with the native make:
mv make make.orig && ln -s /usr/bin/make make
With the above change, the ota_fr test app can be built and downloaded correctly, even with the
download_apps option.. After ota_fr is run,, the DCT image in the external serial flash is updated with application header/location/size information which the OTA process uses. Attempts to perform OTA upgrade will now succeed from either the ota_fr test app or from a user application calling the ota server.