Skip to content

Add support for the ESP32-C2/ESP8684 #211

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

Merged
merged 14 commits into from
Oct 13, 2022

Conversation

jessebraham
Copy link
Member

@jessebraham jessebraham commented Oct 12, 2022

Apologies for the size of this PR 😁

As per the title, adds support for the ESP32-C2/ESP8684. The SVD/PAC are still missing a peripheral or two (I think it's just LEDC but I could have missed more), but this covers most of the hardware.

The i2c_display example has not been tested, as I don't have this display. @bjoernQ can you please try it out? I have tested all of the remaining examples and their behaviour is consistent with the other devices. This has not been thoroughly tested, however.

The CI config is still a bit janky and will need to be fixed eventually, but it works for now so I'm not going to worry about it.

This has been rebased a number of times, so there may be some artifacts from that. I think I've caught them all, but something to keep in mind.

@bjoernQ
Copy link
Contributor

bjoernQ commented Oct 13, 2022

I2C doesn't seem to really work yet

ssd1306

image

image

@bjoernQ
Copy link
Contributor

bjoernQ commented Oct 13, 2022

There are a couple of unused constants in src\clocks_ll\esp32c2.rs ... doesn't make sense to manually mark them all in the code

@bjoernQ
Copy link
Contributor

bjoernQ commented Oct 13, 2022

Besides the things mentioned above this already looks good to me. For I2C we could also note it's not working yet and deactivate the example until we figure out what is wrong

@jessebraham
Copy link
Member Author

There are a couple of unused constants in src\clocks_ll\esp32c2.rs ... doesn't make sense to manually mark them all in the code

Oops, meant to remove those and forgot. Thanks for pointing it out, they're gone now.

Besides the things mentioned above this already looks good to me. For I2C we could also note it's not working yet and deactivate the example until we figure out what is wrong

I'll spend a bit of time today looking into the I2C issues, if I can't get them resolved then I'll probably take this approach. I'd like to get this PR wrapped up sooner than later, I've been rebasing/maintaining it for some time now waiting for the last bits of the TRM to become available 😁

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

A lot to unpack here, I mainly focused on the linker scripts which look fine to me! Everything else seems to be clock control or glue code into existing drivers.

Yay for C2 support! 🎉

@jessebraham
Copy link
Member Author

The issues with I2C still persist, but I'm going to merge this regardless. Overall it's mostly working, and all the examples are building in CI, so close enough for now 😁 I'll open an issue so we don't forget to fix it.

@jessebraham jessebraham merged commit f13c47f into esp-rs:main Oct 13, 2022
@jessebraham jessebraham deleted the feature/esp32c2 branch October 13, 2022 16:14
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