Skip to content

zmk-pillzmod-pro does not compile? #23

Description

@epichub

I cannot get you zmk-pillzmod-pro fork to compile.
It fails with some strange error originating from "leds.c" (a file which i cannot find in any other example of in any other board/shield in zmk):

[107/342] Building C object CMakeFiles/app.dir/boards/shields/pillzmod_pro/leds.c.obj
In file included from <MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/device.h:13,
                 from <MYBUILDDIR>/src/zmk-pillzmod/app/boards/shields/pillzmod_pro/leds.c:1:
<MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/init.h:193:44: warning: initialization of 'int (*)(void)' from incompatible pointer type 'int (*)(const struct device *)' [-Wincompatible-pointer-types]
  193 |                         .init_fn = {.sys = (init_fn_)},                        \
      |                                            ^
<MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/init.h:174:9: note: in expansion of macro 'SYS_INIT_NAMED'
  174 |         SYS_INIT_NAMED(init_fn, init_fn, level, prio)
      |         ^~~~~~~~~~~~~~
<MYBUILDDIR>/src/zmk-pillzmod/app/boards/shields/pillzmod_pro/leds.c:53:1: note: in expansion of macro 'SYS_INIT'
   53 | SYS_INIT(leds_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);
      | ^~~~~~~~
<MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/init.h:193:44: note: (near initialization for '__init_leds_init.init_fn.sys')
  193 |                         .init_fn = {.sys = (init_fn_)},                        \
      |                                            ^
<MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/init.h:174:9: note: in expansion of macro 'SYS_INIT_NAMED'
  174 |         SYS_INIT_NAMED(init_fn, init_fn, level, prio)
      |         ^~~~~~~~~~~~~~
<MYBUILDDIR>/src/zmk-pillzmod/app/boards/shields/pillzmod_pro/leds.c:53:1: note: in expansion of macro 'SYS_INIT'
   53 | SYS_INIT(leds_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);
      | ^~~~~~~~
[170/342] Building C object CMakeFiles/app.dir/src/studio/behavior_subsystem.c.obj
<MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/behavior_subsystem.c: In function 'encode_value_description':
<MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/behavior_subsystem.c:87:23: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   87 |         desc.name.arg = val;
      |                       ^
[175/342] Building C object CMakeFiles/app.dir/src/studio/uart_rpc_transport.c.obj
FAILED: CMakeFiles/app.dir/src/studio/uart_rpc_transport.c.obj 
ccache /opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DNRF52840_XXAA -DPB_MAX_REQUIRED_FIELDS=64 -DPB_NO_ENCODE_SIZE_CHECK -DPB_NO_ERRMSG -DPB_WITHOUT_64BIT -DPICOLIBC_INTEGER_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I<MYBUILDDIR>/src/zmk-pillzmod/app/include -I<MYBUILDDIR>/src/zmk-pillzmod/app/build -I<MYBUILDDIR>/src/zmk-pillzmod/zephyr/include -I<MYBUILDDIR>/src/zmk-pillzmod/app/build/zephyr/include/generated -I<MYBUILDDIR>/src/zmk-pillzmod/zephyr/soc/arm/nordic_nrf/nrf52 -I<MYBUILDDIR>/src/zmk-pillzmod/zephyr/soc/arm/nordic_nrf/common/. -I<MYBUILDDIR>/src/zmk-pillzmod/zephyr/subsys/usb/device -I<MYBUILDDIR>/src/zmk-pillzmod/zephyr/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/nrfx_glue -I<MYBUILDDIR>/src/zmk-pillzmod/zephyr/subsys/bluetooth -I<MYBUILDDIR>/src/zmk-pillzmod/zephyr/subsys/settings/include -I<MYBUILDDIR>/src/zmk-pillzmod/modules/lib/nanopb -I<MYBUILDDIR>/src/zmk-pillzmod/modules/hal/cmsis/CMSIS/Core/Include -I<MYBUILDDIR>/src/zmk-pillzmod/zephyr/modules/cmsis/. -I<MYBUILDDIR>/src/zmk-pillzmod/modules/hal/nordic/nrfx -I<MYBUILDDIR>/src/zmk-pillzmod/modules/hal/nordic/nrfx/drivers/include -I<MYBUILDDIR>/src/zmk-pillzmod/modules/hal/nordic/nrfx/mdk -I<MYBUILDDIR>/src/zmk-pillzmod/zephyr/modules/hal_nordic/nrfx/. -I<MYBUILDDIR>/src/zmk-pillzmod/modules/crypto/tinycrypt/lib/include -I<MYBUILDDIR>/src/zmk-pillzmod/app/module/include -I<MYBUILDDIR>/src/zmk-pillzmod/app/module/drivers/sensor/battery/. -fno-strict-aliasing -Os -imacros <MYBUILDDIR>/src/zmk-pillzmod/app/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros <MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=<MYBUILDDIR>/src/zmk-pillzmod/app=CMAKE_SOURCE_DIR -fmacro-prefix-map=<MYBUILDDIR>/src/zmk-pillzmod/zephyr=ZEPHYR_BASE -fmacro-prefix-map=<MYBUILDDIR>/src/zmk-pillzmod=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -Wfatal-errors -MD -MT CMakeFiles/app.dir/src/studio/uart_rpc_transport.c.obj -MF CMakeFiles/app.dir/src/studio/uart_rpc_transport.c.obj.d -o CMakeFiles/app.dir/src/studio/uart_rpc_transport.c.obj -c <MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/uart_rpc_transport.c
In file included from <MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/toolchain/gcc.h:98,
                 from <MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/toolchain.h:50,
                 from <MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/sys/util.h:18,
                 from <MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/init.h:13,
                 from <MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/uart_rpc_transport.c:7:
<MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/device.h:85:41: error: '__device_dts_ord_DT_CHOSEN_zmk_studio_rpc_uart_ORD' undeclared here (not in a function)
   85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
<MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
  137 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
<MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/device.h:85:33: note: in expansion of macro '_CONCAT'
   85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                 ^~~~~~~
<MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/device.h:212:37: note: in expansion of macro 'DEVICE_NAME_GET'
  212 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
<MYBUILDDIR>/src/zmk-pillzmod/zephyr/include/zephyr/device.h:229:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
  229 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
<MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/uart_rpc_transport.c:21:46: note: in expansion of macro 'DEVICE_DT_GET'
   21 | static const struct device *const uart_dev = DEVICE_DT_GET(UART_DEVICE_NODE);
      |                                              ^~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
[181/342] Building C object CMakeFiles/app.dir/src/studio/keymap_subsystem.c.obj
<MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/keymap_subsystem.c: In function 'encode_layouts':
<MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/keymap_subsystem.c:304:25: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  304 |         layout.name.arg = l;
      |                         ^
<MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/keymap_subsystem.c:307:25: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  307 |         layout.keys.arg = l;
      |                         ^
<MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/keymap_subsystem.c: In function 'restore_layer':
<MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/keymap_subsystem.c:462:33: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  462 |         resp.result.ok.name.arg = &restore_req->layer_id;
      |                                 ^
<MYBUILDDIR>/src/zmk-pillzmod/app/src/studio/keymap_subsystem.c:465:37: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  465 |         resp.result.ok.bindings.arg = &restore_req->layer_id;
      |                                     ^
[192/342] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/hci_core.c.obj
ninja: build stopped: subcommand failed.

I am guessing some update in zephyr/zmk broke how you zmk-pillzmod_pro is interfacing with the rest of zmk/zephyr?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions