AI Agent Hub
Back to skills
Embedded Driver Development Workflow icon

Embedded Driver Development Workflow

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Follow https://skillhub.cn/install/skillhub.md to install @user_44135a9d/jianglangcaijing.

About this skill

Problems It Solves

Embedded driver work often becomes a patchwork of HAL/SDK calls, unclear register maps, missing startup and clock reasoning, costly hardware debugging, and scattered module interfaces. This skill targets STM32/Cortex-M, 8051/C51, and RISC-V projects and structures driver development from startup, clock setup, and register-level peripherals to RTOS and Linux drivers. It pushes the developer to read the Datasheet and Reference Manual first, mapping base addresses, offsets, bit fields, and reset values before writing code.

How It Works

  • Register-first design: understand why init, configure, read, write, and ISR are built the way they are, rather than copying vendor libraries blindly.
  • Bottom-up layering: proceed through boot/startup, clock tree, stack and .data/.bss copy, peripheral registers, driver API, and application tasks.
  • QEMU validation: run supported Cortex-M and Cortex-A logic early, then move to boards, emulators, oscilloscopes, and logic analyzers.
  • Templates and projects: use assets such as driver_template.c, startup_stm32.s, linker_stm32.ld, and Makefile.baremetal to build compilable skeletons.
  • Scope: covers GPIO, UART, I2C, SPI, ADC, TIMER, PWM, USB, LCD/framebuffer, Qt GUI, FreeRTOS/RT-Thread, Linux character devices, and platform drivers.

Boundaries

It is useful for driver education, bare-metal register drivers, RTOS driver integration, Linux driver porting, and QEMU pre-validation. Special IP, high-speed timing, private hardware, or non-generic peripherals may still require boards, FPGAs, or vendor SDK references. The output favors complete, system-level workflows and runnable project skeletons over isolated API snippets.

Use Cases

  • Build bare-metal GPIO, UART, and I2C drivers for Cortex-M from register maps and configure the clock tree.
  • Use startup code, linker scripts, and a Makefile to run a Cortex-M bare-metal program in QEMU before board testing.
  • Integrate I2C or UART peripherals into FreeRTOS or RT-Thread projects with reusable module interfaces.
  • Develop a Linux character device or platform driver, then verify the build, load, and DTS flow in QEMU.

Best For

  • Embedded engineers owning STM32 peripheral modules who need register-level GPIO, UART, and I2C drivers plus clock setup.
  • Low-level software engineers working on RISC-V or 8051 projects and needing to connect boot code, C drivers, and peripherals into runnable builds.
  • RTOS or Linux driver engineers integrating common peripherals into FreeRTOS, RT-Thread, or Linux character devices.
  • USB or protocol engineers who need descriptor, enumeration, or stack analysis and want QEMU-based pre-validation.