Recent Posts
Archives

PostHeaderIcon [OxidizeConf2024] Moving Electrons with Rust

From Novice to Custom PCB

Embarking on a journey from minimal electronics knowledge to designing a custom printed circuit board (PCB) is a daunting yet rewarding endeavor. At OxidizeConf2024, Josh Junon from GitButler shared his nine-month odyssey of building a PCB with an STM32 microcontroller, powered by async Rust firmware. Josh’s candid narrative detailed his trials, errors, and eventual success in creating a component for kernel CI/CD testing pipelines, offering valuable lessons for software developers venturing into hardware.

With a strong software background but little electronics experience, Josh tackled the complexities of PCB design, from selecting components to soldering hair-thin parts. Using Rust’s async capabilities, he developed firmware that leveraged interrupts for efficient communication, integrating the PCB into a larger project. His story underscores Rust’s versatility in bridging software and hardware, enabling developers to create reliable, high-performance embedded systems without extensive hardware expertise.

Practical Lessons in Hardware Development

Josh’s presentation was a treasure trove of practical advice. He emphasized the importance of verifying component sizes early, as datasheets often understate their minuteness. For instance, selecting appropriately sized parts saved costs and prevented assembly errors. He also advised against prioritizing aesthetics, such as costly black solder masks, in favor of affordable green ones. These lessons, born from trial and error, highlight the importance of aligning hardware choices with project constraints, particularly for budget-conscious developers.

Rust’s async ecosystem, including libraries like embassy, facilitated Josh’s firmware development. The STM32F4 (or possibly F7) microcontroller, though potentially overpowered, provided a robust platform for his needs. By sharing his GitHub repository, Josh invites community feedback, fostering collaboration to refine his approach. His experience demonstrates how Rust’s safety guarantees and modern tooling can empower software developers to tackle hardware challenges effectively.

Balancing Cost and Learning

Cost management was a recurring theme in Josh’s journey. He cautioned against over-purchasing components and investing in expensive equipment early on, noting that basic tools suffice for initial projects. Custom stencil sizes, while tempting, added unnecessary costs, and Josh recommended reusing standard boards for versatility. Despite these challenges, the learning outcomes were profound, equipping Josh with skills in microcontrollers, interrupts, and embedded programming that enhanced his broader project.

Josh’s success highlights Rust’s role in democratizing hardware development. By leveraging Rust’s ecosystem and community resources, he transformed a side quest into a valuable contribution to kernel testing. His call to “just do it” inspires developers to explore hardware with Rust, proving that persistence and community support can yield remarkable results in unfamiliar domains.

Links:

Leave a Reply