R2 will store our progress along the sidata section. Copy data from flash to RAM data init section. The '_estack' value is defined in our linker script. Set the stack pointer to the end of the stack. It was adapted from the sample links above, but simplified a little to help me understand what was going on. I wanted to understand the full stack of software running on the micro (no wrapper libraries like stm32duino), and I found some great articles and basic sample code covering how to get the STM32F0 up and running on the bare-metal.īelow is the bootstrap assembly code, written in ARM32 assembly. Once the prototyping parts arrived, I put the Nucleo onto a breadboard. Being a huge fan of mechanical keyboards, I went and ordered some Cherry MX keys to play around with too. I went ahead and ordered the Nucleo STM32F042K6 dev board. I chose to use the STM32F042K6 specifically as it is the highest power chip that can be easily soldered on without using hot air or a reflow oven - plus it supports USB! These are low powered ARM cores - nothing like you would find in your smartphone. For this use case, the F0 range would work well, which adheres to the Cortex M0 ARM spec. Looking around, one of the most popular microcontrollers is the STM32 range by ST Micro - these are ARM 32-bit cores. There is a lot of reference material available online for building your own keyboard, but most of those are just for standard keyboards - it’s hard to find anything about macro keyboards. ![]() I’ve always wanted to learn more about the USB protocol too, so this was a great excuse to get down and dirty with it. Sure, there are things like AutoHotKey, but where’s the fun in that? No need to pull out the soldering iron… we can change that! ![]() That got me thinking “what if I had a keyboard that could type out a GUID with a single key-press?”. I was originally thinking of building a full sized keyboard, but I changed my mind after having to enter a load of GUIDs whilst debugging at work. My inspiration for this project came when I saw a Hacker News post by Blake Smith showing his adventures in building a USB keyboard. ![]() I’ve always been interested in building things to find out how they work, even if it’s something that’s already been done before.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |