Best of Embedded Systems — 2024

  1. 1
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    How to Create Linux Device Drivers

    Linux device drivers facilitate communication between the operating system and hardware. A new hands-on course by freeCodeCamp teaches how to develop these drivers, covering topics from the Linux kernel and system calls to file operations and kernel module management. The course includes practical steps for setting up a development environment and writing a loadable module.

  2. 2
    Article
    Avatar of hnHacker News·2y

    TOTP tokens on my wrist with the smartest dumb watch.

    The Casio F-91W can be upgraded using a new ARM Cortex M0+ powered logic board from Sensor Watch, which replaces its original quartz movement while maintaining the classic LCD display and other components. This board is programmable and supports custom watchfaces and utilities, including TOTP (Time-based One-time Password) generation for 2FA codes. The process involves replacing the board, configuring 2FA secrets, and writing new watchfaces. The upgraded watch offers features like a world clock, moon phase indicator, sunrise/sunset calculator, temperature sensor readout, and more, with months-long battery life and no Bluetooth connectivity.

  3. 3
    Article
    Avatar of communityCommunity Picks·1y

    Rust learning resources

    Rust is not just for system programming; it is versatile and can be used for a variety of projects. Avoid paid courses and utilize free resources like books and YouTube channels to learn Rust. Start with foundational books like 'The Rust Book,' then explore practical projects through resources such as the 'Practical Rust Projects' and 'Creative Projects for Rust Programmers.' Specialized areas like web development, command line utilities, and machine learning are also covered in specific books. Use repositories like 'Awesome Embedded Rust' and 'Idiomatic Rust' for further learning and updates.

  4. 4
    Article
    Avatar of lobstersLobsters·2y

    Async Rust vs RTOS showdown!

    A detailed comparison between the Embassy async Rust model and FreeRTOS in C on an STM32F446 microcontroller focusing on interrupt latency, program size, RAM usage, and ease of programming is discussed. Tests reveal that Embassy/Rust outperforms FreeRTOS/C in interrupt time, thread time, interrupt latency, program size, and static memory usage, making it the winner of the showdown. The showdown includes practical implementation examples and performance results, highlighting the strengths of both approaches.

  5. 5
    Article
    Avatar of lobstersLobsters·1y

    Lua is so underrated

    Lua is a versatile, efficient, and easy-to-learn scripting language designed for embedding in applications. It supports multiple programming paradigms and offers excellent performance through its clean design and minimalistic syntax. Despite its capabilities, Lua often flies under the radar compared to more marketed languages, making it an underrated choice for both gaming and embedded systems.

  6. 6
    Article
    Avatar of lobstersLobsters·2y

    Rust is rolling off the Volvo assembly line

    Julius Gustavsson, the main software architect at Volvo, successfully implemented Rust in Volvo's low-power processor ECU for handling power management in electric cars. Initially using C and C++, Julius transitioned to Rust due to its safety features and robustness. Despite some tooling challenges, Rust proved highly effective for the project, leading to fewer bugs and higher quality software. Volvo is now exploring more opportunities to use Rust in other projects.

  7. 7
    Article
    Avatar of foojayioFoojay.io·2y

    A Fresh Look at Embedded Java

    Java, known for its 'Write Once, Run Anywhere' philosophy, continues to be a powerful choice for embedded systems ranging from in-car infotainment to home automation and medical devices. The language offers energy efficiency, developer productivity, and a stable runtime, with Azul providing builds of OpenJDK optimized for various platforms. Key solutions like CRaM and CRaC help reduce application startup time, making Java an ideal choice for rapid deployment scenarios. Azul also ensures long-term support, security updates, and legal protection for users of their Java runtime builds.

  8. 8
    Article
    Avatar of hnHacker News·2y

    Embedded Rust in Production ..?

    STABL Energy has successfully used Rust on the embedded ESP32 platform in production for over a year. Initially frustrated with a C implementation for their energy storage system, they switched to Rust, which resulted in greater reliability and fewer bugs despite taking longer to write. They experienced a smooth transition and continued improvements in Rust support from Espressif. Although finding developers proficient in Rust remains a challenge, the language has proven effective for their embedded projects.

  9. 9
    Article
    Avatar of communityCommunity Picks·2y

    From Zero to main(): How to Write a Bootloader from Scratch

    Learn how to write a bootloader from scratch for a Cortex-M microcontroller. Topics include why bootloaders are needed, setting up memory maps, implementing the bootloader code, and making an application bootloadable. Advanced techniques like message passing to catch reboot loops, relocating the application from flash to RAM, and using the MPU to lock the bootloader are also discussed.

  10. 10
    Video
    Avatar of letsgetrustyLet's Get Rusty·2y

    Rust is secretly taking over chip development

    Nvidia, AMD, Google, and Microsoft are collaboratively working on Project Calyptra, which aims to secure computer chips using Rust-based implementations of the root of trust component. Root of trust ensures that low-level boot code is authentic and secure, critical for preventing hardware-level malware attacks. Current implementations suffer from fragmentation, lack of transparency, and scalability issues. Rust's usage in this project promises enhanced security and maintainability. Calyptra is expected to be integrated into Google and Microsoft silicon by 2024, with AMD following by 2026. The trend of using Rust is also growing in the automotive industry, with notable adoption by Volvo and others for embedded systems.

  11. 11
    Article
    Avatar of tdsTowards Data Science·2y

    Master Embedded Development with Rust and no_std

    Running Rust on embedded systems using no_std can optimize for environments with constrained resources like microcontrollers. Practical steps include ensuring compatibility with WASM and WASI, identifying and adjusting dependencies, marking main code with no_std and alloc, and using Cargo features to toggle std usage. Testing embedded systems often requires tools like QEMU. Despite challenges, Rust’s “if it compiles, it works” philosophy is highly applicable for embedded development.

  12. 12
    Article
    Avatar of communityCommunity Picks·2y

    Flipper Zero hacking tool gets MicroPython support

    Oliver Fabel has developed a port to run MicroPython on the Flipper Zero, enabling users to write Python programs for this versatile hacking tool. This development supports GPIO, ADC, PWM, speaker, buttons, display, and infrared communication, although NFC and RFID are not yet supported. Users can access a Python shell (REPL) and run scripts from the CLI without needing a firmware update, reducing the risk of bricking the device. However, the port is not complete and may require retrying if the application crashes due to memory fragmentation.

  13. 13
    Article
    Avatar of hnHacker News·2y

    Making a Linux-managed network switch

    This post discusses the creation of a Linux-managed network switch by leveraging the DSA and switchdev subsystems. It details the process of designing and integrating a Realtek RTL8367S switch chip with a custom-built board, including power configurations and communication interfaces. The post also covers configuring the switch in Linux, required kernel options, and device tree modifications to enable functionality. Challenges and limitations are also addressed.

  14. 14
    Article
    Avatar of lobstersLobsters·2y

    xplshn/dbin: 📦 Poor man's package manager. +2510 statically linked binaries in the repos! The easy to use, easy to get, suckless software distribution system

    dbin is a Golang-based, statically linked package manager tailored for Linux and particularly suited for embedded systems like Amd64 and Aarch64. It eliminates dependency issues and bloat, offering a straightforward software distribution system. Key commands include list, install, remove, update, and info. It also supports Android, provided certain environment variables are set. Contributions and custom repo additions are welcomed, and the project is under the RABRMS License.

  15. 15
    Article
    Avatar of communityCommunity Picks·2y

    Apple’s Embedded Swift Programming Language Now Supports ESP32-C6, nRF52840, RP2040 and other MCUs

    Apple has launched a beta version of Embedded Swift, designed for microcontrollers like ESP32-C6, Pi RP2040, STM32F7, and nRF52840. This streamlined version of Swift, with compact binaries and support for the Matter protocol, aims to simplify IoT development for developers familiar with Swift. Apple also provides example codes to assist with the transition. However, it is still under development and requires snapshot versions for experimentation.

  16. 16
    Article
    Avatar of awelixAwesome Elixir·2y

    WhyElixir

    Elixir is a dynamic, general-purpose language designed for building scalable, concurrent, fault-tolerant, and high-performance applications. It features a syntax inspired by Ruby and operates on the Erlang Virtual Machine, providing essential features for distributed and responsive applications. Elixir's operational simplicity, straightforward syntax, and active community make it an appealing choice. Notable frameworks like Phoenix for web development and Nerves for embedded systems highlight its versatility. Companies like Adobe, Discord, and Pinterest use Elixir to handle millions of users, attesting to its reliability and efficiency.

  17. 17
    Article
    Avatar of hnHacker News·2y

    Compiling to Assembly from Scratch

    Learn how to build a compiler from scratch covering both compiler theory and assembly programming. This book, authored by Vladimir Keleshev and initially published as an ebook in 2020, uses a subset of TypeScript targeting the ARM 32-bit instruction set. It includes exclusive illustrations and a print edition available for purchase. Source code and ports in Python and OCaml are available on GitHub.

  18. 18
    Article
    Avatar of hnHacker News·2y

    Kevin Boone: Why systemd is a problem for embedded Linux

    systemd, designed for general-purpose computers, poses challenges for embedded Linux due to its higher resource usage and complexity. Despite its widespread adoption in mainstream distributions, it is less suitable for low-resource environments such as the Raspberry Pi. Alternatives like SystemV init and specialized utilities offer better performance in these contexts. Distribution maintainers favor systemd for its comprehensive functionality, but this trend could marginalize more efficient alternatives, affecting the suitability of Linux for embedded applications.

  19. 19
    Article
    Avatar of itsfossIt's Foss·2y

    What is Raspberry Pi Compute Module? What is it used for?

    Compute modules, essentially stripped-down versions of single-board computers, offer essential processing components like CPU, memory, and storage but exclude many peripherals and I/O ports. They are ideal for creating specialized, compact, and scalable devices, making them valuable in applications like cluster computing, home automation, handheld devices, and industrial automation. Despite their flexibility, compute modules can be costly and require additional boards, adding complexity. Popular options include Raspberry Pi, Orange Pi, and Nvidia Jetson modules.

  20. 20
    Article
    Avatar of qtQt·2y

    Embedded Software Programming Languages: Pros, Cons, and Comparisons of Popular Languages

    Selecting the right programming language for an embedded system is crucial, with popular choices including C, C++, Python, MicroPython, and Java. Each language has its advantages and limitations, such as C's efficiency and Python's ease of learning. Experts suggest considering the system's requirements, such as memory and processing power, as well as the development team's expertise when choosing a language. Compiled languages like C and C++ offer speed and stability, whereas interpreted languages like Python provide portability and ease of use. Ada is recommended for systems requiring high security and reliability.

  21. 21
    Article
    Avatar of hnHacker News·2y

    Using SIMD for Parallel Processing in Rust

    SIMD (Single Instruction, Multiple Data) is a technique for parallel processing within a single CPU core, accelerating data-intensive operations. This post explores how Rust developers can leverage SIMD using stable features, the experimental std::simd for portable SIMD, and platform-specific intrinsics through std::arch. Key techniques include understanding SIMD operations, harnessing compiler auto-vectorization, and implementing performance-critical code. Real-world applications span high-performance computing, multimedia processing, systems programming, embedded systems, and cryptography.

  22. 22
    Article
    Avatar of lobstersLobsters·2y

    TinyGo

    TinyGo is a compiler that brings the Go programming language to embedded systems and the modern web. It can compile and run programs on various microcontroller boards and produce compact WebAssembly code.

  23. 23
    Article
    Avatar of googleossGoogle Open Source Blog·2y

    Introducing the Pigweed SDK: A modern embedded development suite

    Google introduces the Pigweed SDK, a modern suite for embedded development, especially aimed at 32-bit microcontrollers like those in the Raspberry Pi Pico family. The SDK includes extensive middleware libraries, RTOS abstractions, a powerful RPC interface, and full support for Clang/LLVM toolchains. It features Visual Studio Code integration, GitHub Actions support, and a Bazel-based build system. The new release enhances development, debugging, and testing processes, aiming to reduce maintenance and debugging overheads. Official support for the new Raspberry Pi Pico 2 (RP2350) is also included, along with guides and sample applications to help developers get started quickly.

  24. 24
    Article
    Avatar of lobstersLobsters·2y

    18 Months with a Framework 13 – Project Gus

    The author shares their 18-month experience with the Framework 13 laptop, highlighting its repairability, sturdiness, display quality, and modular ports. They also discuss the laptop's downsides including flimsy default hinges, weak USB-A ports, and BIOS/firmware issues, especially for Linux users. Despite the criticisms, the author remains optimistic about Framework's mission and future improvements.

  25. 25
    Article
    Avatar of lobstersLobsters·2y

    C isn’t a Hangover; Rust isn’t a Hangover Cure

    The post discusses the risks of memory safety issues in C and C++ code, the reasons why people don't switch from C to other languages, and the role of C in the embedded systems industry.