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
betafpv_900_tx_nano
betafpv_2400_tx_micro
bpi_picow_esp32_s3
canaryone Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
CDEBYTE_EoRa-S3
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
EBYTE_ESP32-S3 Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
esp32-s3-pico
feather_diy
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
heltec_v2
heltec_v2.1
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
lora_isp4520
lora_relay_v1
lora_relay_v2
m5stack_core
m5stack_coreink Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
m5stack-stamp-c3
MakePython_nRF52840_eink
MakePython_nRF52840_oled
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
my_esp32s3_diy_eink
my_esp32s3_diy_oled
nano-g1
nano-g1-explorer
nano-g2-ultra Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
pca10056-rc-clock
picomputer-s3
portduino Make SPI frequency and TOPHONE queue size configurable on Native (#4369) 2024-08-01 19:29:49 -05:00
ppr
ppr1
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
rak11310
rp2040-lora
rpipico
rpipico-slowclock
rpipicow
senselora_rp2040
station-g1
station-g2
t-deck
t-echo Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
t-watch-s3
tbeam Remove LED_INVERTED, see below for why ;-) (#4382) 2024-08-05 06:02:32 -05:00
tbeam_v07
tbeam-s3-core Finish powermon/powerstress (#4230) 2024-08-06 12:35:54 -05:00
tlora_t3s3_v1 Revert "Sync Wio lr1110 refresh with master (#4288)" 2024-07-22 15:30:36 +02:00
tlora_v1
tlora_v1_3
tlora_v2
tlora_v2_1_16
tlora_v2_1_16_tcxo
tlora_v2_1_18
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
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
xiao_ble Revert "Sync Wio lr1110 refresh with master (#4288)" 2024-07-22 15:30:36 +02:00