编译时Zmk和zephyr问题

问题描述 投票:0回答:1

当我尝试编译代码以将文件上传到我的键盘时,西方构建步骤中发生了故障。我收到此错误:

FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /tmp/tmp.hn0qZ6mNYe/zephyr/zephyr_pre0.map 
: && ccache /opt/zephyr-sdk-0.16.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc  -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -fuse-ld=bfd  -T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=/tmp/tmp.hn0qZ6mNYe/zephyr/zephyr_pre0.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/libarch__arm__core.a  zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a  zephyr/arch/arch/arm/core/mpu/libarch__arm__core__mpu.a  zephyr/lib/libc/picolibc/liblib__libc__picolibc.a  zephyr/lib/libc/common/liblib__libc__common.a  zephyr/soc/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/soc/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a  zephyr/subsys/random/libsubsys__random.a  zephyr/subsys/usb/device/class/hid/libsubsys__usb__device__class__hid.a  zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a  zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a  zephyr/subsys/bluetooth/crypto/libsubsys__bluetooth__crypto.a  zephyr/subsys/bluetooth/controller/libsubsys__bluetooth__controller.a  zephyr/subsys/net/libsubsys__net.a  zephyr/drivers/usb/device/libdrivers__usb__device.a  zephyr/drivers/adc/libdrivers__adc.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/entropy/libdrivers__entropy.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/hwinfo/libdrivers__hwinfo.a  zephyr/drivers/kscan/libdrivers__kscan.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a  zephyr/drivers/timer/libdrivers__timer.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/module/drivers/sensor/battery/lib..__zmk__app__module__drivers__sensor__battery.a  modules/module/lib/zmk_debounce/lib..__zmk__app__module__lib__zmk_debounce.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  -L"/opt/zephyr-sdk-0.16.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v7e-m+fp/hard"  -L/tmp/tmp.hn0qZ6mNYe/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -mcpu=cortex-m4  -mthumb  -mabi=aapcs  -mfpu=fpv4-sp-d16  -mfloat-abi=hard  -mfp16-format=ieee  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  -Wl,-no-pie  -DPICOLIBC_INTEGER_PRINTF_SCANF  --specs=picolibc.specs  -lc  -lgcc && cd /tmp/tmp.hn0qZ6mNYe/zephyr && /usr/local/lib/python3.12/dist-packages/cmake/data/bin/cmake -E true
/opt/zephyr-sdk-0.16.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: app/libapp.a(physical_layouts.c.obj):(.rodata._zmk_physical_layout_chosen+0x4): undefined reference to `zmk_matrix_transform_default'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /tmp/tmp.hn0qZ6mNYe

这里是存储库的链接,如果您需要更多信息或代码来帮助我解决此问题。

我尝试过查看类似的问题,但似乎没有一个能帮助解决所发生的问题。

git github keyboard zephyr-rtos zmk
1个回答
0
投票

我也遇到了同样的问题,并在 zmk github 项目中制作了票证。 https://github.com/zmkfirmware/zmk/issues/2573

您需要指定一个选定的矩阵变换,例如添加 zmk,matrix-transform = &default_transform; --> 请参阅票证以了解更多详细信息以及为什么需要这样做。

© www.soinside.com 2019 - 2024. All rights reserved.