firmware/variants
geeksville 62a0321c7d
Fixes for #4395: nrf52 flash filesystem reliability (#4406)
* bug #4184: fix config file loss due to filesystem write errors
* Use SafeFile for atomic file writing (with xor checksum readback)
* Write db.proto last because it could be the largest file on the FS (and less critical)
* Don't keep a tmp file around while writing db.proto (because too big to fit two files in the filesystem)
* generate a new critial fault if we encounter errors writing to flash
either CriticalErrorCode_FLASH_CORRUPTION_RECOVERABLE or CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE
(depending on if the second write attempt worked)
* reformat the filesystem if we detect it is corrupted (then rewrite our config files) (only on nrf52 - not sure
yet if we should bother on ESP32)
* If we have to format the FS, make sure to preserve the oem.proto if it exists

* add logLegacy() so old C code in libs can log via our logging

* move filesList() to a better location (used only in developer builds)

* Reformat with "trunk fmt" to match our coding conventions

* for #4395: don't use .exists() to before attempting file open
If a LFS filesystem is corrupted, .exists() can fail when a mere .open()
attempt would have succeeded.  Therefore better to do the .open() in hopes that
we can read the file (in case we need to reformat to fix the FS).
(Seen and confirmed in stress testing)

* for #4395 more fixes, see below for details:
* check for LFS assertion failures during file operations (needs customized lfs_util.h to provide suitable hooks)
* Remove fsCheck() because checking filesystem by writing to it is very high risk, it makes likelyhood that we will
be able to read the config protobufs quite low.
* Update the LFS inside of adafruitnrf52 to 1.7.2 (from their old 1.6.1) to get the following fix:
97d8d5e96a

* use disable_adafruit_usb.py now that we are (temporarily?) using a forked adafruit lib
We need to reach inside the adafruit project and turn off USE_TINYUSB, just doing that
from platformio.ini is no longer sufficient.

Tested on a wio-sdk-wm1110 board (which is the only board that had this problem)

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-08-13 06:45:39 -05:00
..
ai-c3 Generalise SPI pin names (#2970) 2023-11-29 15:51:05 -06:00
betafpv_900_tx_nano Generate the build matrix from the variant files (#3870) 2024-05-12 22:43:47 +02:00
betafpv_2400_tx_micro tidied up, prob broke everything 2024-04-22 16:37:05 +01:00
bpi_picow_esp32_s3 Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
canaryone Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
CDEBYTE_EoRa-S3 Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
chatter2 Trunk fmt 2024-07-31 07:42:23 -05:00
diy Commented RF95(1276) as no needed right now (#4386) 2024-08-05 06:02:54 -05:00
Dongle_nRF52840-pca10059-v1 fix include path 2024-05-16 17:03:04 +02:00
EBYTE_ESP32-S3 Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
esp32-s3-pico Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
feather_diy fix include path 2024-05-16 17:03:04 +02:00
heltec_capsule_sensor_v3 Heltec boards sensor and low power features update (#4418) 2024-08-13 06:30:35 -05:00
heltec_esp32c3 Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
heltec_hru_3601 Add support for Heltec HRU-3601 2024-06-20 12:30:02 +08:00
heltec_mesh_node_t114 Heltec boards sensor and low power features update (#4418) 2024-08-13 06:30:35 -05:00
heltec_v1 Add ADC channels to esp variants, plug code back in to make sure other archs work 2023-05-16 21:46:55 +02:00
heltec_v2 Generate the build matrix from the variant files (#3870) 2024-05-12 22:43:47 +02:00
heltec_v2.1 Generate the build matrix from the variant files (#3870) 2024-05-12 22:43:47 +02:00
heltec_v3 Add #define USE_SSD1306 to avoid automatic detection causing pixel shift. (#4356) 2024-07-30 17:15:50 -05:00
heltec_vision_master_e213 "Scan and Select" input for Canned Messages (#4365) 2024-08-06 17:16:56 -05:00
heltec_vision_master_e290 "Scan and Select" input for Canned Messages (#4365) 2024-08-06 17:16:56 -05:00
heltec_vision_master_t190 Initial Support for Heltec VM-T190 (#4391) 2024-08-06 13:59:33 -05:00
heltec_wireless_paper Initial support for HT-VME290, sleep fixes for HT-VME213 (#4334) 2024-08-02 14:03:59 +12:00
heltec_wireless_paper_v1 Initial support for HT-VME290, sleep fixes for HT-VME213 (#4334) 2024-08-02 14:03:59 +12:00
heltec_wireless_tracker Cleanup GPS, add UC6580 autodetect (#4319) 2024-07-23 06:18:27 -05:00
heltec_wireless_tracker_V1_0 Fix type (#4323) 2024-07-23 08:35:01 -05:00
heltec_wsl_v3 Trunk variants 2024-05-31 11:18:06 -05:00
lora_isp4520 Simplify SX126x variant configuration (#2813) 2023-09-27 16:01:40 -05:00
lora_relay_v1 fix include path 2024-05-16 17:03:04 +02:00
lora_relay_v2 fix include path 2024-05-16 17:03:04 +02:00
m5stack_core Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
m5stack_coreink Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
m5stack-stamp-c3 Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
MakePython_nRF52840_eink fix include path 2024-05-16 17:03:04 +02:00
MakePython_nRF52840_oled fix include path 2024-05-16 17:03:04 +02:00
ME25LS01-4Y10TD Add Minewsemi LR1110+nRF52840-ME25LS01 [both 4.2inch e-ink and non e-ink varaint] (#4387) 2024-08-05 05:59:57 -05:00
ME25LS01-4Y10TD_e-ink Add Minewsemi LR1110+nRF52840-ME25LS01 [both 4.2inch e-ink and non e-ink varaint] (#4387) 2024-08-05 05:59:57 -05:00
monteops_hw1 target does not use the powerrail 2024-05-18 10:48:57 +02:00
my_esp32s3_diy_eink Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
my_esp32s3_diy_oled Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
nano-g1 Generalise SPI pin names (#2970) 2023-11-29 15:51:05 -06:00
nano-g1-explorer Generalise SPI pin names (#2970) 2023-11-29 15:51:05 -06:00
nano-g2-ultra Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
pca10056-rc-clock fix include path 2024-05-16 17:03:04 +02:00
picomputer-s3 Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
portduino Make SPI frequency and TOPHONE queue size configurable on Native (#4369) 2024-08-01 19:29:49 -05:00
ppr Simplify SX126x variant configuration (#2813) 2023-09-27 16:01:40 -05:00
ppr1 Simplify SX126x variant configuration (#2813) 2023-09-27 16:01:40 -05:00
radiomaster_900_bandit_micro Added Radiomaster Bandit Nano and Radiomaster Bandit Micro to default_envs. (#4077) 2024-06-11 14:51:39 -05:00
radiomaster_900_bandit_nano Changed a RADIOMASTER_900_BANDIT_NANO to DISPLAY_FLIP_SCREEN (#4366) 2024-08-01 11:53:38 -05:00
rak2560 CI is creating the uf2 file during build 2024-06-16 21:08:34 +02:00
rak3172 Add RAK3172 to the STM32WL canon 2024-07-27 09:38:28 -05:00
rak4631 Generalize SWD debugging stuff so it works on all nrf52 targets. (#4377) 2024-08-03 07:41:35 -05:00
rak4631_epaper Add support for BMX160/RAK12034 compass module (#4021) 2024-06-11 17:47:45 -05:00
rak4631_epaper_onrxtx Add support for BMX160/RAK12034 compass module (#4021) 2024-06-11 17:47:45 -05:00
rak10701 rak10701: support touchscreen (#4104) 2024-06-14 19:36:20 -05:00
rak11200 Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
rak11310 fix include path 2024-05-16 17:03:04 +02:00
rp2040-lora fix include path 2024-05-16 17:03:04 +02:00
rpipico remove screen pinning for pico targets 2024-05-18 10:22:07 +02:00
rpipico-slowclock fix include path 2024-05-16 17:03:04 +02:00
rpipicow remove screen pinning for pico targets 2024-05-18 10:22:07 +02:00
senselora_rp2040 fix include path 2024-05-16 17:03:04 +02:00
station-g1 Battery level with proportional filter and lookup table (#3216) 2024-02-16 06:09:57 -06:00
station-g2 User experience improvement - app battery icon (#3979) 2024-05-28 06:30:15 -05:00
t-deck Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
t-echo Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
t-watch-s3 Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
tbeam Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
tbeam_v07 Generate the build matrix from the variant files (#3870) 2024-05-12 22:43:47 +02:00
tbeam-s3-core Finish powermon/powerstress (#4230) 2024-08-06 12:35:54 -05:00
tlora_t3s3_v1 Esptool is better 2024-06-23 07:54:13 -05:00
tlora_v1 Remove GPS pins from devices lacking built-in GPS (#2812) 2023-09-19 10:55:14 -05:00
tlora_v1_3 Generate the build matrix from the variant files (#3870) 2024-05-12 22:43:47 +02:00
tlora_v2 Generate the build matrix from the variant files (#3870) 2024-05-12 22:43:47 +02:00
tlora_v2_1_16 Generate the build matrix from the variant files (#3870) 2024-05-12 22:43:47 +02:00
tlora_v2_1_16_tcxo feat(variants): Add support for TXCO on TLORA_V2_1_6 devices (#3124) 2024-01-30 07:06:47 -06:00
tlora_v2_1_18 Remove GPS pins from devices lacking built-in GPS (#2812) 2023-09-19 10:55:14 -05:00
tracker-t1000-e fix #4367 make USB power detection work correctly on seeed trackers (#4376) 2024-08-02 20:20:44 -05:00
trackerd Add trackerd to build. (#4347) 2024-07-31 05:58:41 -05:00
tracksenger Cleanup GPS, add UC6580 autodetect (#4319) 2024-07-23 06:18:27 -05:00
TWC_mesh_v4 fix include path 2024-05-16 17:03:04 +02:00
unphone Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
wio-e5 Enable STM32 build (#4339) 2024-07-27 06:39:16 -05:00
wio-sdk-wm1110 Fixes for #4395: nrf52 flash filesystem reliability (#4406) 2024-08-13 06:45:39 -05:00
wio-t1000-s Support Seeed Tracker-T1000-E (#4303) 2024-07-24 21:10:38 -05:00
wio-tracker-wm1110 Make lora radio reset reliable on wio-tracker-1100 and lower lr11x0 power consumption in sleep (#4383) 2024-08-05 06:47:04 -05:00
wiphone Update platformio/espressif32 to the latest 6.7.0 (#3899) 2024-05-21 21:02:09 -05:00
xiao_ble Revert "Sync Wio lr1110 refresh with master (#4288)" 2024-07-22 15:30:36 +02:00