Skip to content
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

[Bug] Error compiling ws2812_setleds #17167

Closed
3 tasks
carlosala opened this issue May 20, 2022 · 1 comment
Closed
3 tasks

[Bug] Error compiling ws2812_setleds #17167

carlosala opened this issue May 20, 2022 · 1 comment

Comments

@carlosala
Copy link
Contributor

carlosala commented May 20, 2022

Describe the Bug

There's a compilation error in the file platforms/avr/drivers/ws2812.c

System Information

Keyboard: kprepublic/bm60hsrgb_poker
Revision (if applicable): 1
Operating system: Arch Linux
qmk doctor output:

Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.0.0
Ψ QMK home: /home/carlo/.qmk
Ψ Detected Linux.
Ψ Git branch: master
Ψ Repo version: 0.16.9
Ψ All dependencies are installed.
Ψ Found arm-none-eabi-gcc version 12.1.0
Ψ Found avr-gcc version 12.1.0
⚠ We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.
Ψ Found avrdude version 7.0
Ψ Found dfu-util version 0.11
Ψ Found dfu-programmer version 0.7.2
Ψ Submodules are up to date.
Ψ QMK is ready to go, but minor problems were found

Any keyboard related software installed?

  • AutoHotKey (Windows)
  • Karabiner (macOS)
  • Other:

Additional Context

I paste here the output of the compilation:

Compiling: platforms/avr/drivers/ws2812.c                                                          platforms/avr/drivers/ws2812.c: In function 'ws2812_setleds':
platforms/avr/drivers/ws2812.c:43:45: error: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
   43 |     uint8_t masklo = ~(pinmask(RGB_DI_PIN)) & PORTx_ADDRESS(RGB_DI_PIN);
In function 'ws2812_sendarray_mask',
    inlined from 'ws2812_setleds' at platforms/avr/drivers/ws2812.c:46:5:
platforms/avr/drivers/ws2812.c:106:15: error: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
  106 |     sreg_prev = SREG;
      |               ^
platforms/avr/drivers/ws2812.c:171:10: error: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
  171 |     SREG = sreg_prev;
      |          ^
cc1: all warnings being treated as errors
 [ERRORS]
@fauxpark
Copy link
Member

Duplicate of #17064

Downgrade your avr-gcc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants