Skip to content

update esp32c5 stubs#232

Merged
brianignacio5 merged 2 commits intomainfrom
enhance/esp32c5
Jan 30, 2026
Merged

update esp32c5 stubs#232
brianignacio5 merged 2 commits intomainfrom
enhance/esp32c5

Conversation

@brianignacio5
Copy link
Collaborator

@brianignacio5 brianignacio5 commented Jan 9, 2026

This pull request makes significant updates to the ESP32C5ROM class in src/targets/esp32c5.ts to improve feature support, accuracy, and maintainability for the ESP32-C5 chip. The changes include corrections to register shifts and memory maps, expanded key purposes, new hardware feature reporting, and the addition of several new methods for handling keys, SPI connections, and hardware checks. Additionally, the stub flasher binary and metadata for ESP32-C5 have been updated.

Key improvements and changes:

1. Hardware register and memory map corrections:

  • Corrected the register shift values for key purposes and updated the memory map ranges for IROM and DROM to accurately reflect the ESP32-C5's architecture. [1] [2] [3]

2. Key management enhancements:

  • Expanded the KEY_PURPOSES mapping to include new key types such as XTS_AES_128_PSRAM_KEY, ECDSA_KEY_P192, and ECDSA_KEY_P384 variants, and added a constant for PURPOSE_VAL_XTS_AES128_KEY. [1] [2]
  • Introduced new methods: getKeyBlockPurpose (reads the purpose of a key block), and isFlashEncryptionKeyValid (checks if a valid AES-128 key is present or forced via key manager).

3. Hardware features and checks:

  • Updated getChipFeatures to report additional ESP32-C5 features such as IEEE802.15.4, single core + LP core, and 240MHz support.
  • Added methods: checkSpiConnection (validates SPI pin assignments and warns about USB-Serial/JTAG conflicts), usesUsbJtagSerial (detects if USB-JTAG/Serial is in use), and a placeholder for watchdogReset.

4. Baud rate and crystal frequency handling:

  • Enhanced changeBaud to check for crystal frequency mismatches and provide user feedback, improving robustness during flashing.

Target specific change baud is not yet defined

5. Stub flasher update:

  • Updated src/targets/stub_flasher/stub_flasher_32c5.json with a new stub binary (entry, text, data, and data_start fields) to match the latest ESP32-C5 requirements.

These changes collectively improve the ESP32-C5 support in the codebase, making it more accurate, feature-complete, and user-friendly.

Description

Update esp32-c5 to latest esptool stub.

Testing

Manual testing using esp32-c5-devkitc-1 and typescript example


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@brianignacio5 brianignacio5 self-assigned this Jan 9, 2026
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Download the artifacts for this pull request:

@brianignacio5 brianignacio5 merged commit 0d801f7 into main Jan 30, 2026
1 check passed
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.

1 participant