Skip to content

Conversation

@troyhacks
Copy link
Collaborator

@troyhacks troyhacks commented Nov 10, 2024

Adding this as a draft for visibility.

IDF v5.3.1

What works now, or as good as can be expected:

  • NeoPixelBus doesn't work yet, but I'm on their "v3" release now, which is being worked on. It compiles at least.
  • Still on @softhack007's FastLED version for the C6.
  • ESPAsyncWebServer works fine, I did need to change a line or two for some check it was doing but it was an easy hack.
  • Audio Reactive worked absolutely fine out of the box.

What I had to do/rewrite (done):

  • Well, get ESP32-Arduino building for the ESP32-P4 with IDF v5.3.1
  • Rewrite WiFi to use esp_wifi.h (and esp_hosted.h for the embedded C6 on the board)
  • ...but esp_hosted.h is just a layer on esp_wifi.h
  • Rewrite Ethernet to use esp_eth.h
  • Internal network class needed rewritten for new-style APIs
  • Temporary (or not) defines to remove some incompatible code, or switch for the P4 code.

What's on the TODO list: (not fatal)

  • Some debug/info for PSRAM and Chipset is missing or disabled.
  • MDNS might not be working.
  • I think NTP is OK now but not 100% sure.

...and of course getting local LEDs to work, as that's a blocker from being "done"

softhack007 and others added 30 commits June 13, 2024 16:51
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
* more debug output
* added my own fork of FastLED ( looks like more bugs to solve ....)
... instead of reduced Tasmota-Arduino
* reduce debug level
* enable websockets (seems to work)
* move NO_FASTLED into chip section
* adjust LEDPIN and BTNPIN, to match my board
@troyhacks troyhacks added enhancement New feature or request hardware hardware problem brilliant labels Nov 10, 2024
@troyhacks troyhacks self-assigned this Nov 10, 2024
@troyhacks troyhacks marked this pull request as draft November 10, 2024 19:18
@troyhacks troyhacks changed the title P4 Experimental P4 Experimental Build Nov 10, 2024
@troyhacks troyhacks changed the base branch from mdev to P4_experimental November 19, 2024 17:39
@troyhacks troyhacks marked this pull request as ready for review November 19, 2024 17:40
@troyhacks troyhacks merged commit 80be8f0 into MoonModules:P4_experimental Nov 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

brilliant enhancement New feature or request hardware hardware problem magic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants