-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
ESP32-C3 doesn't support pattern of #include "rom/uart.h" (IDFGH-4758) #6561
Comments
Thanks for reporting. |
Hi @pjsg, Thanks for the clear issue report. In this case, it may be counter-intuitive but this behaviour is by design. When ESP-IDF only supported ESP32, there was a lot of code like However, each Espressif chip's ROM is different and APIs that work on ESP32 may not compile, or they will compile and then not work the same, on other chips. For this reason, when we added ESP32-S2 support (and now ESP32-C3) we changed the method for including ROM headers. If you
This deprecation warning is intended to not break compatibility for ESP32 users, but it will be removed in a major release in the future (maybe ESP-IDF v5.0). There are some alternatives possible for when you need to use ROM functionality:
If you've found some Espressif-provided code or example that includes |
Thanks for this -- it certainly gives me direction to go in. My problem is that I'm porting the nodemcu-firmware (the lua interpreter/environment) and it has to work on regular esp32 as well as the c3. (The esp8266 version is essentially completely separate and runs in the legacy environment). |
Hi @pjsg, ah I see! Having a peek at nodemcu/nodemcu-firmware#3397, it looks like this involves updating from ESP-IDF V3.x with GNU Make to V4.x with CMake - so there a few differences, but hopefully you can get past them smoothly. If you're updating NodeMCU to use ESP-IDF V4.3 or V4.4 for both ESP32 and ESP32-C3 then it shouldn't be too hard to get code that runs on both with minimal target-specific #ifdefs but it may require some changes - like the ROM headers. As a first step, suggest looking to see if the thing(s) NodeMCU uses from |
@projectgus Thanks -- some of these are easy. How about
The last file says just to use Thanks |
Hi @pjsg, Which functions is nodemcu using from the ROM SPI flash headers? Suggest not calling ROM SPI flash functions from ESP-IDF apps at all if possible (I think all of these headers have warnings to this effect), call the relevant ESP-IDF APIs instead: (To answer the general question, on esp32c3 you would need to use the esp32c3/rom/xyz.h flavor and not the esp32/rom/xyz.h flavor - as the two chips have different ROM contents.) |
By aggressively commenting out features, I have the basic command
input/interpret/output loop running. Now on to get the network stack up and
running.....
…On Thu, Feb 18, 2021 at 9:43 PM Angus Gratton ***@***.***> wrote:
Hi @pjsg <https://github.com/pjsg>,
Which functions is nodemcu using from the ROM SPI flash headers? Suggest
not calling ROM SPI flash functions from ESP-IDF apps at all if possible (I
think all of these headers have warnings to this effect), call the relevant
ESP-IDF APIs instead:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/spi_flash.html
(To answer the general question, on esp32c3 you would need to use the
esp32c3/rom/xyz.h flavor and not the esp32/rom/xyz.h flavor - as the two
chips have different ROM contents.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6561 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALQLTNQVPZGU4UKZRHYNJTS7XF2TANCNFSM4XZM4KAA>
.
|
Problem Description
The system provided header file rom/uart.h cannot be found when configured for esp32c3
Fix
Change the INCLUDE line in
sdk/esp32-esp-idf/components/esp_rom/CMakeLists.txt
toThe text was updated successfully, but these errors were encountered: