sadekbaroudi / zmk-fingerpunch-controllers

2 stars 0 forks source link

Firmware unresponsive #2

Open blowback opened 2 weeks ago

blowback commented 2 weeks ago

Hi!

I flashed a svlinky 0.2 with a config from here https://github.com/arduxio/zmk-ardux.git editing its config/west.yml to:

manifest:
  remotes:
    - name: zmkfirmware
      url-base: https://github.com/zmkfirmware
    - name: zmk-ardux
      url-base: https://github.com/arduxio
    - name: sadekbaroudi
      url-base: https://github.com/sadekbaroudi
  projects:
    - name: zmk
      remote: zmkfirmware
      revision: 8c6bda260ace119b3c22a21bdcdd6d17a83fc5eb
      import: app/west.yml
    - name: zmk-fingerpunch-controllers
      remote: sadekbaroudi
      revision: main
      import: config/deps.yml
  self:
    path: config

I'm building a "Paintbrush" 8 key keyboard, and this is, I think, an older config intended for Arduino pro micro controllers so I changed the_paintbrush_left.overlay to:

/*
 * Copyright (c) 2021 Mike "KemoNine" Crosson
 *
 * SPDX-License-Identifier: MIT
 */

#include <dt-bindings/zmk/matrix_transform.h>

&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        label = "DISPLAY";
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        prechargep = <0x22>;
        inversion-on;
    };
};

/ {
    chosen {
        zmk,kscan = &kscan0;
        zephyr,display = &oled;
    };

    kscan0: kscan_0 {
        compatible = "zmk,kscan-gpio-direct";

        label = "KSCAN";

        input-gpios
            = <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
            , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
            , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
            , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
            , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
            , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
            , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
            , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
            ;
    };
};

The difference is basically mapping the 8 keys to different GPIOs, to match those in your sparkfun_pro_micro.dtsi:

image

I then build this with:

west build -p -b svlinky@0.2 -- -DSHIELD=the_paintbrush_left -DZMK_CONFIG=$D/zmk-ardux/config

which successfully produces a zmk.uf2 board. If I drag this on to the RPi mount the device reboots, and then is dead - does not USB enumerate. I have to short the boot pins and reset->gnd to recover the device.

I tried adding debug:

west build -p -b svlinky@0.2 -- -DSHIELD=the_paintbrush_left -DZMK_CONFIG=$D/zmk-ardux/config -Szmk-usb-logging

but the behaviour was the same.

Is there anything else I can try to diagnose the issue? Is there a known-good svlinky firmware that might work (in part) with my 8 key keyboard?

blowback commented 2 weeks ago

I should add that my first attempt was with the controller in the board, second attempt was with the controller isolated (the board buzzes out ok, but you never know...).

sadekbaroudi commented 2 weeks ago

@blowback - take a look at this thread. I think you're running into the same issue. I'll update the documentation to be clearer about doing local builds https://github.com/sadekbaroudi/zmk-fingerpunch-controllers/issues/1

blowback commented 2 weeks ago

Haha you're right: that is me also! I've managed to resolve the build issues, now I'm getting a runtime crash. Can I attach an ftdi to those tx and rx pins and get some console output? what are the serial settings?

On Mon, 26 Aug 2024 at 04:16, Sadek Baroudi @.***> wrote:

@blowback https://github.com/blowback - take a look at this thread. I think you're running into the same issue. I'll update the documentation to be clearer about doing local builds

1 https://github.com/sadekbaroudi/zmk-fingerpunch-controllers/issues/1

— Reply to this email directly, view it on GitHub https://github.com/sadekbaroudi/zmk-fingerpunch-controllers/issues/2#issuecomment-2309219805, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOHROZ442GU2ZOZL3U4BDZTKMX5AVCNFSM6AAAAABNBQA5HWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBZGIYTSOBQGU . You are receiving this because you were mentioned.Message ID: @.***>