-
Notifications
You must be signed in to change notification settings - Fork 347
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
No longer compiling with VS code / PIO #360
Comments
I just created a PR for a fix to this issue. Not sure how elegant my fix is, but it does the trick for me. |
Ugh, those min/max macros have always been problematic. Rather than fix the issue with a different macro, I'd prefer to switch the code to use std::min and std::max. That's been on my to-do list for a while. I don't really use PlatformIO, but I installed its extension in VS Code, ran the ws2812fx_segments example sketch, and it seemed to work ok. But that could just be me not knowing what I'm doing. Can you try to reproduce this issue with the Arduino IDE? That'll make it easier for me to debug. |
The compilers/versions must be different between Arduino IDE and Platformio. I will dig in on that a bit and see if I can get the error to happen in IDE OR make a simple case in Platformio. In the meantime, I will change my solve to use std::max and check it. That would be a better solution compared to my hack. |
New PR with std::max usage implemented |
OK, the switch to std::min/std::max doesn't work for AVR boards, since AVR boards don't seem to support the C++ STL. So I'll have to rethink that. I'm back to trying to recreate the issue with PlatformIO, which I normally don't use. I installed PlatformIO and created a project with a simple WS2812FX sketch. It builds, uploads and runs on my ESP32 with no issues. I'm not sure what I'm doing "right". PlatformIO prints this info when I compile the sketch:
The Arduino_ESP core v1.0.6 and ESP IDF v3.5.0 are quite old. Should I try upgrading to new versions? How would I do that? Any help with reproducing the issue on my end would be appreciated. |
I will work on the platformio stuff next Monday when work schedule frees up.
Do you want to try the first PR on the AVR platform? This is a new macro that works on the ESP32. It might work on the AVR as well. Since we can’t use STD on AVR, this might be the path
From: Keith Lord ***@***.***>
Date: Thursday, October 24, 2024 at 6:01 AM
To: kitesurfer1404/WS2812FX ***@***.***>
Cc: Erik Olson ***@***.***>, Author ***@***.***>
Subject: Re: [kitesurfer1404/WS2812FX] No longer compiling with VS code / PIO (Issue #360)
OK, the switch to std::min/std::max doesn't work for AVR boards, since AVR boards don't seem to support the C++ STL. So I'll have to rethink that.
I'm back to trying to recreate the issue with PlatformIO, which I normally don't use. I installed PlatformIO and created a project with a simple WS2812FX sketch. It builds, uploads and runs on my ESP32 with no issues. I'm not sure what I'm doing "right".
PlatformIO prints this info when I compile the sketch:
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/mhetesp32minikit.html
PLATFORM: Espressif 32 (3.5.0) > MH ET LIVE ESP32MiniKit
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (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.10006.210326 (1.0.6)
- tool-esptoolpy @ 1.30100.210531 (3.1.0)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-xtensa32 @ 2.50200.97 (5.2.0)
The Arduino_ESP core v1.0.6 and ESP IDF v3.5.0 are quite old. Should I try upgrading to new versions? How would I do that?
Any help with reproducing the issue on my end would be appreciated.
—
Reply to this email directly, view it on GitHub<#360 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAN3UDQYV7GB637RFMVYJQ3Z5DVRRAVCNFSM6AAAAABQGM4AA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZVGIZTIMRSGU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I did an update and now the latest lib no longer compiles. Here are the errors I am seeing
The text was updated successfully, but these errors were encountered: