-
Notifications
You must be signed in to change notification settings - Fork 13
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 errors using esp32 Board library 2.0.0 and 2.0.1, in Arduino IDE 1.8.6 #12
Comments
Arduino-esp32 2.0.x is based on ESP-IDF v4.4 (pre-release code). A few adjustments will be necessary to compile against the newer versions. For now I'd suggest stick with 1.0.6 until the necessary adjustments are made. |
Thanks for the information atanisoft. I appreciate you taking the time to respond. It's good to get information back from others like yourself, who have a better understanding of why the error was occurring than I did. I will stick with v1.0.6 for now. I thought I'd just make a note about this problem here, in case others had the same issue. |
The code reported as in error has been modified and compiled without errors and ran with ESP32 support v2.0.4 (most recent version on PlatformIO) and v2.0.7 (on Arduino IDE). Thanks for reporting this, and sorry it's been so long. |
Update code to work with ESP32 support v2.0.4 (current on Arduino and on PlatformIO).
Thanks for looking into this Neil. I'm now running the Arduino IDE 2.0.4, and I upgraded the ESP32 library today to v2.0.7. I then downloaded the DCCInspector-EX code as a ZIP file and placed the new code in the Arduino folder on my system. I've set the board to the Heltec WiFi Kit 32. When I try to compile it, I'm now getting a different error:
Here is the full error text: `In file included from C:\Users\Trevor\Documents\Arduino\DCCInspector-EX\OledDisplay.cpp:24: exit status 1 Compilation error: expected unqualified-id before numeric constant` I assume I've got something wrong on my system. Can you assist please? |
Did you clear everything out of the folder first? What version of the Adafruit SSD1306 Library do you have installed? Strange that I was able to duplicate that error, which is an odd error, but when something I did made that disappear and others appear. I was bouncing back and forth between the 1.8.9 IDE and the 2.0.4 IDE and I installed the latest Adafruit library. Now I get different errors. |
@FrightRisk The issue in this case is your |
Sorry, I was a bit premature in my comments here - I've produced a new version in the bugfixes branch, but that hasn't made its way to master yet. I should have made that clear. The latest error you are seeing appears to come from the order in which the include files are included, I'll look at fixing that too. |
The problem is that there used to be a |
That define should still be present if you select the board in the boards menu. Can you confirm it is indeed missing in the verbose compile output? The issue above for the define is due to the pins_arduino.h has a definition that you are trying to overwrite in your |
I've copied a line from the output and they've changed the macro declaration from `"C:\Users\neil_\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\esp-2021r2-patch5-8.4.0/bin/xtensa-esp32-elf-g++" -DHAVE_CONFIG_H "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE "-DIDF_VER="v4.4.4"" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-IC:\Users\neil_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7/tools/sdk/esp32/include/newlib/platform_include" "- ... IC:\Users\neil_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7/tools/sdk/esp32/include/fb_gfx/include" "-IC:\Users\neil_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7/tools/sdk/esp32/dio_qspi/include" -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -c -w -Os -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_heltec_wifi_kit_32 -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="heltec_wifi_kit_32"" "-DARDUINO_VARIANT="heltec_wifi_kit_32"" -DARDUINO_PARTITION_default -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 "@C:\Users\neil_\AppData\Local\Temp\arduino\sketches\C9B6DAA3BC22209232E11319AF21D3A9/build_opt.h" "-IC:\Users\neil_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7\cores\esp32" "-IC:\Users\neil_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7\variants\heltec_wifi_kit_32" "-IC:\Users\neil_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7\libraries\WiFi\src" "-IC:\Users\neil_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7\libraries\WebServer\src" "-IC:\Users\neil_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7\libraries\ESPmDNS\src" "-Ic:\Users\neil_\Documents\Arduino\libraries\Adafruit_SSD1306" "-Ic:\Users\neil_\Documents\Arduino\libraries\Adafruit_GFX_Library" "-Ic:\Users\neil_\Documents\Arduino\libraries\Adafruit_BusIO" "-IC:\Users\neil_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7\libraries\Wire\src" "-IC:\Users\neil_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7\libraries\SPI\src" "C:\Users\neil_\AppData\Local\Temp\arduino\sketches\C9B6DAA3BC22209232E11319AF21D3A9\sketch\OledDisplay.cpp" -o nul |
Ouch, that is not expected. If you can file an issue for them to fix that as it should not be mixed case, my guess is someone incorrectly updated the board definition accidentially. |
Quite the opposite - the |
I submitted an issue. I suppose I could issue a PR too if I have time today |
it should be as simple as fixing this line. Probably also good to fix these as well:
and any others that used lower case incorrectly for build.board. |
Thanks Mike. @twr140 If you need something right now, changing line 92 of config.h to this:
Should work. It compiles, but I haven't tested it. @Neil-McK do we need one for ARDUINO_wifi_kit_32_V3. If someone selects that board, that is what is defined |
Just verifying, is everyone using the Heltec ESP32 dev-boards library by Heltec Automation version 1.1.1? Heltec is no longer in the name if it was before. Here is what the compiler sets if you select the "wifi kit 32" board: -DARDUINO_wifi_kit_32 -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="wifi_kit_32"" "-DARDUINO_VARIANT="wifi_kit_32"" |
@FrightRisk That doesn't look like the standard arduino-esp32 board definitions, there should be considerably more boards listed. |
I just realized there are 2 libraries. I was using the one that my Heltec board referenced. It is from here: https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series NOTES: This environment is fully cloned from espressif ESP32 and ESP8266 projects, on that basis, we fixed "variants" folder and "boards.txt", for convenience of "Arduino + ESP" beginners and Heltec ESP series Dev boards users. This environment does not include onboard OLED LoRa etc. drivers and examples anymore, they had been moved to another library: For ESP32 series: https://github.com/HelTecAutomation/Heltec_ESP32 For ESP8266 series: https://github.com/HelTecAutomation/Heltec_ESP8266 Sigh. Assuming all they changed was the 2 files listed above, I can use the Expressif library. |
I would strongly suggest moving to the Espressif repository only and not third party clones of the same. The version you referenced (WiFi_Kit_series) is a bit out-of-date considering it is only v2.0.4 and the latest is v2.0.7 in Espressif's repository. |
I was using the esp32 library that Arduino IDE recommends, which is 2.0.7 I
think. Pio uses 2.0.6 (edited). Neither is provided by heltec.
…On Wed, 8 Mar 2023, 19:27 Mike Dunston, ***@***.***> wrote:
Assuming all they changed was the 2 files listed above, I can use the
Espressif library.
I would strongly suggest moving to the Espressif repository only and not
third party clones of the same. The version you referenced
(WiFi_Kit_series) is a bit out-of-date considering it is only v2.0.4 and
the latest is v2.0.7 in Espressif's repository.
—
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASCNI2O2STKHTHUXBJSY5TLW3DMRHANCNFSM5KNUQTVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Correction - the PIO library is v2.0.6.
CONFIGURATION:
https://docs.platformio.org/page/boards/espressif32/heltec_wifi_kit_32_v2.html
PLATFORM: Espressif 32 (6.0.1) > Heltec WiFi Kit 32 (V2)
HARDWARE: ESP32 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog,
iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd,
olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20006.221224 (2.0.6)
- tool-esptoolpy @ 1.40400.0 (4.4.0)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
…------ Original Message ------
From: "Mike Dunston" ***@***.***>
To: "DCC-EX/DCCInspector-EX" ***@***.***>
Cc: "Neil McKechnie" ***@***.***>; "Mention"
***@***.***>
Sent: 08/03/2023 19:27:15
Subject: Re: [DCC-EX/DCCInspector-EX] Compile errors using esp32 Board
library 2.0.0 and 2.0.1, in Arduino IDE 1.8.6 (Issue #12)
>Assuming all they changed was the 2 files listed above, I can use the
>Espressif library.
>
I would strongly suggest moving to the Espressif repository only and
not third party clones of the same. The version you referenced
(WiFi_Kit_series) is a bit out-of-date considering it is only v2.0.4
and the latest is v2.0.7 in Espressif's repository.
—
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASCNI2O2STKHTHUXBJSY5TLW3DMRHANCNFSM5KNUQTVA>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
When using PlatformIO (framework v2.0.6), the macro ARDUINO_HELTEC_WIFI_KIT_32 is being defined and not ARDUINO_heltec_wifi_kit_32, so the conditional compilation works as intended. So it's possible that the Arduino IDE has always had the |
The original Heltec esp32 platform has the following in the boards.txt in the Arduino15 folder: PlatformIO doesn't appear to have a
|
An issue should definitely be logged as it should always be upper case to be consistent with typical usages / recommendations for #define based constants. |
Accidentally hit the close button, sorry... |
Well I certainly didn't expect to wake up to all this!
@Neil-McK: I'm sorry if I was too quick to try this out and have caused problems.
Reading through all the rest of the comments since you asked this, I think this isn't relevant, but my Adafruit SSD1306 library is v2.5.7
Thanks, but I won't bother yet. I simply tested this yesterday because Neil had kindly posted what I thought was a fix to the issue I raised, and felt it was the right thing to do to try it out and provide feedback. Thanks everyone for investigating this. Sorry that I can't help, but I'm not a programmer. I only know enough to be able to cobble together simple code for my own stuff, and most of the time just use what others such as yourselves kindly provide. |
Not at all, thanks for the feedback. You can see that it was very useful to us! I'll try to be more explicit on the state-of-play in future, to avoid raising expectations. |
* Add Heltec module support * Fix issue #14 HW Capture not working on Mega * Fix issue #12 Compile errors Update code to work with ESP32 support v2.0.4 (current on Arduino and on PlatformIO). * Get rid of 'undefined LED_BUILTIN' errors. * Fix compilation errors on Heltek Dev Kit 32 * Add yet another Heltec board category * Update .gitignore * Remove excluded files
The relevant changes have now been applied in the |
Thanks @Neil-McK There does appear to be an issue with the new(?) battery voltage check in setup() though. I'll open another Issue for it because it isn't related to this issue. |
Thanks for the update. I was aware that the esp32 battery check isn't
quite right. It was something I had on an esp8266 which worked fine. The
heltec esp32 should have the same connections but I don't know why it
doesn't work.
Cheers!
…On Thu, 23 Mar 2023, 23:45 twr140, ***@***.***> wrote:
Thanks @Neil-McK <https://github.com/Neil-McK>
I have successfully compiled the code this morning. From my quick check,
it all seems to be working on the actual hardware as well.
There does appear to be an issue with the new(?) battery voltage check in
setup() though. I'll open another Issue for it because it isn't related to
this issue.
—
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASCNI2O75YFWRYNWB2KIFBTW5TODNANCNFSM5KNUQTVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
If either of the above board libraries are used, this sketch fails to compile (in the Arduino IDE), with the final error message shown as:
I first noticed this when I had v2.0.1 of the board library installed. Taking this library back to v2.0.0 did not resolve the problem - the error message remained the same.
When I went back to v1.0.6 of the library, this error disappeared.
Here is the full text of the compiler error when v2.0.0 of the library was in use:
The text was updated successfully, but these errors were encountered: