-
Notifications
You must be signed in to change notification settings - Fork 1
flashing
To flash the Atrium firmware the ESP32 must be brought into flashing mode. For the RGB-Control board this is done, by shorting the boot jumper and pressing the reset button before every flash command.
Before flashing Atrium the first time, it is advice to perform a full flash erase on the device. Be sure to have a backup of the flash in case you want to restore the original flash after testing Atrium. To erase the flash execute the following command:
esptool erase_flash
You can either perform a full flash of all partitions with one command or flash the individual partitions with separate commands as show below. For a full flash of all partitions execute the follwing command:
esptool write_flash 0x0000 boot-esp32@0x0000.bin 0x8000 ptable-esp32@0x8000.bin 0x100000 atrium.bin
The separate flash commands are as follows:
- setup the partition table (only needed once)
esptool write_flash 0x8000 ptable-esp32@0x8000.bin
- bootloader (only needed if a bootloaded update is required)
esptool write_flash 0x0000 boot-esp32@0x0000.bin
- NVS The NVS partition saves non-volatile-storage across reboots and power cycles. It stores all configuration data. This enables Atrium firmaware updates to be performed independet of the configuration, and therefore keep the configuration persistent and share a single application image with multiple different hardware and software setups.
The partition contents can be created with the atriumcfg tool or just initalized empty, if you want to perform the setup on the target. Below is an example of how to create the NVS partition image.
# set your IDF path - e.g.
$ export IDF_PATH=/work/idf-esp32
# start atriumcfg
$ atriumcfg
# Configure hardware and software in atriumcfg as shown in the next sections.
# Create the partition:
> genpart my-nvs.bin
# exit atriumcfg
> exit
# write nvs partition file to your ESP device
> esptool write_flash 0x9000 my-nvs.bin
- application Write the application image to its location.
esptool write_flash 0x100000 atrium.bin