defmt
qmk_firmware
Our great sponsors
defmt | qmk_firmware | |
---|---|---|
17 | 1,588 | |
713 | 17,079 | |
5.0% | 2.1% | |
8.8 | 10.0 | |
8 days ago | 6 days ago | |
Rust | C | |
Apache License 2.0 | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
defmt
-
I built a column staggered keyboard with firmware written in Rust!
As someone who had only done embedded programming in the Arduino IDE, utilizing the defmt crate for logging with OpenOCD and GDB was an amazing experience. Although I still had no idea on to implement USB-HID for actually sending the key reports, until I discovered the usbd-human-interface-device crate and everything became so much easier. I just needed to create an iterator over Keyboard events and the crate would handle the rest as an added benefit the crate also supports multiple devices, so adding mouse support was as easy as creating a separate iterator over WheelMouseReport.
-
Testing a no_std crate with QEMU and defmt-test?
I think I want to use the QEMU emulator (as suggested in the Embedded Rust Book) and tests created with defmt-test. But I can't figure out how to get them to work together.
-
Are there any `no_std` logging or printing libraries (for Wasm targets, or even embedded devices)
On embeded defmt is often used https://github.com/knurling-rs/defmt
-
Debugging and profiling embedded applications.
defmt is a great framework for general logging.
- Print From a Multi-Platform no_std Embedded Library
-
Native Reflection in Rust
Great writeup! The defmt logging crate uses a linker script to extract debug symbols so that you get nicely formatted stack traces on embedded systems. It works on linux, macos and windows. I wonder if the same technique can be applied to this project. It needs a runner though so may not be the right approach.
https://github.com/knurling-rs/defmt
- Smallest logging implementation?
-
From arduino to rust via avr-hal
Just played with embedded stuff today. defmt can be used for logging instead of println since there's not really a stdout when running on bare metal.
-
Are costly debuggers from vendors necessary?
yYeah. For example, instead of printf("Variable X = %d, y=%f", x, y), where the micro then formats the string and pushes it out a serial port, blocking until its sent, I can write LOG("Variable X = %d, Y=%f, x, y), and what actually happens is a unique pointer to the string, and a tagged raw int and float get pushed onto a buffer, which takes about 15 instructions and takes up 16 bytes in the buffer. The buffer is then asynchronously sent out over the serial port, and the PC knows how to map the string ID to the actual string (this can by dynamically fetched from the micro or stored like debug info if there's not enough flash for the strings), and applies the formatting. There's an added bonus that it's super easy to take any variable which is logged and plot it live over time. There's also stuff like if the system crashes and the watchdog resets it, the buffer can be read out from memory to catch anything which wasn't sent out yet. It's a bit more of a complex system to set up but it really makes printf feel like the stone age when you get to using it. For an example of a similar system in rust, https://github.com/knurling-rs/defmt is implementing the same ideas (I don't know of any publicly available equivalent in C or C++, but you can implement it the same, though C++ is easier and it helps to know your way around a linker script to make something properly ergonomic).
-
Creating formatted strings with no_std on embedded
If the build constraints are amenable for your project, you might also enjoy knurling-rs' defmt logging framework.
qmk_firmware
-
Principles for Keyboard Layouts (2022)
I agree that reduced finger movement is a crucial step in achieving typing efficiency. This is nicely solved by mod tap modifiers in QMK/ZMK[1] where key acts as a char when tapped and as a layer while pressed.
[1]: https://github.com/qmk/qmk_firmware/blob/master/docs/mod_tap...
- Lkbm: LED-Key BitMasks to Control the Ploopy Nano Trackball
-
QMK and Keyboards
Separate wireless controller, see the glue code at [0]
[0]: https://github.com/qmk/qmk_firmware/compare/master...nuphy-s...
-
Debugging a Failing Hotkey
If you have a keyboard that runs QMK firmware[0] with the VIA[1] feature enabled[2], then there is a convenient testing app available from the same place you customize your keys [3].
[0] https://qmk.fm/
- How to make 2 or more layers become default ON with key
-
Just setting up my first corne layout. It will take a while for me to get used to this wow... It's taking so long to type. Attached is my layout, and I mainly use c# on visual studio. Any concerns/advice/suggestions are welcome. It will take a while for me to reply on this thing though.. haha..
I made a layout that I'm happy with. Spanish is my native language, so it has characters like the accents and 'ñ', but it's meant to be used for programming as well. Visual Studio uses a lot of Ctrl and Ctrl + Shift shortcuts, so I left them in the same place as the default Corne layout so I can press them both with my pinkie finger. Perhaps some of the ideas are useful to you.
-
Adafruit Feather RP2040 with USB Type A Host as a QMK converter board?
Also, it would be possible to do this for the RP2040. However, it needs some work to get working. but for example: https://github.com/qmk/qmk_firmware/pull/20999
-
If anyone knows of a good tutorial on how to make this tft display useful on a board controlled by an rp2040 and flashed with qmk configurator, I would be most grateful if you could point me in that direction. Gracias!
Ok, it's an ST7735, not too different from the ST7789. You should be able to get running by looking at their files in the QMK repo and going from there. You should also check their resources page.
- Keyboard missing from QMK MSYS.
-
Bongocat or other cool oled animation for Lily or Sofle
UPDATE: after fluffing around a little bit, I have manged to fix this code: https://github.com/qmk/qmk_firmware/blob/master/keyboards/lily58/keymaps/bongocat_wpm_responsive/keymap.c and flash it successfully - it seems not to be working correctly as the cat is only hanging there and does not respond to the wmp count. If anybody spots anything wrong in the code please let me know!(C is not my language but I am a programmer, I am gonna get at it again over the weekend if I have time left)
What are some alternatives?
cargo-embed - a cargo extension for working with microcontrollers
zmk - ZMK Firmware Repository
probe-run - Run embedded programs just like native ones
kmk_firmware - Clackety Keyboards Powered by Python
trice - 🟢 super fast 🚀 and tiny 🐥 embedded device 𝘾 printf-like trace ✍ code, works also inside ⚡ interrupts ⚡ and real-time PC 💻 logging (trace ID visualization 👀)
vial-qmk - QMK fork with Vial-specific features.
flip-link - Adds zero-cost stack overflow protection to your embedded programs
kmonad - An advanced keyboard manager
nanoprintf - The smallest public printf implementation for its feature set.
pico-examples
itm - ARMv7-M ITM packet protocol decoder library crate and CLI tool.
zmk-config - ZMK Configuration