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

Add ESP32-C2 support #8881

Merged
merged 17 commits into from
Nov 21, 2023
Merged

Add ESP32-C2 support #8881

merged 17 commits into from
Nov 21, 2023

Conversation

Jason2866
Copy link
Collaborator

@Jason2866 Jason2866 commented Nov 13, 2023

Description of Change

Adding the needed code changes to support build of the ESP32-C2. Libs for the C2 are still needed.
-> Built with Arduino Lib Builder
PR espressif/esp32-arduino-lib-builder#149 for the Lib builder to support the C2

Tests scenarios

The changes have been tested in Tasmota Arduino fork and project Tasmota is successful built and running for the C2

@me-no-dev as discussed in #8864

platform.txt Outdated Show resolved Hide resolved
platform.txt Outdated Show resolved Hide resolved
platform.txt Outdated Show resolved Hide resolved
@me-no-dev
Copy link
Member

Thanks @Jason2866 :) I'll take over to finish support

Copy link
Collaborator Author

@Jason2866 Jason2866 left a comment

Choose a reason for hiding this comment

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

Ah, sorry forgot about this one. I added the missing in IDF
And we don't use the "fancy" components

@me-no-dev
Copy link
Member

@Jason2866 now it compiles as component. Will also look at the lib-builder PR

@P-R-O-C-H-Y @SuGlider @lucasssvaz PTAL

@me-no-dev
Copy link
Member

Board Test is expected to fail due to missing SDK for C2.

@Jason2866
Copy link
Collaborator Author

@me-no-dev Thx, for the polishing and fixing.

@me-no-dev
Copy link
Member

@Jason2866 all is good now :) both lib-builder and arduino are ready. Sketches are compiling, but we will not have it through the board manager for now. The size of the libs is 100MB. If there is enough interest or we can have them as separate package, we can include them too

@Jason2866
Copy link
Collaborator Author

@me-no-dev Big thx for the work you put in and the lightning speed!
Still curious why it is so big. Our complete framework for Arduino 3.0.0 including all MCUs and libs is around 150MB (stripped Rainmaker, SR and DSP).
The working framework for the solo1 is about 30MB https://github.com/tasmota/arduino-esp32/releases
So i expected that the C2 does add not more than 30MB.

@me-no-dev
Copy link
Member

it adds 30MB to the ZIP and 100MB extracted. Besides that RainMaker is currently not working on it. There is close to zero interest in providing Board Manager support for it and it also takes time in the cron job that we can not afford at the time. As I said a few times, we can look into adding full support if there is enough interest or when we can make it painless to others (solo support will probably also come then)

@Jason2866
Copy link
Collaborator Author

Perfectly fine! And the size is the same the 30MB mentioned was zipped. We will see if users are asking for. I don't think Rainmaker will ever work well with the C2. The free heap is probably not enough. The C2 is not designed for heavy lifting, but it is a nice powerfull little MCU. For me it is an follow up of the ESP8266...

@me-no-dev
Copy link
Member

I don't think Rainmaker will ever work well with the C2.

it's mentioned on the product page, so it should work. I'll report the bug

Copy link
Member

@P-R-O-C-H-Y P-R-O-C-H-Y left a comment

Choose a reason for hiding this comment

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

Please match the SPI pins with the C3.
Tested Wifi + SD-SPI and both works well.
Thanks @Jason2866 for PR!

@P-R-O-C-H-Y P-R-O-C-H-Y added the Status: Pending Merge Pull Request is ready to be merged label Nov 20, 2023
Copy link
Collaborator

@lucasssvaz lucasssvaz left a comment

Choose a reason for hiding this comment

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

LGTM. I only recommend switching the default Serial1 pins to avoid possible conflicts.

cores/esp32/HardwareSerial.h Outdated Show resolved Hide resolved
cores/esp32/HardwareSerial.h Outdated Show resolved Hide resolved
@P-R-O-C-H-Y
Copy link
Member

@Jason2866 Can you please change the Serial1 pins as suggested by @lucasssvaz? We will merge after that. Thanks

@Jason2866
Copy link
Collaborator Author

@P-R-O-C-H-Y Changed.

@me-no-dev me-no-dev merged commit 5d9a7a1 into espressif:master Nov 21, 2023
37 of 38 checks passed
@VojtechBartoska VojtechBartoska mentioned this pull request Dec 7, 2023
1 task
@Jason2866 Jason2866 mentioned this pull request Mar 1, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Merge Pull Request is ready to be merged Type: Chip support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants