Repository: FastLED/FastLED

Issue #1541: FastLED with earlephilhower - redefined errors for sei and cli
Created: 2023-09-18T15:44:04Z
For RP2040, the only Arduino framework to support both cores for use with PlatformIO is earlephilhower.
This implementation of the Arduino framework recognizes there are two cores and allows sei() and cli() to work on each core.
It does this by having its own defines for sei and cli.
The FastLED library also attempts to define sei and cli.
Ideally, the FastLED code would check if the definitions already exist. Currently, it generates compiler warnings.
In file .../FastLED/src/led_sysdefs.h:38,
                 from .../FastLED/src/FastLED.h:55,
                 from src/leds.h:13,
                 from src/main.cpp:30:
.../FastLED/src/platforms/arm/rp2040/led_sysdefs_arm_rp2040.h:87: warning: "cli" redefined
    #define cli() (saved_interrupt_status = save_and_disable_interrupts())

In file .../.platformio/packages/framework-arduinopico/cores/rp2040/Arduino.h:74:
note: this is the location of the previous definition
    #define cli() noInterrupts()

In file .../FastLED/src/led_sysdefs.h:38,
                 from .../FastLED/src/FastLED.h:55,
                 from src/leds.h:13,
                 from src/main.cpp:30:
.../FastLED/src/platforms/arm/rp2040/led_sysdefs_arm_rp2040.h:88: warning: "sei" redefined
    #define sei() (restore_interrupts(saved_interrupt_status))

In file .../.platformio/packages/framework-arduinopico/cores/rp2040/Arduino.h:73: 
note: this is the location of the previous definition
    #define sei() interrupts()

Duplicate issue #1593: FastLED on RP2040 cli redefined
Created: 2024-02-06T22:21:36Z
This warning seems to be new. (3.x) I now get a warning:

In file included from C:\Users\gavin\OneDrive\Documents\Arduino\libraries\FastLED\src/led_sysdefs.h:38,
from C:\Users\gavin\OneDrive\Documents\Arduino\libraries\FastLED\src/FastLED.h:51,
from C:\Users\gavin\OneDrive\Documents\Arduino\RP2040-7Pixel\RP2040-7Pixel.ino:10:
C:\Users\gavin\OneDrive\Documents\Arduino\libraries\FastLED\src/platforms/arm/rp2040/led_sysdefs_arm_rp2040.h:87: warning: "cli" redefined
87 | #define cli() (saved_interrupt_status = save_and_disable_interrupts())
|
In file included from C:\Users\gavin\AppData\Local\Temp\arduino\sketches\2E7CED4A54FD27679058BBB361D7A6DC\sketch\RP2040-7Pixel.ino.cpp:1:
C:\Users\gavin\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\3.3.1\cores\rp2040/Arduino.h:74: note: this is the location of the previous definition
74 | #define cli() noInterrupts()

Same for sei()
Also

C:\Users\gavin\OneDrive\Documents\Arduino\libraries\FastLED\src/fastspi.h:172:23: note: '#pragma message: Forcing software SPI - no hardware SPI for you!'
172 | #      pragma message "Forcing software SPI - no hardware SPI for you!"

Should have worked with PIO. Did I mess something up?

Closing comment (2024-02-14T22:52:47Z): Thanks for the pointer to the fix.
…
________________________________
From: Jonathan Haylett ***@***.***>
Sent: Wednesday, February 14, 2024 12:24:59 PM
To: FastLED/FastLED ***@***.***>
Cc: Gavin Perry ***@***.***>; State change ***@***.***>
Subject: Re: [FastLED/FastLED] FastLED on RP2040 cli redefined (Issue #1593)


Although the title doesn't match it looks like this issue is covered in previous issue here: "Error: invalid offset, value too big" when building for Raspberry Pi Pico (RP2040)<#1481 (comment)> #1481<#1481>

This issue is actually a duplicate of #1541<#1541> which should be fixed by #1575<#1575>

—
Reply to this email directly, view it on GitHub<#1593 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVR4PP54EB2SHCIEDBZVHJLYTT6PXAVCNFSM6AAAAABC4Y3XX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBUGM3TAOBXHE>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>