Legion2 / CorsairLightingProtocol

Control LEDs connected to an Arduino with iCUE, create an unofficial Corsair iCUE compatible Arduino LED controller.
Apache License 2.0
509 stars 64 forks source link

RP Pi Pico - Unable to compile - invalid offset, value too big (0x0000049C) #340

Closed Mrjose77 closed 1 year ago

Mrjose77 commented 1 year ago

Describe the problem After some months I decided to create a second MultiFan project, I freshly install everything, I'm using:

But for some reason, when I try to compile my old project, I get the error "Invalid offset, value too big" (0x0000049C).

I tried to troubleshoot it by myself by taking the following actions:

Verify that the right port or board was selected. confirmed that I selected Adafruit TinyUSB on the USB stack. Make sure that the 6 RP2040 platform files are included in the FastLED/src/platforms/arm/rp2040 folder and that the #elif defined (ARDUINO_ARCH_RP2040) and #include statements in led_sysdefs.h and platforms.h Note: The files were already installed when I installed FastLED; I made sure they included the information listed on the [guide] (https://github.com/Legion2/CorsairLightingProtocol). I tried the TinyUSB example with the same results.

This is the output of the compilation of the TinyUSB example:

In file included from c:\Users\sper_\Documents\Arduino\libraries\FastLED\src/led_sysdefs.h:38,
                 from c:\Users\sper_\Documents\Arduino\libraries\FastLED\src/FastLED.h:51,
                 from c:\Users\sper_\Documents\Arduino\libraries\Corsair_Lighting_Protocol\src/FastLEDController.h:18,
                 from c:\Users\sper_\Documents\Arduino\libraries\Corsair_Lighting_Protocol\src/CorsairLightingProtocol.h:34,
                 from C:\Users\sper_\AppData\Local\Temp\.arduinoIDE-unsaved2023526-13160-19ojfuz.0a7w\TinyUSB\TinyUSB.ino:16:
c:\Users\sper_\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\sper_\AppData\Local\Temp\arduino\sketches\BC3352BA6D3165D4B564E7E1A5239232\sketch\TinyUSB.ino.cpp:1:
C:\Users\sper_\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\3.3.0\cores\rp2040/Arduino.h:74: note: this is the location of the previous definition
   74 | #define cli() noInterrupts()
      | 
In file included from c:\Users\sper_\Documents\Arduino\libraries\FastLED\src/led_sysdefs.h:38,
                 from c:\Users\sper_\Documents\Arduino\libraries\FastLED\src/FastLED.h:51,
                 from c:\Users\sper_\Documents\Arduino\libraries\Corsair_Lighting_Protocol\src/FastLEDController.h:18,
                 from c:\Users\sper_\Documents\Arduino\libraries\Corsair_Lighting_Protocol\src/CorsairLightingProtocol.h:34,
                 from C:\Users\sper_\AppData\Local\Temp\.arduinoIDE-unsaved2023526-13160-19ojfuz.0a7w\TinyUSB\TinyUSB.ino:16:
c:\Users\sper_\Documents\Arduino\libraries\FastLED\src/platforms/arm/rp2040/led_sysdefs_arm_rp2040.h:88: warning: "sei" redefined
   88 | #define sei() (restore_interrupts(saved_interrupt_status))
      | 
In file included from C:\Users\sper_\AppData\Local\Temp\arduino\sketches\BC3352BA6D3165D4B564E7E1A5239232\sketch\TinyUSB.ino.cpp:1:
C:\Users\sper_\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\3.3.0\cores\rp2040/Arduino.h:73: note: this is the location of the previous definition
   73 | #define sei() interrupts()
      | 
In file included from c:\Users\sper_\Documents\Arduino\libraries\FastLED\src/FastLED.h:75,
                 from c:\Users\sper_\Documents\Arduino\libraries\Corsair_Lighting_Protocol\src/FastLEDController.h:18,
                 from c:\Users\sper_\Documents\Arduino\libraries\Corsair_Lighting_Protocol\src/CorsairLightingProtocol.h:34,
                 from C:\Users\sper_\AppData\Local\Temp\.arduinoIDE-unsaved2023526-13160-19ojfuz.0a7w\TinyUSB\TinyUSB.ino:16:
c:\Users\sper_\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!"
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{standard input}: Assembler messages:
{standard input}:873: Error: invalid offset, value too big (0x0000049C)

exit status 1

Compilation error: exit status 1

Any insights about this?

HasseM commented 1 year ago

My bet is that this is an environment issue. I have exactly the same setup but no problem getting it compiling. So you may want to start-up a virtual pc and setup a whole new environment just for testing. Download everything again yourself and install it. Just te be sure it is your environment causing this.

Also you may want to check if this is caused by fastled in stead of the corsair lib. You may want to try to disable all corair code and just run fastled in the same project.

Mrjose77 commented 1 year ago

After a lot of testing, I was able to determine the cause of the issue. I created a virtual machine using Windows 10 and then Windows 7, same results After that, I tried testing the boards installed Looks like there is a problem with the Raspberry Pi Pico/RP2040 3.3.0 After testing it on the Raspberry Pi Pico/RP2040 3.2.2 I was able to compile the TinyUSB proyect

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.