Skip to content

Conversation

@bugadani
Copy link
Contributor

@bugadani bugadani commented Jan 19, 2026

I still need to add the actual module info and wait for #297 to get log output for the CI failures, but the rough draft is now visible here.

@bugadani bugadani force-pushed the capability branch 3 times, most recently from f8191ac to 7eeae0a Compare January 20, 2026 11:22
@bugadani bugadani force-pushed the capability branch 2 times, most recently from ea73bce to 9c7eb47 Compare January 20, 2026 11:25
@bugadani bugadani marked this pull request as ready for review January 20, 2026 11:27
Copilot AI review requested due to automatic review settings January 20, 2026 11:27
@bugadani
Copy link
Contributor Author

Oh yeah this PR will fail up until the next esp-hal release...

@bugadani bugadani marked this pull request as draft January 20, 2026 11:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements restriction-based pin filtering for ESP32 modules, replacing the dependency on esp-metadata with esp-metadata-generated from esp-hal. The system now uses pin limitation metadata to automatically filter out pins that are restricted by specific module configurations (flash, PSRAM, etc.) rather than hardcoding GPIO numbers.

Changes:

  • Replaced esp-metadata dependency with esp-metadata-generated from esp-hal
  • Introduced a new Chip enum wrapper that bridges to the metadata library and provides module lookup functionality
  • Refactored module definitions to use string-based pin limitation tags instead of hardcoded GPIO numbers
  • Updated template generation to compute reserved GPIO code based on pin limitations

Reviewed changes

Copilot reviewed 13 out of 17 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/lib.rs Added new Chip enum with methods to access metadata, modules, pins, and memory regions
src/modules.rs Completely refactored module definitions to use remove_pins with limitation tags; organized modules by chip into separate constants
src/main.rs Updated to use new Chip API and generate reserved GPIO code by filtering pins based on module limitations
src/toolchain.rs Updated to call chip.metadata() methods instead of direct chip methods
src/tui.rs Changed import from esp_metadata::Chip to crate::Chip
src/template.rs Changed import from esp_metadata::Chip to crate::Chip
src/config.rs Changed import from esp_metadata::Chip to crate::Chip
src/check.rs Changed to use esp_metadata_generated::Chip directly
src/module_selector.rs Removed file (functionality moved to src/main.rs)
template/src/bin/main.rs Simplified template to always include reserved GPIO code placeholder
template/src/bin/async_main.rs Simplified template to always include reserved GPIO code placeholder
Cargo.toml Updated dependency from esp-metadata to esp-metadata-generated from git
Cargo.lock Reflected dependency changes
xtask/src/main.rs Updated import to use esp_generate::Chip
xtask/Cargo.toml Removed esp-metadata dependency
xtask/Cargo.lock Reflected dependency changes
CHANGELOG.md Added entry for module selector feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants