Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include esp32c3 ble ota #3349

Merged
merged 5 commits into from
Mar 11, 2024
Merged

Conversation

titan098
Copy link
Contributor

@titan098 titan098 commented Mar 8, 2024

Issue

The current bleota.bin and bleota-s3.bin firmwares can be used on esp32 and esp32s3 respectively, however cannot be flashed to esp32c3 devices. A esp32c3 compatible version of the ota firmware was added and merged here meshtastic/firmware-ota#3.

Proposed Solution

Update the workflows to:

  1. Split out building esp32c3 firmwares as is done with the esp32 and esp32s3 firmwares into separate stages
  2. Pull in the https://github.com/meshtastic/firmware-ota/releases/download/latest/firmware-c3.bin binary for esp32c3 builds and rename to bleota-c3.bin
  3. Update the device-install.sh and device-install.bat scripts to select the bleout-c3.bin firmware file as is done for the the esp32 and esp32s3 variants

Testing

  1. The esp32c3 variant of the ota firmware was confirmed to work on a custom esp32c3 board and build here: [IMPROVEMENT] Add ESP32C3 build target and release firmware-ota#3
  2. As far as possible the actions were tested there: https://github.com/titan098/firmware/actions/runs/8190305545

device-install.sh script flashing the bleola-c3.bin firmware:

$ ./device-install.sh  -p /dev/ttyACM0 -f firmware-heltec-ht62-esp32c3-sx1262-2.2.25.c6ced245.bin
Trying to flash firmware-heltec-ht62-esp32c3-sx1262-2.2.25.c6ced245.bin, but first erasing and writing system information
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-C3
Chip is ESP32-C3 (QFN32) (revision v0.4)
Features: WiFi, BLE, Embedded Flash 4MB (XMC)
Crystal is 40MHz
MAC: 48:31:b7:3e:85:7c
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 15.9s
Hard resetting via RTS pin...
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-C3
Chip is ESP32-C3 (QFN32) (revision v0.4)
Features: WiFi, BLE, Embedded Flash 4MB (XMC)
Crystal is 40MHz
MAC: 48:31:b7:3e:85:7c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00203fff...
Compressed 2110560 bytes to 1149529...
Wrote 2110560 bytes (1149529 compressed) at 0x00000000 in 17.8 seconds (effective 949.7 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-C3
Chip is ESP32-C3 (QFN32) (revision v0.4)
Features: WiFi, BLE, Embedded Flash 4MB (XMC)
Crystal is 40MHz
MAC: 48:31:b7:3e:85:7c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00260000 to 0x002e4fff...
Compressed 542832 bytes to 315183...
Wrote 542832 bytes (315183 compressed) at 0x00260000 in 4.7 seconds (effective 914.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-C3
Chip is ESP32-C3 (QFN32) (revision v0.4)
Features: WiFi, BLE, Embedded Flash 4MB (XMC)
Crystal is 40MHz
MAC: 48:31:b7:3e:85:7c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00300000 to 0x003fffff...
Compressed 1048576 bytes to 1368...
Wrote 1048576 bytes (1368 compressed) at 0x00300000 in 5.8 seconds (effective 1436.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

@CLAassistant
Copy link

CLAassistant commented Mar 8, 2024

CLA assistant check
All committers have signed the CLA.

@titan098 titan098 marked this pull request as draft March 8, 2024 09:07
@titan098 titan098 marked this pull request as ready for review March 8, 2024 10:28
@caveman99 caveman99 force-pushed the include_esp32c3_ble_ota branch from f14d449 to 608eba8 Compare March 8, 2024 11:14
@thebentern thebentern requested a review from caveman99 March 8, 2024 13:11
@caveman99 caveman99 force-pushed the include_esp32c3_ble_ota branch from f3cbec7 to e968a25 Compare March 10, 2024 09:51
@caveman99 caveman99 force-pushed the include_esp32c3_ble_ota branch from e968a25 to f0417f9 Compare March 11, 2024 09:58
@caveman99 caveman99 merged commit 3a8f623 into meshtastic:master Mar 11, 2024
69 checks passed
@titan098 titan098 deleted the include_esp32c3_ble_ota branch March 11, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants