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

Initial support for ESP32-C6 and ESP32-H2, plus assorted fixes & improvements #3646

Merged
merged 16 commits into from Apr 26, 2024

Conversation

jmattsson
Copy link
Member

This is a frustratingly assorted PR, and includes:

  • Reworked console support, to now also work with USB Serial JTAG consoles and USB CDC consoles. All three have been tested across a variety of chips & modules and confirmed to work.
  • Initial support for the ESP32-C6.
  • Initial support for the ESP32-H2.
  • As part of adding those two chips, I also corrected a bunch of incorrect module deps in Kconfig, as well as some in CMakeLists.txt
  • Updated github actions actions to deal with the deprecation warning.
  • In doing so, uncovered that part of the build had been silently broken for quite some time, so I fixed that.
  • Minor IDF upgrade to v5.1.3, in order to get the USB CDC console working properly.
  • One missed type correction over in uzlib, which should've been fixed long ago but hadn't broken the build until now.
  • Addressed a potential null pointer dereference with the Lua prompt which hit me while I was debugging the early startup flow.
  • Finally, an ugly workaround for S2 with USB-CDC console when initialising wifi.

Despite the wide coverage, the changes themselves are rather small. They are also somewhat interlinked, so splitting the PR seemed more hassle that it's worth. You can attempt to convince me otherwise :)

jmattsson and others added 16 commits March 27, 2024 15:45
On an empty line input, a C3 with UART console would panic while attempting
to output the new Lua prompt. The backtrace shows a xQueueSemaphoreTake
with uxItemSize==0 as the panic cause, deep inside the uart driver, invoked
via vfs_uart and vfs_console layers, from printf.
Similarly, the printf for outputting a backspace/erase sequence would also
trigger a panic.

This workaround (of not mixing fflush() with printf) is likely merely hiding
a deeper issue, but it appears to be consistent. Plus, printf with no args
and a user-supplied format string is a no-no and should be fixed anyway.
Seems on Xtensa it ended up not being enough.
Plus fixup of module selection for a variety of targets.
Newer IDF toolchain is stricter, and we'd apparently failed to build test
the Lua-5.1 path for some time.
Copy link
Member

@pjsg pjsg left a comment

Choose a reason for hiding this comment

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

This all looks plausible to me. I'm glad to see the C6 support as I want to play with the zigbee stuff.

@marcelstoer
Copy link
Member

@pjsg feel free to merge or squash-merge this, thanks.

@pjsg pjsg merged commit 4cdebe7 into nodemcu:dev-esp32 Apr 26, 2024
24 checks passed
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.

None yet

3 participants