If I manage (some how) to store my new firmware image at EXTERNAL_FLASH_OTA_ADDRESS defined by
((uint32_t)(EXTERNAL_FLASH_BLOCK_SIZE + EXTERNAL_FLASH_BKP_ADDRESS))
and then start FLASH_Begin(EXTERNAL_FLASH_OTA_ADDRESS); would this work or would this destroy my core and everything attached?
Can I count on the factory reset function of the core in case I fail?
Is the plain firmware bin stored at the mentioned address? Or is some other magic done there? I know the answer is inside the code but it takes time to reverse engineer everything ā and I am not the patient guyā¦
Cheers
We started talking about building a serial firmware loader here that would do what youāre describing. Write some firmware to the OTA flash region, and then tell the bootloader that an OTA flash was ready, so it would reset / replace the firmware.
You should be able to rely on the factory reset image if you overwrite your firmware, and you should be able to count on the bootloader if you need to get back into DFU mode (flashing yellow) to load new factory reset firmware if you replace the wrong thing. Unless you delete the bootloader (which is really hard to do without the ST-Link necessary to put it back on again) you should be safe to hack away!
The factory reset image is stored at 0x20000, so donāt overwrite that and you should be fine.
Is still some one interested in having such an OTA Push? If yes I could upload my code to githubā¦
Right now, I do not have an account. So, if no one is interested, I would avoid to create an account and to spread more of my data over the webā¦
My solution is working. It is pritty simple but nead! Its my first version things like a secure communication channel will follow!
Well if you mean by cloud compile that you compile the firmware locally using the provided make script. Then, as a next step, you push the ābinā img. directly from your build station via internet/wifi to your core without any cloud or usb connection⦠then yes i mean ācloud compileā
Hey,
there we go! This is my first upload! I will add more description the next daysā¦
I plan also to upload an example program for the client side⦠but I need to clean it first; at least a littleā¦
Currently, the connection between your workstation (where you compile your code) and the core is not secured. This is the first thing I will contribute next in the near futureā¦
I have not found the time to come up with new documentation. But i uploaded a small client example.
It is a wild hack and it is written for windows, but it is working. To run it, you need to enter the IP and the name of the img⦠The img. must be inside the very same directory.
I will update the documentation soon.
And a very simple example to add the OTAP the core will also follow!
Hint:
void loop()
{
OTAP push;
push.performOTA();
}
ā¦will do the trick on the core side. (For the example client, this is the only requirement on the core sideā¦