This guide breaks down how to make firmware work "easy" by using the right tools, structuring your project correctly, and simplifying the update process.
The Client: A medical device startup with 15,000 lines of spaghetti firmware that crashed unpredictably. The Problem: The firmware was written for an old PIC18. They needed to move to an STM32L4 for better battery life, but rewriting drivers would take six months. The Solution: EFRPME.
The team spent one week describing their hardware in the board.efrpme file. They then used the legacy import tool (efrpme migrate --legacy pic18_project/) which analyzed the old code and generated equivalent EFRPME event blocks. In two weeks, they had a working prototype on the STM32. Firmware work that should have been hard became easy. efrpme easy firmware work
efrpme new temp_logger --target=stm32f103
cd temp_logger
The CLI generates a project skeleton with a hardware.toml file and a main.c file that already includes the EFRPME event loop.
For those who hate the command line, EFRPME offers a Visual Studio Code extension and a standalone GUI. Drag and drop peripherals, click "Generate Code," and watch the IDE write professional-grade C++20 for you. project/
Traditional Approach: You write 50 lines of C code to set clock trees, configure GPIO modes, set alternate functions, and initialize DMA channels. One wrong bit field, and the microcontroller hangs.
EFRPME Approach: You define your peripherals in a simple JSON or TOML configuration file. For example: src/ — C/C++ source files include/ — headers
"peripherals":
"uart1": "baud": 115200, "pins": "TX:PA9, RX:PA10", "buffer": 256 ,
"led": "pin": "PB5", "mode": "pwm", "freq": 1000
EFRPME’s code generator then produces the entire HAL initialization code. This eliminates manual register manipulation and guarantees that your configuration is correct at compile time.