Adding SUOTA support now the original application will not boot

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
Myken
Offline
Last seen:1 year 8 months ago
加入:2016-07-13 20:06
Adding SUOTA support now the original application will not boot

I was trying to add SUOTA support to my application and it didn't work the first time.
As I was debugging I tried to read the partition table:

cli_programmer /dev/ttyUSB0 read_partition_table
>> No partition table found!!

OK, in the readme_suota.md of the pxp_reporter project I found:
If such partitions were not present on the target device the easiest way to fix this is to erase the existing
partition table sector. The bootloader will recreate it with correct values.

So I did:
cli_programmer /dev/ttyUSB0 chip_erase_qspi

I even did:
cli_programmer /dev/ttyUSB0 erase_qspi 0 4096
"Erasing bootloader area"
and
cli_programmer /dev/ttyUSB0 erase_qspi 0x7F000 4096
"Erasing partition table"
as found in the initial_flash.sh script.

Then:
cli_programmer -b uartboot.bin /dev/ttyUSB0 boot
according to the cli_command readme.md this should load the bootloader into RAM and execute it.

After this I have two problems.

1. cli_programmer /dev/ttyUSB0 read_partition_table still response with >> No partition table found!!
2.米y original application will not boot anymore.

If I do
cli_programmer --prod-id DA14681-01 /dev/ttyUSB0 write_qspi_exec application.bin
the application gets loaded but does not boot.

cli_programmer /dev/ttyUSB0 read_qspi 0 -- 4096
Shows me that the application.bin is loaded but not on addess 0x0 it has been shifted 8 bytes.
The byte sequence that starts at address 0x0 is 0x71 0x51 0x00 0x00 0x80 0x01 0x91 0x28

Any suggestions?
BTW the application.bin (with #define dg_configSUOTA_SUPPORT (0) ) was functional before I tried to add SUOTA support.

Keywords:
Device:
MHv_Dialog
Offline
Last seen:1 month 2 weeks ago
Staff
加入:2013-12-06 15:10
Hi Myken,

Hi Myken,

I have asked our team to reach out to you directly for support.

/MHv

NV_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-07-15 14:58

Hi Myken

Setting just the #define dg_configSUOTA_SUPPORT (0) will not be enough for having the SUOTA supported.

有需要考虑拟议。

  • The FLASH partition layout is different in order to hold the new image which need to be validated, copied to the final position and activationg by the code.
  • Suota中还有一个booter,闪存器执行所有这些任务并加载活动图像

The attached document explains the SUOTA in Chpater 9 and how to build properly a SUOTA aware application. There is also a good ammount of information for the partition table and the flow diagram of the SUOTA and SUOTA booter. It explains in details the process and walk you through that using the existing example applications comming with the SDK.

Please check the chapter 9, follwo the instructions in there and if there are more questions to ask, we will be happy to assist you.

文档也可用https://support.dialog-semicondiondum./system/files/resources/UM-B-056...however you need to get an account to access it. You can apply online athttps://support.dialog-semicondiondum.for an account if you do not have one already.

Regarding the inital 8 bytes you see in the FLASH image, those exist for any project you program to the FLASH and they consist the header needed by the ROM booter in order to identify the type of the image to load from FLASH. These 8 bytes are added automatically by the cpi_programmer tool or the Toolbox (whichever you use for programming the FLASH).

此标题未损坏或更改应用程序图像。ROM Booter预期闪存上的图像中的转换,并在加载其考虑到它的图像时。

Do not worry of these 8 bytes. They have to be there. If they are not the image will not boot.

Best Regards

NV_Dialog.

Myken
Offline
Last seen:1 year 8 months ago
加入:2016-07-13 20:06
Hello Dialog,

Hello Dialog,

Thanks for your answer.
Turns out I had a residue setting (dg_configIMAGE_FLASH_OFFSET) from trying to implement SUOTA, that is why my original application didn't boot when I tried to get back to the starting point. That solved problem 2.

And mysteriously also problem 1. Don't know why but now I can read the partition of the flash.
Thanks for the document I will read it carefully and if I get into trouble I'll open a new topic.
Cheers, Robert.