Giter Site home page Giter Site logo

switchalyzer's Introduction

Switchalyzer

Mechanical keyboard switch force curve analyzer.

The plan is to design hardware (3D printed structure) and software (probably on STM32 and hopefully written in Zig).

Build

Requirements:

libopencm3

libopencm3 must be built with GCC arm-none-eabi (though in the future it might be handled by zig cc).

https://github.com/libopencm3/libopencm3

  • On Windows: https://www.msys2.org/
    • Use UCRT64 environment
    • Install make: pacman -S make
    • If python3 is missing, run via cmd as Administrator: mklink "C:\Program Files\Python311\python3.exe" "C:\Program Files\Python311\python.exe"
    • . env.sh
  • make -C libopencm3 # TARGETS="stm32/f1"

switchalyzer

zig build

Flash

zig build flash

Debug

  1. Install Cortex-Debug VSCode extension (https://github.com/Marus/cortex-debug)
  2. Also install Cortex-Debug: Device Support Pack - STM32F1 and equivalent extensions as needed (to enable peripherals view in debug)
  3. Set cortex-debug.armToolchainPath in VSCode settings.json to the bin directory of your arm-none-eabi toolchain
  4. Set cortex-debug.openocdPath to openocd.exe
  5. Launch the included debug configuration(s)

SWO/SWV is used for trace output, OpenOCD and Cortex-Debug will automatically configure the needed on-chip registers (TPIU, ITM, DBGMCU) to enable SWO output.

TODO try DWT and ETM tracing

References

switchalyzer's People

Contributors

laxis96 avatar

Watchers

 avatar

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.