Code Monkey home page Code Monkey logo

Comments (10)

urob avatar urob commented on June 12, 2024

Do you have a link to the repo with the failed config file?

from zmk-helpers.

jbsoum avatar jbsoum commented on June 12, 2024

https://github.com/jbsoum/zmk-config

from zmk-helpers.

urob avatar urob commented on June 12, 2024

The issue is on this line here: https://github.com/jbsoum/zmk-config/blob/50925cc7763746a0f7a3f055b4dfba9f2d98481c/config/kyria_rev3.keymap#L86

AMP doesn't seem to be a valid ZMK keycode (https://zmk.dev/docs/codes). Can you try AMPS?

from zmk-helpers.

jbsoum avatar jbsoum commented on June 12, 2024

Good call! That was helpful, I was able to identify a few other issues, but I have run into one I can't seem to diagnose.

Link to dev branch here: https://github.com/jbsoum/zmk-config/tree/dev_behavioral_autoshift

Run west build -s zmk/app -b nice_nano_v2 -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/config -DSHIELD="kyria_rev3_left" 
+ west build -s zmk/app -b nice_nano_v2 -- -DZMK_CONFIG=/__w/zmk-config/zmk-config/config -DSHIELD=kyria_rev3_left
-- west build: generating a build system
Including boilerplate (Zephyr base): /__w/zmk-config/zmk-config/zephyr/cmake/app/boilerplate.cmake
-- Application: /__w/zmk-config/zmk-config/zmk/app
-- Adding /__w/zmk-config/zmk-config/zmk/app/boards/shields/kyria
-- ZMK Config directory: /__w/zmk-config/zmk-config/config
-- ZMK Config Kconfig: /__w/zmk-config/zmk-config/config/kyria_rev3.conf
-- Using keymap file: /__w/zmk-config/zmk-config/config/kyria_rev3.keymap
-- Using keymap file: /__w/zmk-config/zmk-config/config/kyria_rev3.keymap
-- Zephyr version: 3.0.0 (/__w/zmk-config/zmk-config/zephyr)
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter 
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: nice_nano_v2, Shield(s): kyria_rev3_left
-- Cache files will be written to: /__w/zmk-config/zmk-config/zephyr/.cache
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.15.2 (/opt/zephyr-sdk-0.15.2)
-- Found dtc: /opt/zephyr-sdk-0.15.2/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found toolchain: zephyr 0.15.2 (/opt/zephyr-sdk-0.15.2)
-- Found BOARD.dts: /__w/zmk-config/zmk-config/zmk/app/boards/arm/nice_nano/nice_nano_v2.dts
-- Found devicetree overlay: /__w/zmk-config/zmk-config/zmk/app/boards/shields/kyria/kyria_rev3_left.overlay
-- Found devicetree overlay: /__w/zmk-config/zmk-config/zmk/app/boards/shields/kyria/boards/nice_nano_v2.overlay
-- Found devicetree overlay: /__w/zmk-config/zmk-config/config/kyria_rev3.keymap
devicetree error: missing data after phandle in <Property 'bindings' at '/behaviors/layer' in '/__w/zmk-config/zmk-config/zephyr/misc/empty_file.c'>
CMake Error at /__w/zmk-config/zmk-config/zephyr/cmake/dts.cmake:205 (message):
  gen_defines.py failed with return code: 1
Call Stack (most recent call first):
  /__w/zmk-config/zmk-config/zephyr/cmake/app/boilerplate.cmake:542 (include)
-- Configuring incomplete, errors occurred!
  /__w/zmk-config/zmk-config/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /__w/zmk-config/zmk-config/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:15 (find_package)

from zmk-helpers.

urob avatar urob commented on June 12, 2024

I just had a look. It seems your last working config is 32 commits ago and there are quite a few changes, making it a bit hard to debug. I would suggest to go back to your last working commit and add features one-by-one to isolate what's working and what's not. Does it work without the sensor-bindings?

from zmk-helpers.

jbsoum avatar jbsoum commented on June 12, 2024

Okay, getting closer! Commenting everything out and re-incorporating line by line, it seems like this error is preventing the config from compiling. Specifically the mod_morph at the bottom:

// layer buttons (jbsoum add)
ZMK_BEHAVIOR(ly_def, macro,
     bindings 
          = <&macro_tap &to DEF>
          , <&macro_tap &rgb_ug RGB_COLOR_HSB(45,20,100)>
          ;
 )
ZMK_BEHAVIOR(ly_numhld, macro,
     bindings 
          = <&macro_tap &rgb_ug RGB_COLOR_HSB(110,25,100)>
          , <&macro_press &mo NUM>
          , <&macro_pause_for_release>
          , <&macro_release &mo NUM>
          , <&macro_tap &rgb_ug RGB_COLOR_HSB(45,20,100)>
          ;
 )
ZMK_BEHAVIOR(ly_numtap, macro,
     bindings 
          = <&macro_tap &to NUM>
          , <&macro_tap &rgb_ug RGB_COLOR_HSB(110,25,100)>
          ;
 )
ZMK_BEHAVIOR(ly_nav, macro,
     bindings 
          = <&macro_tap &to NAV>
          , <&macro_tap &rgb_ug RGB_COLOR_HSB(170,25,100)>
          ;
)

ZMK_BEHAVIOR(ly_num, hold_tap,
     flavor = "hold-preferred";
     tapping_term_ms = <200>;
     quick_tap_ms = <0>;
     bindings = <&ly_numhld>, <&ly_numtap>;
)

ZMK_BEHAVIOR(ly, mod_morph,
     bindings = <&ly_num>, <&ly_nav>;
     mods = <(MOD_RCTL|MOD_LCTL)>;
)

That mod_morph takes a hold tap for first parameter, and a macro for the second. Uncommenting the ly mod_morph above results in the following error:

 -- Found devicetree overlay: /__w/zmk-config/zmk-config/config/kyria_rev3.keymap
devicetree error: missing data after phandle in <Property 'bindings' at '/behaviors/ly' in '/__w/zmk-config/zmk-config/zephyr/misc/empty_file.c'>
CMake Error at /__w/zmk-config/zmk-config/zephyr/cmake/dts.cmake:205 (message):
  gen_defines.py failed with return code: 1
Call Stack (most recent call first):
  /__w/zmk-config/zmk-config/zephyr/cmake/app/boilerplate.cmake:542 (include)
  /__w/zmk-config/zmk-config/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /__w/zmk-config/zmk-config/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:15 (find_package)

from zmk-helpers.

urob avatar urob commented on June 12, 2024

Can you break it down further? Are all the rgb_ug commands working if you put them directly on the keymap? If so, what about each of the macros? If so, what about the two hold-taps? That's how I usually try to isolate the error if it isn't immediately obvious.

from zmk-helpers.

urob avatar urob commented on June 12, 2024

Actually, you are not passing any arguments to the hold taps. It requires two arguments but you are passing none. Try adding 0 0 to each of the hold-taps when binding them to the mod-morph.

(NB: args to the mod-morph on your keymap aren't passed-through because the mod-morph doesn't take any args).

from zmk-helpers.

urob avatar urob commented on June 12, 2024

Did this work? In either case, I am closing this as it doesn't seem to be an issue with this repo. Feel free to reopen if you think something is wrong with this repo.

from zmk-helpers.

jbsoum avatar jbsoum commented on June 12, 2024

It did indeed! Thanks for the tip! Would have never thought to do that otherwise. Have been fixing a series of other bugs, and finally have something resembling a working config. Thank you!

from zmk-helpers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.