Hi there,
This topic coul be part of a BLOG POST called OTA updates of a Nordic Device I think
Btw, my issue is this: Handle an OTA update of a Nordic Device, getting the firmware from cloud.
My actual system is composed by:
- ESP32 with AT-COMMANDS FW, which can GET from HTTP something, for example a .bin and store into its internal memory
- nRF52840 DK (it could be changed into 5340_DK in next months but we can deal on 52840 for now), which is connected to ESP32 and send over UART the AT-Commands for controlling ESP32
- nRF52840 Dongle as a Sensor System (BUT for NOW I'm not interested in OTA over BLE)
on every nRF52840 I'm using NCS 2.1.0, VScode extension.
So, basically, I have to implement theese steps:
1) COMPILE the nordic project in order to be compatible with an OTA update (I don't know if it's necessary or just pick up .bin created by nRF connect for VSCode extension)
2) get this .bin from HTTP server using ESP32, and using UART it'll be received by nRF52840
3) once I have the .bin into RAM of nRF52840, I have to implement the ( ? CRC or Md5 ) to check if the .bin is okay and not corrupted during download
4) Copy to the internal FLASH memory of nRF52840_DK the .bin in a region empty (address for example 0x30000000)
5) Restart the microcontroller automatically,
6) enter a bootloader stage which picks-up from 0x30000000 and store into the program code memory zone
7) once it's finished to copy, start the new application
What I have to understand is how to implement theese parts, or if there's a quicker method to implement an update over the air in a semi-automatic way.
I suppose I have to implement an application part for points 1-5 and a bootloader for swapping the .bin
Can we make together a guide for this ? Open a blog post in order to give help to future guys who will be here at my same point, trying to update their magic devices?
Thank you guys, you rock it with your support!