-
Notifications
You must be signed in to change notification settings - Fork 82
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
Compile error in analog_reader.h with S2 and S3 variants #730
Comments
Try ADC_ATTEN_DB_0 |
Could you provide your
With the above setup, I couldn't reproduce the error. |
Here is my platformio.ini file: [env] [espressif32_base] [env:adafruit_qtpy_esp32s3_n4r2] build_flags = |
I have the exact same problem compiling unmodified project template.
|
Same error with my new Halmet board with regular ESP32! |
Same issue. I didn't change anything of the downloaded code. |
I am seeing this as well with an ESP32-DevKitC board. I will eventually be using the ESP32-S3, so it won't be resolved with the target HW. If I change it to ADC_ATTEN_DB_11 or ADC_ATTEN_DB_0, it works fine. Is there a problem changing this to ADC_ATTEN_DB_0 (as you commented above) in the source file? |
Hit the same roadblock. Steps to reproduce:
Same issue. |
I am unable to repeat this issue, even with a fresh install of PlatformIO framework. Both esp32 and esp32s3 builds go through just fine. Could you try deleting the |
Is it possible you have a custom sdkconfig file for your ESP controller? I'm wondering if a setting in there can cause your defaults to change. |
@mairas as stated in my comment I've created completely new repo using your template (no .pio existed prior building new empty firmware). Will check version of ESP32 SDK version and try to update to latest. |
No, not really. When using the default Arduino framework, sdkconfig.h is always provided by the framework (unless you very specifically configure Arduino as an ESP-IDF component, but that's a whole different kettle of fish). |
Some more observations. Most of the examples are being built in CI, and many of them use AnalogInput (and AnalogReader by extension). Similarly, I just created a new Ubuntu 22.04 virtual machine, installed platformio and cloned the project-template repo. There were no issues in compiling. Now, don't get me wrong. I'm not suggesting this isn't a real problem for many people - I would very much like to find a fix for it, even if it's just pinning some platformio framework versions in platformio.ini. But since I can't reproduce the issue, I can't do much about it. If/when someone tries to clean their |
I just build a previous project -> Build succeeded
Platformio.ini
I will try to rename my .platformio directory and build again tomorrow |
Will try to clean my platformio and see how that goes. Little busy with life right now, sorry! |
I am not a real coder, so I just follow the instructions I find on the SensESP github site/Signalk site or whatever I find using Google to set up stuff. From the moment it runs I can work with the code. So below I just drop whatever comes up on my screen. Hopefully it gives a lead to the issue. Renamed the .platformio directory. A new directory is created.
Opening project and build
Not sure what lib FreeRTOS is and why it is not loaded. Does this have anything to do with the issue (before I try to solve the FreeRTOS issue myself)? |
Getting compile error in platformio with SensESP v3 in file analog_reader.h when using ESP32-S2 and S3 variants:
pio/libdeps/adafruit_qtpy_esp32s3_n4r2/SensESP/src/sensesp/sensors/analog_reader.h:28:30: error: 'ADC_ATTEN_DB_12' was not declared in this scope
adc_atten_t attenuation = ADC_ATTEN_DB_12;
^~~~~~~~~~~~~~~
.pio/libdeps/adafruit_qtpy_esp32s3_n4r2/SensESP/src/sensesp/sensors/analog_reader.h:28:30: note: suggested alternative: 'ADC_ATTEN_DB_11'_
I can get it to compile by changing to ADC_ATTEN_DB_11 but noticed in the ESP-IDF docs:
enumerator ADC_ATTEN_DB_11
This is deprecated, it behaves the same as ADC_ATTEN_DB_12
So not sure if a Pull request will work for all ESP32s !
Update 8Sept2024: Same error with my new Halmet board with regular ESP32!
The text was updated successfully, but these errors were encountered: