espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.28k stars 7.35k forks source link

ESP32-C6 support #7713

Closed probonopd closed 3 months ago

probonopd commented 1 year ago

Related area

ESP32-C6

Hardware specification

Support for ESP32-C6

Is your feature request related to a problem?

ESP32-C6 is not supported yet

Describe the solution you'd like

Support for ESP32-C6

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

probonopd commented 1 year ago

https://www.espressif.com/en/products/socs/esp32-c6

lbernstone commented 1 year ago

C6 will not be supported until ESP-IDF 5.1, so arduino will not support it until that is released.

VojtechBartoska commented 1 year ago

Hello, support of ESP32-C6 is on our Roadmap, @lbernstone is right that it will be supported in ESP-IDF 5.1 so in Arduino, it will be in version 3.X.X. We'll soon create development branch and we will start working on IDF 5 support there.

@probonopd Thanks for opening the issue, we will use it to track progress on support of ESP32-C6 :)

tuct commented 1 year ago

My first esp32 c6 dev boards v0.0 arrived today, eager to test it!

simogaspa84 commented 1 year ago

Hi @tuct how did you get it the esp32 c6 dev board? which supplier ? thanks

negis02 commented 1 year ago

mine also just arrive, i ordered from there: https://www.aliexpress.com/item/1005005125343088.html?spm=a2g0o.order_list.order_list_main.29.28e41802T3MZjD

simogaspa84 commented 1 year ago

Thanks a lot @negis02 .. very kind... are you going to try the new features about cyber security in the C6 dev board? I am really interested about the trusted execution enviroment and the glitch detector.. Do you know something about that? Thanks

seajhawk commented 1 year ago

Hey @simogaspa84 - thanks for posting. I'm mainly interested in the Thread support, but I'll have to look at the trusted execution and glitch detector features. I wasn't even aware of those!

I'm building an air quality, temp, humidity, CO2 sensor.

Does anyone know if we can use a C3 board for basic prototyping until the C6 support is added?

tuct commented 1 year ago

I got mine from the official store at aliexpress € 9,81 1%OFF | ESP32-C6-DevKitC-1 Entwicklung Bord Espressif Systeme ESP32-C6 Serie Probe Limit 2 stücke pro Kunden * (siehe beschreibung) https://a.aliexpress.com/_mLI99g2 I bought 5, so the limit is new, happy to share of you are close to or in Vienna

negis02 commented 1 year ago

For me most interesting to try ESP32-c6 in Wi-Fi 6 network, to test all WiFi6 benefits: in some application test and compere real time messaging over Wifi6 in is heavy loaded Wi-Fi with many devices, like MU-MIMO and OFDM AP capability tests with IOT device like this; and another test: battery life: Wifi6 wake-up timers test with esp32-c6.

Trevo525 commented 1 year ago

You can also purchase from Adafruit's official store. They have 47 in stock at the time of writing this.

46 now, I bought one. 😝

a-d-r-i-a-n-d commented 1 year ago

I've ordered mine today, looking forward to C6 support.

MingyaoLiu commented 1 year ago

I just got my esp32-c6 wroom module, looking forward to have arduino capability!

guumeyer commented 1 year ago

I just got my esp32-c6 wroom module too, looking forward to have arduino capability!

N0ury commented 1 year ago

idf.py --version ESP-IDF v5.1-dev-3710-gacac972f70

It looks like v5.1 has been released ;-)

me-no-dev commented 1 year ago

It has not. This is just the version that will be used in the future. 5.1 is in ESP-IDF master and needs to be split in it's own branch before it will be released. It has not even been feature-frozen yet :)

noonien commented 1 year ago

Any update on this?

djmjr77 commented 1 year ago

Update please?

me-no-dev commented 1 year ago

Guys, please stop asking for update every few days. Before we add support for new chips, there is a lot of work that needs to be done. When that is done (will take way more than few days) most if not all new chips will be supported. We will announce that, so even less reason to keep asking.

Hedda commented 1 year ago

Hello, support of ESP32-C6 is on our Roadmap, @lbernstone is right that it will be supported in ESP-IDF 5.1 so in Arduino, it will be in version 3.X.X. We'll soon create development branch and we will start working on IDF 5 support there.

@probonopd Thanks for opening the issue, we will use it to track progress on support of ESP32-C6 :)

As noted, the official Espressif ESP-IDF v5.1, which is currently in development, will include initial support for the new ESP32-C6 chip, however, while Espressif ESP-IDF v5.1 has not yet been released it should mostly work if using the master branch in esp-idf repository. If you want to track the development status then follow these the updates made to these other issues for ESP32-C6:

https://github.com/espressif/arduino-esp32/issues/7852

https://github.com/espressif/esp-idf/issues/10423

LenReinhart commented 1 year ago

Another waiting for C6 support. Subscribed.

SuGlider commented 1 year ago

Ok, we have C6 support already. You can try the C6 branch: https://github.com/espressif/arduino-esp32/tree/feature/esp32c6-support

SuGlider commented 1 year ago

This the initial stage of support. At this time we are working in testing and fixing.

UART is fully tested and everything works correclty, including using UART with setCpuFrequencyMhz() at 160, 80, 40, 20 and 10MHz.

The same for RMT.

SuGlider commented 1 year ago

I have tested the Basic WiFi and BLE examples and those are working fine with the current C6 branch. At this point, please, don't expect to see low power consumption yet.

We still must work on the IDF Power Management component of the Arduino Core for the ESP32-C6. It will take some time, but we expect to offer similar IDF results to the Arduino Users related to power consumpion in IoT applications with the C6, and maybe also for other SoCs.

Especificaly for the C6, we will also work on the WiFi 6 (802.11ax), adding an Arduino API for controlling the TWT (Target Wait Time) configuration.

Some IDF examples using the above referenced IDF APIs:

IDF Power Management Example: https://github.com/espressif/esp-idf/blob/master/examples/wifi/power_save/README.md

IDF ESP32-C6 WiFi 6 802.11ax Example: https://github.com/espressif/esp-idf/tree/master/examples/wifi/itwt

LenReinhart commented 1 year ago

How do I integrate this with the Arduino application?

From: Rodrigo Garcia @. Sent: Thursday, June 22, 2023 12:45 PM To: espressif/arduino-esp32 @.> Cc: LenReinhart @.>; Manual @.> Subject: Re: [espressif/arduino-esp32] ESP32-C6 support (Issue #7713)

I have tested the Basic WiFi and BLE examples and those are working fine with the current C6 branch. At this point, please, don't expect to see low power consumption yet.

We still must work on the IDF Power Management component of the Arduino Core for the ESP32-C6. It will take some time, but we expect to offer similar IDF results to the Arduino Users related to power consumpion in IoT applications with the C6, and maybe also for other SoCs.

Especificaly for the C6, we will also work on the WiFi 6 (802.11ax), adding an Arduino API for controlling the TWT (Target Wait Time) configuration.

Some IDF examples using the above referenced IDF APIs:

IDF Power Management Example: https://github.com/espressif/esp-idf/blob/master/examples/wifi/power_save/README.md

IDF ESP32-C6 WiFi 6 802.11ax Example: https://github.com/espressif/esp-idf/tree/master/examples/wifi/itwt

— Reply to this email directly, view it on GitHub https://github.com/espressif/arduino-esp32/issues/7713#issuecomment-1602995922 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTXULAEB2M3MTLS6VOXB33XMRZAVANCNFSM6AAAAAAT3N5SH4 . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/ABTXULA2HIC275R5WU6GHTDXMRZAVA5CNFSM6AAAAAAT3N5SH6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS7RPDNE.gif Message ID: < @.> @.>

lbernstone commented 1 year ago

@LenReinhart This is a very early release. It is intended for the people that will build those pieces. As suglider says, it will take some time.

SuGlider commented 1 year ago

How do I integrate this with the Arduino application?

If you are talkiig about how to "install" the C6 Arduino Core branch, it is necessary to use it as a sketchbook board by cloning this branch into the local Sketchbook Folder. The process of cloning and creating the sketchbook board is described in this link:

https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#how-to-update-to-the-latest-code

LenReinhart commented 1 year ago

Understood. I have a copy of Dr. Ting’s Forth that was designed for the ESP32 dev board. It uses Arduino to build the image download. I correctly guessed that the front end would be as much the same as possible on the compiler and it would take care of the translation. I successfully compiled and loaded it on the C3 dev board simply by changing the target. I have two of the C6 boards and would like to see if it will work for that. If it doesn’t no big deal. Bluetooth did not work, but I didn’t expect it would as it was the LE version. I’m 76 and have been working with computer systems since the 8080, now I just like to mess around with stuff and I thought what was done with using the Arduino system, to build and install a copy of Forth OS, I thought was very clever. The fact that it has the possibility of being very transportable among processors using the same compiler and the way the Arduino system takes care of the addressing differences between hardware is very nice IMO.

From: lbernstone @. Sent: Thursday, June 22, 2023 3:07 PM To: espressif/arduino-esp32 @.> Cc: LenReinhart @.>; Mention @.> Subject: Re: [espressif/arduino-esp32] ESP32-C6 support (Issue #7713)

@LenReinhart https://github.com/LenReinhart This is a very early release. It is intended for the people that will build those pieces. As suglider says, it will take some time.

— Reply to this email directly, view it on GitHub https://github.com/espressif/arduino-esp32/issues/7713#issuecomment-1603179117 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTXULHRRSM7V7YY3W24SLLXMSJVVANCNFSM6AAAAAAT3N5SH4 . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ABTXULCPJXBFWRAWQBTZ553XMSJVVA5CNFSM6AAAAAAT3N5SH6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS7R2JG2.gif Message ID: @. @.> >

lbernstone commented 1 year ago

@LenReinhart Sounds good. Build it on the C3, which has a stable build ATM :)

VojtechBartoska commented 1 year ago

First initial support PR: https://github.com/espressif/arduino-esp32/pull/8337

VojtechBartoska commented 1 year ago

Table with Support overview

We will keep this table up to date.

Here is available ESP-IDF ESP32-C6 Support status.

Date of last update: 26.6.2023

ESP32-C6 Support Overview
Peripheral Assignee Testing Updates Comments
ADC @P-R-O-C-H-Y Waiting WIP on ESP-IDF side
Ethernet SPI In progress
GPIO @P-R-O-C-H-Y Fully OK
I2C (Slave & Master) @me-no-dev
I2S In progress
LEDC & PWM @SuGlider Fully OK
RMT @SuGlider Fully OK
SPI @P-R-O-C-H-Y Fixing issue found in esp32-hal-spi.c
TWAI run examples
Temp. Sensor @P-R-O-C-H-Y Fully OK
UART @SuGlider Fully OK
USB Serial/JTAG @SuGlider Fully OK
SigmaDelta @P-R-O-C-H-Y Fully OK
Timers (System/General-purpose) @P-R-O-C-H-Y Fully OK
General
Wi-Fi @SuGlider Examples works just general testing, specific cases not covered
Bluetooth @SuGlider Fully OK
Bluetooth LE @SuGlider Examples works
802.15.4 protocol support missing
Thread support missing
Zigbee support missing
Power management @SuGlider under investigation
lboue commented 1 year ago

C6 will not be supported until ESP-IDF 5.1, so arduino will not support it until that is released.

@lbernstone ESP-IDF Release v5.1 has been released.

rdahlin commented 1 year ago

C6 will not be supported until ESP-IDF 5.1, so arduino will not support it until that is released.

@lbernstone ESP-IDF Release v5.1 has been released.

Any news here?

lbernstone commented 1 year ago

Pre-release support as shown in the table above is in the idf-v5.1 branch

VojtechBartoska commented 1 year ago

Hello, we are now collecting feedback on release 2.0.11 and when we are good to go, above mentioned branch https://github.com/espressif/arduino-esp32/tree/esp-idf-v5.1-libs will be merged into master and initial support for ESP32-C6 & ESP32-H2 will be available for development purposes.

petergjoel commented 1 year ago

@VojtechBartoska in HardwareSerial.cpp I find #define RX1 5 and #define TX1 4 for UART1 (LP_UART pins) - this is conflicting with the documentation.

However, using the #define RX1 5 and #define TX1 4 works fine for our application -- as long as we flip the wiring accordingly.

See https://github.com/espressif/arduino-esp32/pull/8477

petergjoel commented 1 year ago

See also issue with number of UART ports and the esp32-c6: https://github.com/espressif/esp-idf/issues/11989#issue-1830756977

HX2003 commented 11 months ago

Hi all, I have successfully flashed the ESP32-C6 using https://github.com/espressif/arduino-esp32/tree/esp-idf-v5.1-libs. Using ble Unified Provisioning I got Configuration mismatch. Select BLE Only or BTDM mode from menuconfig, this error does not occur on the ESP32-S3 using the same build. I wish to continue to use Arduino IDE and not setup platform io.

lbernstone commented 11 months ago

Hi all, I have successfully flashed the ESP32-C6 using esp-idf-v5.1-libs. Using ble Unified Provisioning I got Configuration mismatch. Select BLE Only or BTDM mode from menuconfig, this error does not occur on the ESP32-S3 using the same build. I wish to continue to use Arduino IDE and not setup platform io.

Looks like this is a problem upstream. There are no CTRL_MODE settings in C6 menuconfig. @HX2003 What library/example is using that function?

HX2003 commented 11 months ago

@lbernstone I am directly invoking from esp idf #include <wifi_provisioning/scheme_ble.h> #include <wifi_provisioning/manager.h> Although I assume this problem would also occur if one uses libraries/WiFiProv/examples/WiFiProv as well.

IsraelMek commented 11 months ago

Hi, I have added ESP32 core 2.0.14 to the boards manager. Even though in github ESP32-C6 is mentioned on the list of supported boards, it does not show up in the selection list of Arduino.

me-no-dev commented 11 months ago

@IsraelMek you need 3.0.0 for that. It is still in beta and you need to use different BoardManger URL to get it: https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json

IsraelMek commented 11 months ago

@me-no-dev Thanks a lot . Update done to 3.0.0 and I can see ESP32-C6 in the board selection. But it doesn't compile the builtin examples when C6 is selected. it displays error message "bits/c++config.h: No such file or directory". For ESP32-S3, the IDE compiles the example codes without any issue.

me-no-dev commented 11 months ago

It seems that Arduino has some problems extracting the toolchains properly... especially riscv one. Will investigate Monday and come back. You could open the json in the link and download and manually install the toolchain till then

me-no-dev commented 11 months ago

RV toolchains: https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/riscv32-esp-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/riscv32-esp-elf-12.2.0_20230208-aarch64-linux-gnu.tar.xz https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/riscv32-esp-elf-12.2.0_20230208-arm-linux-gnueabi.tar.xz https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/riscv32-esp-elf-12.2.0_20230208-i686-linux-gnu.tar.xz https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/riscv32-esp-elf-12.2.0_20230208-x86_64-apple-darwin.tar.xz https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/riscv32-esp-elf-12.2.0_20230208-aarch64-apple-darwin.tar.xz https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/riscv32-esp-elf-12.2.0_20230208-i686-w64-mingw32.zip https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/riscv32-esp-elf-12.2.0_20230208-x86_64-w64-mingw32.zip

IsraelMek commented 11 months ago

@me-no-dev The manual installation fixed it. Thanks once again.

Hook654321 commented 11 months ago

How do I have to install it manually?

Atomique13 commented 11 months ago

@me-no-dev Thanks a lot . Update done to 3.0.0 and I can see ESP32-C6 in the board selection. But it doesn't compile the builtin examples when C6 is selected. it displays error message "bits/c++config.h: No such file or directory". For ESP32-S3, the IDE compiles the example codes without any issue.

Same problem on 3.0.0 with C3 and H2.

me-no-dev commented 11 months ago

Same problem on 3.0.0 with C3 and H2.

All RiscV chips currently use the same exact toolchain, so yes. same on C3, C6 and H2

me-no-dev commented 11 months ago

We have found the problem, but not a solution yet. The path to some files inside the toolchain becomes too long for gcc to handle and it does not see the file, though it's there. When installed from git, this issue does not occur, because path is short enough to not trigger it. We do not control where the toolchains are installed, so ... fingers crossed 😆