You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
On RP2040, multiple calls to addLeds() results in "Error: invalid offset, value too big" #1571
I'll talk to Kriegsman about it. I don't know anything about the ARM code, and with basically zero information about where the error is occuring in the compilation process or in the code, it's hard to know where to look.
It looks like we've got multiple issues for this problem already. We need to figure out a solution, but you can see what others have done: #1481 earlephilhower/arduino-pico#1649
But snarkiness aside, it's never a waste of time to provide that kind of information. I started to work on reproducing the error using that information before I realized that it was an existing issue with a bunch of work already done.
Reacted by Jonathan Haylett, Cameron Tacklind, hlcm and Cassandra "ZZ Cat" Robinson
This typically happens when asm code is compiled with debug symbols on. Arduino was surprisingly compiling in debug by default in a lot of cases. I'm not sure if this asm generation bug is still lurking. Recently I've moved the RPXXXX builds to an open source version and it seems to have gone away in our tests.
I might suggest moving to platformio and using the platform authored by @max.
Here are some of our platformio.ini build changes from our config file to reflect this:
I want to mention that this issue may have been fixed. It turns out that some code can overflow if the generated assembly is too big to fit on a 64k code page. I've gone ahead and added a GCC attribute to compile code using Os here 5016c54
This should be fixed now. It looks like our M0_FALLBACK was supposed to be NOT included by default (according to the comments) but it was anyway. Users found disabling this fixed it. I went ahead and fixed the issue and it seems not break the tests so making it the default to align with the comments in the codebase.
Activity
samguyer commentedon Dec 7, 2023
Not a lot of information! Could it be a compiler bug? Do we even have any assembly code in the ARM platform implementation?
rah2501 commentedon Dec 7, 2023
Enough to reproduce the issue.
Could be.
FastLED contains Arm assembly code, yes.
samguyer commentedon Dec 7, 2023
I'll talk to Kriegsman about it. I don't know anything about the ARM code, and with basically zero information about where the error is occuring in the compilation process or in the code, it's hard to know where to look.
rah2501 commentedon Dec 7, 2023
If you want to work on this issue, I would suggest that reproducing the error for yourself would be the first step.
samguyer commentedon Dec 7, 2023
Remind me again: what is the exact configuration you're using? Are you using the Arduino IDE? What version and what board?
rah2501 commentedon Dec 7, 2023
The error occurs compiling with both the Arduino IDE and PlatformIO.
Arduino 1.8.19, Raspberry Pi Pico/RP2040 3.6.2, FastLED 3.6.0; board Raspberry Pi Pico
PlatformIO 6.1.1, framework-arduinopico 1.30600.0+sha.41b0686, FastLED 3.6.0; board pico
samguyer commentedon Dec 7, 2023
It looks like we've got multiple issues for this problem already. We need to figure out a solution, but you can see what others have done:
#1481
earlephilhower/arduino-pico#1649
rah2501 commentedon Dec 7, 2023
Bit of a waste of my time getting those version numbers.
samguyer commentedon Dec 8, 2023
Well, it was a bit of a waste of my time to find the links for the existing issues for you. So, I think we're square on that account.
samguyer commentedon Dec 8, 2023
But snarkiness aside, it's never a waste of time to provide that kind of information. I started to work on reproducing the error using that information before I realized that it was an existing issue with a bunch of work already done.
zackees commentedon Aug 31, 2024
This typically happens when asm code is compiled with debug symbols on. Arduino was surprisingly compiling in debug by default in a lot of cases. I'm not sure if this asm generation bug is still lurking. Recently I've moved the RPXXXX builds to an open source version and it seems to have gone away in our tests.
I might suggest moving to platformio and using the platform authored by @max.
Here are some of our platformio.ini build changes from our config file to reflect this:
zackees commentedon Sep 4, 2024
I want to mention that this issue may have been fixed. It turns out that some code can overflow if the generated assembly is too big to fit on a 64k code page. I've gone ahead and added a GCC attribute to compile code using
Oshere 5016c54zackees commentedon Sep 6, 2024
This should be fixed now. It looks like our M0_FALLBACK was supposed to be NOT included by default (according to the comments) but it was anyway. Users found disabling this fixed it. I went ahead and fixed the issue and it seems not break the tests so making it the default to align with the comments in the codebase.