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

boards: initial support for ESP32-C6-DevKitC-1 #1054

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

stintel
Copy link
Contributor

@stintel stintel commented Mar 16, 2023

No description provided.

@stintel stintel marked this pull request as draft March 16, 2023 20:42
@Jason2866
Copy link
Contributor

Jason2866 commented Mar 16, 2023

You are not using latest espidf.py version. Will introduce build bugs in Platformio! This change is not needed for supporting the C6. Do not mix PRs for different needs. The PR is not declared for fixing problems in Home Assistant.
C6 has no support in Arduino. Needs to be removed from the boards.json

@stintel
Copy link
Contributor Author

stintel commented Mar 16, 2023

You are not using latest espidf.py version. Will introduce build bugs in Platformio! This change is not needed for supporting the C6. Do not mix PRs for different needs. The PR is not declared for fixing problems in Home Assistant.

It is marked as a draft for a reason. I'll remove that revert once I figured out how to fix it in esphome and before removing draft status.

C6 has no support in Arduino. Needs to be removed from the boards.json

Done

@stintel stintel marked this pull request as ready for review March 18, 2023 22:59
@stintel
Copy link
Contributor Author

stintel commented Mar 18, 2023

Used this to successfully flash an esphome firmware to an ESP32-C6. Removed the unrelated commit from this PR, so I think this is ready for review. One question I have is about maximum_ram_size ... The ESP32-C6 has 512K RAM, but I'm not sure if this should be reflect in maximum_ram_size. Also the url currently returns a 404, should I remove it for now?

@valeros
Copy link
Member

valeros commented Mar 20, 2023

Hi @stintel ! Thanks for the PR.

The ESP32-C6 has 512K RAM, but I'm not sure if this should be reflect in maximum_ram_size

If all 512K of RAM is available for use, then you can transfer this value to maximum_ram_size.

Also the url currently returns a 404, should I remove it for now?

Isn't this https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html the right link?

Also, there still some mentions of the Arduino framework in the board manifest, I guess it should be removed until it's officially supported.

@stintel
Copy link
Contributor Author

stintel commented Mar 20, 2023

If all 512K of RAM is available for use, then you can transfer this value to maximum_ram_size.

From https://www.espressif.com/sites/default/files/documentation/esp32-c6-wroom-1_datasheet_en.pdf:

CPU and On-Chip Memory
• ESP32-C6 embedded, 32-bit RISC-V single-core
microprocessor, up to 160 MHz
• ROM: 320 KB
• HP SRAM: 512 KB
• LP SRAM: 16 KB

To be honest, I'm not entirely sure if all of it is available for use.

Also, there still some mentions of the Arduino framework in the board manifest, I guess it should be removed until it's officially supported.

Looks like I missed those.

@lboue
Copy link

lboue commented May 25, 2023

@stintel
Espressif released ESP-IDF Pre-release v5.1-beta1 Pre-release recently.
So I think we can start doing some testing to add C6 card support in the develop branch. What do you think?

ESP-IDF doc for ESP32-C6 pre-release v5.1-beta1

@linkedupbits
Copy link

linkedupbits commented Jul 1, 2023

ESP32-c6 is now supported via ESP-IDF 5.1
https://github.com/espressif/esp-idf/releases/tag/v5.1
What do we need to do to help make this work?

@lboue
Copy link

lboue commented Jul 7, 2023

Could a maintainer review this PR?

@Jason2866
Copy link
Contributor

Jason2866 commented Jul 7, 2023

Use this changes in my fork. Could not test with IDF5.1 since i got it not running (compile does work but get a linker error...). But it does work well with the early alpha Arduino 3.0 build. C6 Arduino Blink example is working.
The PR is fine. Maybe someone can help to solve the linker error in my fork for IDF 5.1?
It is here https://github.com/Jason2866/platform-espressif32/tree/Arduino/IDF5

@nomis
Copy link

nomis commented Jul 22, 2023

If all 512K of RAM is available for use, then you can transfer this value to maximum_ram_size.

From https://www.espressif.com/sites/default/files/documentation/esp32-c6-wroom-1_datasheet_en.pdf:

CPU and On-Chip Memory • ESP32-C6 embedded, 32-bit RISC-V single-core microprocessor, up to 160 MHz • ROM: 320 KB • HP SRAM: 512 KB • LP SRAM: 16 KB

To be honest, I'm not entirely sure if all of it is available for use.

The RAM size should be set to 512KB. There are already other misconfigured ESP32 boards (all of the S3s) set to 320KB because they've just been copied from a 320KB model when it actually has 512KB.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
@stintel
Copy link
Contributor Author

stintel commented Jul 23, 2023

The RAM size should be set to 512KB.

Done.

@Jason2866
Copy link
Contributor

Jason2866 commented Jul 23, 2023

@nomis The ESP32-x RAM settings for the xtensa MCUs are correct, the physical existing RAM is 512kb BUT can not be used by the sketch. Anyways the setting is more or less just for information. Platformio is doing later a real RAM size calculation and check.

@valeros valeros linked an issue Aug 3, 2023 that may be closed by this pull request
- Temporarily removed debug section from board manifest until the latest OpenOCD with C6 support is integrated
- Added the new ESP32-C6 dev-kit to project example so that it's checked in CI
@valeros valeros merged commit 95e0a73 into platformio:develop Aug 3, 2023
60 checks passed
@valeros
Copy link
Member

valeros commented Aug 3, 2023

Many thanks for a great PR, merged!

@stintel stintel deleted the esp32-c6 branch August 3, 2023 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for ESP32-C6
6 participants