Conversation
due to Arduino 3.0.1, a few updated libraries are required: * Tasmota Platform - official platfomio lacks arduino support for C6 * FastLED (latest + C6 build patches) * AsyncTCP (latest + C6 build patches) * AsyncWebServer (latest + C6 build patches) * NeoPixelBus (lastest)
ledc drivers have a different API in Arduino V3.0.1. --> temporarily disable PWM support for C6, until we find the time to adopt to the new API.
currently NPB only support BitBang drivers for -C6. This patch re-maps all RMT driver calls to BitBang.
The ESP32-C6 chip features 31 physical GPIO pins (GPIO0 ~ GPIO30). Each pin can be used as a general-purpose I/O, or to be connected to an internal peripheral signal. restrictions: ----------------- SPI0/1: GPIO24 ~ GPIO30 are usually used for SPI flash and not recommended for other uses. USB-JTAG: GPIO12 and GPIO13 are used by USB-JTAG by default. If they are reconfigured to operate as normal GPIOs, USB-JTAG functionality will be disabled. Strapping pin: GPIO4, GPIO5, GPIO8, GPIO9, and GPIO15 are strapping pins. For more information, please refer to datasheet. For chip variants with an SiP flash built in, GPIO24 ~ GPIO30 are dedicated to connecting the SiP flash; GPIO10 ~ GPIO11 are not led out to any chip pins; therefore, only the remaining 22 GPIO pins are available. For chip variants without an in-package flash, GPIO14 is not led out to any chip pins.
adding `#if defined(CONFIG_IDF_TARGET_ESP32C6)` whenever C3 was mentioned
lessons learned: one doesn't simply `#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)` ;-P
|
FastLED bugs out very early. abort() was called at PC 0x4206c3a1 on core 0
Core 0 register dump:
MEPC : 0x40803362 RA : 0x4080770c SP : 0x4087e150 GP : 0x4080cd40
TP : 0x00000000 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x4087e17c S1 : 0x4087e160 A0 : 0x4087e17c A1 : 0x4087e15e
A2 : 0x00000000 A3 : 0x4087e1a9 A4 : 0x00000001 A5 : 0x4081e000
A6 : 0x00000000 A7 : 0x76757473 S2 : 0x42129000 S3 : 0x40818a74
S4 : 0x42000000 S5 : 0x40802fcc S6 : 0x00040020 S7 : 0x000f7b40
S8 : 0x0002d2e0 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001881 MTVEC : 0x40800001 MCAUSE : 0x00000007 MTVAL : 0x00000000
MHARTID : 0x00000000
Stack memory:
4087e150: 0x00001800 0x0000000c 0x00000000 0x40800030 0x36303234 0x31613363 0x00000000 0x4080f4dc
#0 0x40800030 in _vector_table at ??:?
#1 0x4080f4dc in __global_pointer$ at ??:?
4087e170: 0x4087e160 0x4080f4f8 0x4087e15c 0x726f6261 0x20292874 0x20736177 0x6c6c6163 0x61206465
#0 0x4080f4f8 in __global_pointer$ at ??:?
4087e190: 0x43502074 0x34783020 0x63363032 0x20316133 0x63206e6f 0x2065726f 0x00000030 0x42090000
#0 0x42090000 in esp_netif_dhcpc_stop_api at esp_netif_lwip.c.obj:?
4087e1b0: 0x42129000 0x4212c55c 0x4212c5ac 0x4206c3a4 0xffff0000 0x00000000 0x00700000 0x42071902
#0 0x4206c3a4 in check_rmt_legacy_driver_conflict at rmt_legacy.c.obj:?
#1 0x42071902 in esp_rtc_get_time_us at ??:?
4087e1d0: 0x00040020 0x40802fcc 0x42000000 0x42100000 0x0000004d 0x00000001 0x0000004d 0x40803140
#0 0x40802fcc in call_start_cpu0 at ??:?
#1 0x42100000 in _flash_rodata_dummy_start at ??:?
#2 0x40803140 in call_start_cpu0 at ??:?
4087e1f0: 0xffff0000 0x4212d2ff 0x420f7b5f 0x02625a00 0xffff0000 0x4212d2ff 0x420f7b5f 0x4086f5fc
#0 0x420f7b5f in intr_handler_set at ??:?
#1 0x420f7b5f in intr_handler_set at ??:?
4087e210: 0x00000000 0x00100000 0x00010020 0x00040020 0x42100020 0x42000020 0x0002d2e0 0x000f7b40
#0 0x42000020 in atexit at .pio/libdeps/esp32c6dev_8MB/FastLED/src/FastLED.cpp:254
4087e230: 0x00000000 0x00000000 0x00000000 0x40880000 0x00002f08 0x4004b05c 0x0000ffff 0xffffffff
4087e250: 0x00000000 0x4087e3a0 0x00000000 0x4086f85e 0xc2919723 0x00010000 0x00200000 0x00010000
4087e270: 0x300206e9 0x40802fcc 0x000000ee 0x0000000d 0x00ffff00 0x01000000 0x42100020 0x0002d2e0
#0 0x40802fcc in call_start_cpu0 at ??:?
4087e290: 0x40800000 0x00002d10 0x42000020 0x000f7b40 0x40802d10 0x00009828 0x4080c540 0x000035c0
#0 0x40800000 in _vector_table at ??:?
#1 0x42000020 in atexit at .pio/libdeps/esp32c6dev_8MB/FastLED/src/FastLED.cpp:254
#2 0x40802d10 in spi_flash_os_yield at spi_flash_os_func_app.c.obj:?
#3 0x4080c540 in ?? at /builds/idf/crosstool-NG/.build/src/newlib-git-ff0b7d93/newlib/libc/include/time.h:138
4087e2b0: 0x50002000 0x00000004 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e2d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e2f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00010020 0x0003d308
4087e310: 0x00040020 0x00137b68 0x00141398 0x00144960 0x00000000 0x00000000 0x00000000 0x00000000
4087e330: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00134990 0x00000000
4087e350: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e370: 0x00002f08 0x4004b05c 0x0000ffff 0x40880000 0x00000000 0x0000005a 0x00002f10 0x4086c478
4087e390: 0x9dc8da6f 0xfad63171 0x00000000 0x00000000 0x0000e000 0x00002000 0x00000000 0x00000000
4087e3b0: 0x00000000 0x00000000 0x00010000 0x00200000 0x00210000 0x00200000 0x00000000 0x00000000
4087e3d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e3f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e410: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e430: 0x00000000 0x00000000 0x00000002 0x00000000 0x00000000 0x0000005a 0x00002f10 0x4001b1c0
4087e450: 0x5d39474b 0x31656642 0x910381c0 0x00000000 0x92f8f710 0x00000000 0x00010000 0x300203e9
4087e470: 0x4086c410 0x40875728 0x000000f8 0x000000ee 0x0000000d 0x00ffff00 0x01000000 0x42002f10
#0 0x42002f10 in mode_chase_flash_random() at wled00/FX.cpp:1072
4087e490: 0x7533885e 0x114b9cce 0xfb8ba4e6 0xd8d6a372 0x323b98bb 0x73177650 0xd7144909 0xc1e25a97
4087e4b0: 0xe106aa86 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e4d0: 0x00000000 0x4087e5f0 0x00000101 0x00000002 0x114b9cce 0xfb8ba4e6 0xd8d6a372 0x323b98bb
4087e4f0: 0x73177650 0xd7144909 0xc1e25a97 0xe106aa86 0x00000000 0x00000000 0x00000000 0x00000000
4087e510: 0x00000000 0x00000000 0x00000000 0x00000000 0x86ea7240 0x00000140 0x00000000 0x5a000000 |
* more debug output * added my own fork of FastLED ( looks like more bugs to solve ....)
…into C6_experimental
... instead of reduced Tasmota-Arduino
|
Update: its still mysterious, however something to do with RMT 🤔
E (423) rmt(legacy): CONFLICT! driver_ng is not allowed to be used with the legacy driver
abort() was called at PC 0x420a3635 on core 0
Core 0 register dump:
MEPC : 0x40803e0a RA : 0x4080975c SP : 0x4087e140 GP : 0x40811ce0
TP : 0x00000000 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x4087e16c S1 : 0x4087e16c A0 : 0x4087e178 A1 : 0x4087e15a
A2 : 0x00000000 A3 : 0x4087e1a5 A4 : 0x00000001 A5 : 0x40823000
A6 : 0x00000000 A7 : 0x76757473 S2 : 0x421a9000 S3 : 0x4081e194
S4 : 0x42160000 S5 : 0x42000000 S6 : 0x40803a38 S7 : 0x0015cdb0
S8 : 0x00074780 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001881 MTVEC : 0x40800001 MCAUSE : 0x00000007 MTVAL : 0x00000000
MHARTID : 0x00000000
Stack memory:
4087e140: 0x00000000 0x00000000 0x4087e16c 0x4080ea0e 0x40803a38 0x42000000 0x42160030 0x4081498c
#0 0x4080ea0e in __assert_func at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/assert.c:34
#1 0x40803a38 in rv_utils_dbgr_is_attached at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/riscv/include/riscv/rv_utils.h:203
(inlined by) esp_cpu_dbgr_is_attached at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_hw_support/include/esp_cpu.h:506
(inlined by) call_start_cpu0 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/port/cpu_start.c:307
#2 0x4081498c in __global_pointer$ at ??:?
4087e160: 0x4087e16c 0x408149a8 0x4087e158 0x61303234 0x35333633 0x28010200 0x726f6261 0x20292874
#0 0x408149a8 in __global_pointer$ at ??:?
4087e180: 0x20736177 0x6c6c6163 0x61206465 0x43502074 0x34783020 0x33613032 0x20353336 0x63206e6f
4087e1a0: 0x2065726f 0x00000030 0x42180000 0x4eb09137 0x20001090 0x421b5ad4 0x421b5b24 0x420a3638
#0 0x420a3638 in check_rmt_legacy_driver_conflict at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/driver/deprecated/rmt_legacy.c:1380 (discriminator 3)
4087e1c0: 0x421a9000 0x421b5ad4 0x421b5b30 0x420a95f4 0x0000004d 0x00000001 0x0000004d 0x420a8cc2
#0 0x420a95f4 in do_global_ctors at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/startup.c:203
(inlined by) start_cpu0_default at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/startup.c:486
#1 0x420a8cc2 in esp_cache_err_int_init at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/port/soc/esp32c6/cache_err_int.c:39
4087e1e0: 0x0000004d 0x00000001 0x0000004d 0x40803ba6 0x43000000 0x421d479f 0x4215cdcf 0x42000000
#0 0x40803ba6 in call_start_cpu0 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/port/cpu_start.c:706
#1 0x4215cdcf in _flash_rodata_dummy_start at ??:?
4087e200: 0x43000000 0x421d479f 0x4215cdcf 0x4086f834 0x5218a20c 0x00160000 0x00010020 0x00090020
#0 0x4215cdcf in _flash_rodata_dummy_start at ??:?
4087e220: 0x42160020 0x42000020 0x00074780 0x0015cdb0 0x00010000 0x00200000 0x00000000 0x40880000
#0 0x42160020 in ?? at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_app_format/esp_app_desc.c:15
#1 0x42000020 in CRGB::operator+=(CRGB const&) at .pio/libdeps/esp32c6dev_8MB/FastLED/src/pixeltypes.h:268
4087e240: 0x00003958 0x4004b05c 0x0000ffff 0xffffffff 0x00000000 0x4087e3a0 0x00000000 0x4086fae0
4087e260: 0xd293b723 0x00010000 0x00200000 0x00010000 0x300206e9 0x40803a38 0x000000ee 0x0000000d
#0 0x40803a38 in rv_utils_dbgr_is_attached at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/riscv/include/riscv/rv_utils.h:203
(inlined by) esp_cpu_dbgr_is_attached at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_hw_support/include/esp_cpu.h:506
(inlined by) call_start_cpu0 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/port/cpu_start.c:307
4087e280: 0x00ffff00 0x01000000 0x42160020 0x00074780 0x40800000 0x0000b870 0x42000020 0x0015cdb0
#0 0x42160020 in ?? at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_app_format/esp_app_desc.c:15
#1 0x40800000 in _vector_table at ??:?
#2 0x42000020 in CRGB::operator+=(CRGB const&) at .pio/libdeps/esp32c6dev_8MB/FastLED/src/pixeltypes.h:268
4087e2a0: 0x4080b870 0x00005c68 0x408114e0 0x00003d10 0x50000000 0x00000004 0x00000000 0x00000000
#0 0x4080b870 in xTaskPriorityInherit at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:5221
#1 0x50000000 in ?? at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_hw_support/sleep_modes.c:247
4087e2c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e2e0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e300: 0x00000000 0x00000000 0x00010020 0x000847a8 0x00090020 0x001ecdd8 0x001f2a48 0x001f6760
4087e320: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e340: 0x00000000 0x00000000 0x001e6790 0x151bebf1 0x818fb06d 0xadd2df6e 0x98db8280 0x5218a20c
4087e360: 0xc2d7f6c1 0x7c26ddbe 0x325cbccd 0x00000000 0xffffffff 0x00000010 0x0000000a 0x40880000
4087e380: 0x00000000 0x000000cf 0x00003960 0x4086c476 0x8d88da2f 0xfa563071 0x00000000 0x00000000
4087e3a0: 0x0000e000 0x00002000 0x00000000 0x00000000 0x00000000 0x00000000 0x00010000 0x00200000
4087e3c0: 0x00210000 0x00200000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e3e0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e400: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e420: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000002 0x00000000
4087e440: 0x60002000 0x00000100 0x00000020 0x4001b1c0 0x5939474b 0x31e5e6ca 0x910381c0 0x00000000
4087e460: 0x9278f710 0x00000000 0x00010000 0x300203e9 0x4086c410 0x40875728 0x00000594 0x000000ee
4087e480: 0x0000000d 0x00ffff00 0x01000000 0x42003960 0x7533885e 0x88a0ebf5 0xb4069687 0x84dc75ea
#0 0x42003960 in std::vector<Segment, std::allocator<Segment> >::operator[](unsigned int) at c:\tools\pio_pkg\toolchain-riscv32-esp\riscv32-esp-elf\include\c++\12.2.0\bits/stl_vector.h:1124
(inlined by) mode_random_chase() at wled00/FX.cpp:1791
4087e4a0: 0xe59e24f9 0x758a850e 0x6a0a0365 0x49a7c3ac 0x01d3171d 0x00000000 0x00000000 0x00000000
4087e4c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x4087e5f0 0x00000101 0x00000002
4087e4e0: 0x88a0ebf5 0xb4069687 0x84dc75ea 0xe59e24f9 0x758a850e 0x6a0a0365 0x49a7c3ac 0x01d3171d
4087e500: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e520: 0x69676572 0x775f6332 0x65746972 0x73616d5f 0x6d695f6b 0x00006c70 0x00000000 0xcf000000
ELF file SHA256: 5fd475acd8a7ccfc
Rebooting...Edit: in practice any firmware that still uses the "old" RMT driver might crash, because arduino-esp32 v3.0.x itself links in the new RMT driver -> legacy driver conflict. |
|
its booting into WLED 🥳 🚀 |
* reduce debug level * enable websockets (seems to work) * move NO_FASTLED into chip section * adjust LEDPIN and BTNPIN, to match my board
|
ESPHome seem to have their own version of AsynTCP and AsyncWebServer, maintained regularly. Might be worth to give them a try on -C6.
|
|
@softhack007 , didn’t WLED AC updated their version of espasyncwebserved recently ? Maybe the same as esphime uses? |
|
Espressif has declared commonly used network API's as "deprecated" - WiFiClient, WiFiServer, WiFiUdp and WiFiClientSecure another area where lots of rework will be needed, just to keep existing features working on new chips like -C6. |
|
Known problem: IP address is always shown as "0.0.0.0" in info page -> might also cause some connection problems in WS or Web UI.
|
|
ToDo: upgrade to arduino-esp32 v3.0.2.
--> check if it works without FASTLED_NO_FASTLED now |
|
The mentioned PR is just in the master branch at this time. It will be available in 3.0.3. |
@SuGlider thanks for the good help. 👍 I can confirm the fix works, no more crashes at startup 🥇 |
|
New toDo: upgrade to latest framework
|
This is a first, very experimental support for the ESP32-C6 chip. It compiles, but nothing tested on the hardware yet.
Its intended for WLED/MM core developers, to understand better where the differences are.
If you don't consider yourself a "core developer", then please ignore this PR and do something meaningful 😛
Currently some libraries are not compiling with Arduino Core 3.0.x, so i've forked these and made a few minimal patches to allow compiling. Also I had to make a "no FastLED" version of FastLED, because the clockless RMT driver of fastLED is causing crashes at startup - even when all outputs are managed by NeoPixelBus ->
E (423) rmt(legacy): CONFLICT! driver_ng is not allowed to be used with the legacy driver.