arduino-pico/ota
Earle F. Philhower, III 33694a1fcc
Add RP2350 support, new boards (#2337)
* Migrate RP2040-specific bits to separate dirs
* Add chip to boards.txt, isolate RP2040-specifics
* Add RP2350 boot2, bearssl, and libraries
* Platform.IO adjust to new paths
* Add RPIPICO2 JSON for P.IO
* Add RP2350 to Platform.io
* Update Picotool and OpenOCD for all hosts
* Use picotool to generate UF2s
* Build separate libpico blobs serially
Thanks for the review, @aarturo182 !
* Add RP2350 to CI
* Allow Ethernet/WiFi building for RP2350
* Update Adafruit TinyUSB to latest
* Test skip fix
* Make RP2350 Picotool work. update USB ID
* Fix EEPROM/FS flash locations
RP2350 adds a 4K header sector to the UF2, meaning we have 4K less total
flash to work with.  Adjust all constants appropriately on the RP2350.
* Adds ilabs board and PSRAM support. (#2342)
* Adds iLabs boards and basic PSRAM support.
* Make PSRAM come up as part of chip init
Uses SparkFun psram.cpp to set timings on clocks which are defined in the
variant file.  Prefix things with RP2350_PSRAM_xxx for sanity.
Users don't need to call anything, PSRAM "just appears".  Still need to
add in malloc-type allocation.
* Add board SparkFun ProMicro RP2350
Same pinout as the SparkFun ProMicro RP2040 with 8MB PSRAM and RP2350
* Add TLSF library for use w/PSRAM
Fork of upstream to include add'l C++ warning fixes.
* Add pmalloc/pcalloc to use PSRAM memory
free() and realloc() all look at the pointer passed in and jump to the
appropriate handler.  Also takes care of stopping IRQs and taking the
malloc mutex to support multicore and FreeRTOS (when that workd)
* Fix BOOTSEL for RP2350
* Add simple rp2040.idleOtherCore test
* Add Generic RP2350 and clean up PSRAM menus
Commercial boards now only have 1 size PSRAM, no need to have menu for them.
* Add Solder Party RP2350 Stamp boards (#2352)
* Add PSRAM heap info helpers, mutex lock mallinfo
* Add RP2350 docs
* FreeRTOS and OTA unsupported warnings for RP2350
2024-08-25 11:21:46 -07:00
..
uzlib@6d60d651a4 Add OTA update support (#711) 2022-08-12 00:26:51 -07:00
CMakeLists.txt Add RP2350 support, new boards (#2337) 2024-08-25 11:21:46 -07:00
make-ota.sh Add RP2350 support, new boards (#2337) 2024-08-25 11:21:46 -07:00
memmap_ota_rp2040.ld Add RP2350 support, new boards (#2337) 2024-08-25 11:21:46 -07:00
memmap_ota_rp2350.ld Add RP2350 support, new boards (#2337) 2024-08-25 11:21:46 -07:00
ota.c Enable use of uninitialized_ram() macro (#1199) 2023-02-16 17:59:15 -08:00
ota_clocks.c Add RP2350 support, new boards (#2337) 2024-08-25 11:21:46 -07:00
ota_command.h Add OTA update support (#711) 2022-08-12 00:26:51 -07:00
ota_lfs.c Enable use of uninitialized_ram() macro (#1199) 2023-02-16 17:59:15 -08:00
ota_lfs.h Add OTA update support (#711) 2022-08-12 00:26:51 -07:00
pico_sdk_import.cmake Add OTA update support (#711) 2022-08-12 00:26:51 -07:00
README.md Update README.md 2022-09-04 11:38:58 -07:00

Arduino-Pico OTA Bootloader

This directory contains a small "stage 3" bootloader (after the boot ROM and the boot2.S flash configuration) which implements a power fail safe, generic OTA method.

The bootloader is built here into an .ELF, without boot2.S (which will come from the main app), configured to copy itself into RAM (so that it can update itself), and included in the main applications. Exactly 12KB for all sketches is consumed by this OTA bootloader.

It works by mounting the LittleFS file system (the parameters are stored by the main app at 0x3000-16), checking for a specially named command file. If that file exists, and its contents pass a checksum, the bootloader reads from the filesystem (optionally, automatically decompressing GZIP compressed files) and writes to application flash.

Every block is checked to see if it identical to the block already in flash, and if so it is skipped. This allows silently skipping bootloader writes in many cases.

Should a power failure happen, as long as it was not in the middle of writing a new OTA bootloader, it should simply begin copying the same program from scratch.

When the copy is completed, the command file's contents are erased so that on a reboot it won't attempt to write the same firmware over and over. It then reboots the chip (and re-runs the potentially new bootloader).

If there is no special file, or its contents don't have a proper checksum, the bootloader simply adjusts the ARM internal vector pointers and jumps to the main application.

The files in the LittleFS filesystem can come over WiFi, over an Ethernet object, or even over a serial port.