Embedded Driver Development Workflow
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, andISRare built the way they are, rather than copying vendor libraries blindly. - Bottom-up layering: proceed through
boot/startup, clock tree, stack and.data/.bsscopy, peripheral registers, driver API, and application tasks. - QEMU validation: run supported
Cortex-MandCortex-Alogic 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, andMakefile.baremetalto 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.
Related Skills
A one-shot coding agent built on Claude Code CLI that runs non-interactively, supports a specified workdir, and can be monitored in the foreground or background.
Preview and confirm file sorting by extension, with recursive cleanup, ignore rules, and transactional rollback.
An engineering assistant for static HTML/CSS/JS pages, design-token extraction, IE8-compatible review, and structured delivery.
An engineering workflow for requirement analysis, scenario modeling, risk planning, quality gates, testing, and knowledge capture, with lightweight, standard, and full modes.