I've been working on a weird problem since yesterday and today I discovered that it's when I try to use any of the kv_* functions. For a while I thought it was a bug in my IDE environment but I just tried a different Giga R1 board and everything runs fine on it with the exact same sketch.
My current working theory is that the kv flash storage area has become corrupt in a peculiar way as to cause immediate crashes (4 short, 4 long flashes from the red LED) whenever I try to use any of the kv store api functions.
To test this I need to know the memory start address and size of the kv_store flash storage area so that I can erase it with an external programmer. Problem is, I can't seem to find it anywhere online. Does anybody know what it is or how to find it for my board?
[EDIT/]
I've already tried burning the bootloader, 5 times now.
I'm using an older version of the "Arduino Mbed OS Giga Boards" library for compatibility with an older version of the "lvgl" library, that, for various reasons I'm forced to use due to unacceptable issues with the latest "lvgl" version.
To recover from this I had to do a full chip reset/erase with the STM32CubeProgrammer (because the version of the dfu-util.exe is older and can't force an erase apparently) and then reflash/burn the bootloader and redo the WiFi stuff. After that the board seems to work fine.
Put the board into DFU mode by holding the BOOT0 button and hitting RST button, then release the BOOT0 button.
Open STM32CubeProgrammer and select the second tab (on the left side): "Erasing & Programming"
Select "USB" for the connection configuration and then select the port (mine had only one available labeled "USB1").
Hit the Connect button.
Select the "Erase flash memory" tab.
Click the "Full chip erase" button and then confirm the erasure at the prompt. This will take about 10-15 seconds to complete. You should receive a popup message saying it was successful.
Put the board back into DFU mode again (see Step 1).
Open a cmd prompt and enter/paste the following command (change the version numbers where applicable): "%LOCALAPPDATA%\Arduino15\packages\arduino\tools\dfu-util\0.10.0-arduino1\dfu-util" --device ,0x0483:0xdf11 -D "%LOCALAPPDATA%\Arduino15\packages\arduino\hardware\mbed_giga\4.1.5\bootloaders\GIGA\bootloader.bin" -a0 --dfuse-address=0x8000000
Reset the board by hitting the RST button.
Close the cmd prompt.
From the Arduino IDE compile and upload the example sketch "WiFiFirmwareUpdater" found in File->Examples->STM32H747_System. You can monitor the serial output progress, should take somewhere between 20-30 seconds to complete.