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. my 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.