mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
fix: review fixes for the C3 build
- The C3's default radio pins were GPIO 12-17, which hold its SPI flash. They are now the framework's SPI pins (SCK 4, MISO 5, MOSI 6, CSN 7) with TX 10 and RX 3. A board with pins saved keeps them. - ADR 0003: the amendment links ADR 0006, says the C3 needs chip revision v0.3 or later (CONFIG_ESP32C3_REV_MIN_3), and the Ethernet bullet names the C3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a43f5aaaad
commit
527215d21a
2 changed files with 10 additions and 8 deletions
|
|
@ -13,8 +13,8 @@ We moved every firmware env from `espressif32 @ 6.13.0` (Arduino 2.0.17 on ESP-I
|
|||
- **Firmware size.** The ESP32 image grows from 1,382,640 bytes (v3.0.14) to 1,555,472 at `CORE_DEBUG_LEVEL=2`, leaving 17 KB of the 1.5 MB OTA slot. At level 3 it doesn't fit, so release envs build at level 2 (warnings and errors) and debug envs stay at 3. PlatformIO's "Flash:" figure counts ELF sections, not the image, and reads about 45 KB low, so CI checks `firmware.bin` against the app partition and fails under 8 KB free (`.github/size_check.py`).
|
||||
- **No more C3 builds.** Its image grows by 214 KB to 1,651,216 bytes, 76.5 KB over the OTA slot even at level 2. C3 boards stay on the 3.0.x releases.
|
||||
|
||||
> **Amended in 4.0.0.** The C3 builds again. Without the old API (ports 8080 and 8081), its image is 1,498,512 bytes at level 2 and leaves 72.6 KB of the OTA slot.
|
||||
> **Amended by [ADR 0006](0006-two-security-modes-eleven-http-routes.md) (4.0.0).** The C3 builds again. Without the old API (ports 8080 and 8081), its image is 1,498,512 bytes at level 2 and leaves 72.6 KB of the OTA slot. It runs on chip revision v0.3 or later only: the framework's C3 libraries are built with `CONFIG_ESP32C3_REV_MIN_3`. Its default radio pins moved off GPIO 12-17, which hold the SPI flash.
|
||||
- **Ethernet PHY ids are ours.** Arduino 3.x renumbered `eth_phy_type_t` (`ETH_PHY_GENERIC` is 0). NVS, backups and the web UI keep the Arduino 2.x numbers as `eth_phy_id_t` (`src/EthPhy.h`), translated by name when Ethernet starts. Never cast a stored id to the framework enum.
|
||||
- **Ethernet only on the original ESP32.** Arduino 3.x has the RMII MAC API only where `CONFIG_ETH_USE_ESP32_EMAC` is set. S3 and C6 build without Ethernet.
|
||||
- **Ethernet only on the original ESP32.** Arduino 3.x has the RMII MAC API only where `CONFIG_ETH_USE_ESP32_EMAC` is set. S3, C3 and C6 build without Ethernet.
|
||||
- **Updates roll back until proven.** We override the core's `verifyRollbackLater()` hook to return true, and `loop()` marks the new firmware valid once it has run 60 s and the network is up. A reset before then boots the previous firmware. The LittleFS image an update wrote stays, so the old firmware runs with the new web UI.
|
||||
- **Tooling.** pioarduino needs its own Core fork (`pip install pioarduino`, the pioarduino IDE extension in VS Code), which it installs into `~/.platformio/penv` in place of PlatformIO Core.
|
||||
|
|
|
|||
|
|
@ -474,12 +474,14 @@ void transceiver_config_t::load() {
|
|||
this->CSNPin = 34;
|
||||
break;
|
||||
case esp_chip_model_t::CHIP_ESP32C3:
|
||||
this->TXPin = 13;
|
||||
this->RXPin = 12;
|
||||
this->MOSIPin = 16;
|
||||
this->MISOPin = 17;
|
||||
this->SCKPin = 15;
|
||||
this->CSNPin = 14;
|
||||
// The framework's default SPI pins (variants/esp32c3). 12-17 hold the
|
||||
// SPI flash, and 2, 8 and 9 are strapping pins.
|
||||
this->TXPin = 10;
|
||||
this->RXPin = 3;
|
||||
this->MOSIPin = 6;
|
||||
this->MISOPin = 5;
|
||||
this->SCKPin = 4;
|
||||
this->CSNPin = 7;
|
||||
break;
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32C6
|
||||
case esp_chip_model_t::CHIP_ESP32C6:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue