Skip to content

Conversation

@blazoncek
Copy link
Contributor

Also updates NeoPixelBus to 2.7.3 (adding UCS890x support)

NeoPixelBus 2.7.3 (adding UCS890x support)
@softhack007
Copy link
Member

softhack007 commented Mar 21, 2023

Hi,
platform = espressif32@5.2.0 seems to be a good choice for the new MCUs, works well on the devices I have.
maybe also add platform_packages = for the new MCUs, so the 8266 packages from [common] are not used on esp32.

As i said in my other comment, -Dregister= is absolutely dangerous, because it also affects inline assembler (macro = textual replacement) and it definitely breaks arduino core on ESP32-C3.

Will do a more detailed review later.

@blazoncek
Copy link
Contributor Author

@softhack007 by all means you are welcome to contribute. 😄

I do not know how platform_packages affects the build process (it didn't appear to do anything on ESP32 related builds) but the change was needed for ESP8266 to allow newer C++ compiler for it.

- corrected some broken references
- added `platform_package =` --> use default packages
- renamed env:esp32c3 to env:esp32c3dev to avoid confusion
- added lolin_s2_mini to CI builds
so it cannot destroy builds for ESP32 devices
@softhack007
Copy link
Member

PS: You're right, these massive warnings about "register" from the fastled lib are absolutely annoying. I've move the -Dregister= override into the 8266 section - please feel free to un-comment it, in case you get working binaries on 8266 (could not check that tonight).

experimental ESP32 buildenv using ESP-IDF V4.4.x / arduino-esp32 v2.0.5
Warning: this build environment is not stable!!
-D DECODE_SAMSUNG=true
-D DECODE_LG=true
;-Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library
;-Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library ;; warning: this breaks framework code on ESP32-C3 and ESP32-S2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Enabling this did not break S2 or C3 compiles for me.

Copy link
Member

Choose a reason for hiding this comment

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

I saw problems in platform 5.1.1, maybe espressif changed something in 5.2.0.

Copy link
Member

@softhack007 softhack007 Mar 22, 2023

Choose a reason for hiding this comment

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

The build warnings on -C3 looked like this with "register" override enabled

/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32c3/include/riscv/include/riscv/semihosting.h:75:19: warning: ignoring asm-specifier for non-static local variable 'a0'
     register long a0 asm ("a0") = id;
                   ^~
.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32c3/include/riscv/include/riscv/semihosting.h:76:19: warning: ignoring asm-specifier for non-static local variable 'a1'
     register long a1 asm ("a1") = (long) data;
                   ^~

see https://gcc.gnu.org/onlinedocs/gcc/Local-Register-Variables.html

@softhack007
Copy link
Member

softhack007 commented Mar 22, 2023

Any idea why the github PlatformIO CI build still fails for nodemcuv2 ? It's working on my local PC.

error msg from github CI build:

Compiling .pio/build/nodemcuv2/libcde/FastLED/bitswap.cpp.o 
xtensa-lx106-elf-g++: error: unrecognized command line option '-std=gnu++17' 
 [.pio/build/nodemcuv2/libcde/FastLED/FastLED.cpp.o] Error 1 
xtensa-lx106-elf-g++: error: unrecognized command line option '-std=gnu++17' 
[.pio/build/nodemcuv2/libcde/FastLED/bitswap.cpp.o] Error 1

@blazoncek
Copy link
Contributor Author

@Aircoookie @softhack007 do we merge these changes?
FYI: My 8266, S2 and C3 are working without issues.

I do not know why GH actions are failing. It compiles without issues on my mac.

@softhack007
Copy link
Member

softhack007 commented Mar 27, 2023

@Aircoookie @softhack007 do we merge these changes? FYI: My 8266, S2 and C3 are working without issues.

I do not know why GH actions are failing. It compiles without issues on my mac.

Same here on my Windows - compiles without any complains. 👍 OK to merge from my side.

I'm wondering if we should make these changes before merging:

  1. add -Wno-attributes to standard build flags, because it will silence any NeoPixelBus warnings for 'maybe_unused'
  2. Move -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 to the global sections. I don't see any meaningful use for MSC or DFU with WLED. So the only flag that remains for user envs is to set -DARDUINO_USB_CDC_ON_BOOT={0,1} accordingly for debugging.

What do you think?

@Aircoookie
Copy link
Member

Seems like the GH actions machine uses a different xtensa toolchain as default than our local build environments. Explicitely setting the latest seems to take care of it. Approving from my side now👍

@softhack007 I would agree with your proposed changes too. If you'd like, you can add them and merge.

* -Wno-attributes added to common flags
* USB_MSC and USB_DFU flags moved to common board sections (does not make sense with WLED to ernable these)
based on proposal from  in PR #2951 by @andyshinn.
2MB does not allow to have an OTA partition, so this feature is disabled.
@softhack007 softhack007 merged commit 51f38e0 into main Mar 29, 2023
@softhack007 softhack007 deleted the esp8266-core branch March 29, 2023 22:30
softhack007 added a commit to MoonModules/WLED-MM that referenced this pull request Jun 6, 2023
* esp8266 core 4.1.0
* esp32 "V4" core 5.2.0
* neopixelbus 2.7.5
* use NeoPixelBusLg
* Make SPI bus speed user configurable

* adjust MM buildEnv to match upstream

wled#3144

wled#3173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lolin_c3_mini board support

4 participants