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

Compile error for rp2040 controller #15

Open
minikN opened this issue May 14, 2024 · 1 comment
Open

Compile error for rp2040 controller #15

minikN opened this issue May 14, 2024 · 1 comment

Comments

@minikN
Copy link

minikN commented May 14, 2024

Hello,

Thank you for this manifest. I've turned this into an rde feature for my personal usage. But it's essentially just a wrapper around your manifest that automatically adds the udev rules and correct user group.

That being said, I'm getting an error trying to compile for my ergoDash keoyboard using this micro controller:

Compiling: .build/obj_omkbd_ergodash_rev1_omkbd_ergodash_rev1_my_layout/src/default_keyboard.c     In file included from ./lib/pico-sdk/src/common/pico_base/include/pico/types.h:12:0,
                 from ./lib/pico-sdk/src/common/pico_base/include/pico.h:24,
                 from ./lib/pico-sdk/src/rp2_common/hardware_flash/include/hardware/flash.h:10,
                 from ./platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash_config.h:6,
                 from <command-line>:0:
./lib/pico-sdk/src/common/pico_base/include/pico/assert.h:18:10: fatal error: assert.h: No such file or directory
 #include <assert.h>
          ^~~~~~~~~~
compilation terminated.
 [ERRORS]
 |
 |
 |
make: *** [builddefs/common_rules.mk:373: .build/obj_omkbd_ergodash_rev1_omkbd_ergodash_rev1_my_layout/.build/obj_omkbd_ergodash_rev1_omkbd_ergodash_rev1_my_layout/src/default_keyboard.o] Error 1

Command used:

qmk compile ~/.local/share/git/dots/config/applications/qmk/ergoDash.json -e CONVERT_TO=helios

I'm not really familiar with qmk. This is my first keyboard using it. But I've compiled firmware for it on Windows successfully (using the same command after following basic setup guide)

Seems like something is missing on Guix. I'd appreciate any help on this. Thanks in advance.

@sigprof
Copy link
Owner

sigprof commented May 29, 2024

Looks like the compiler does not find its C library headers (newlib). One reason why this might happen is that the environment variables which are set by (native-search-paths new-search-paths) inside qmk-wrap-toolchain are not actually present in the environment where the compiler is invoked. Normally guix shell does that; does your solution collect native-search-paths from the listed packages and add them to the environment?

However, all that may be moot, because since QMK 0.25.0 the core QMK code for ChibiOS requires GCC >= 8, and Guix provides at most arm-none-eabi-nano-toolchain-7-2018-q2-update, so you will get compile errors like:

In file included from tmk_core/protocol/chibios/usb_main.h:16:0,
                 from tmk_core/protocol/chibios/usb_endpoints.c:7:
tmk_core/protocol/chibios/usb_report_handling.h:33:32: error: expected expression before '_Alignas'
         .reports            = (_Alignas(4) usb_fs_report_t *[_report_count]){_reports},                                                        \

So Guix is no longer suitable for building QMK firmware for ARM-based controllers until someone updates the ARM toolchain.

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

No branches or pull requests

2 participants