stm32f4-tdd

Run host-based STM32F4 firmware unit tests using Unity and FFF.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/pjy4617/pjy-claude-skill --skill stm32f4-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stm32f4-tdd
Source: https://github.com/pjy4617/pjy-claude-skill/tree/main/plugins/stm32f4/skills/stm32f4-tdd
Command: npx skills add https://github.com/pjy4617/pjy-claude-skill --skill stm32f4-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

STM32F4 펌웨어의 호스트 기반 단위 테스트를 통해 MCU 하드웨어 없이 PC에서 애플리케이션 로직, 상태 머신, 프로토콜 파서 및 드라이버 로직을 테스트할 수 있습니다. Unity + FFF(Fake Function Framework)로 HAL 함수를 가짜로 대체하고 테스트의 재현성을 확보합니다.

Core Features & Use Cases

  • 호스트 기반 테스트 구조를 정의하고 Red-Green-Refactor 사이클로 펌웨어를 안전하게 검증합니다.
  • HAL Mocking을 통해 실제 하드웨어 의존성을 제거하고 로직 검증을 빠르게 수행합니다.
  • 테스트 워크플로우에 맞춘 코드 작성과 테스트 러너를 통해 즉시 피드백을 제공합니다.

Quick Start

Launch host-based tests with the Unity + FFF harness to validate STM32F4 components on a PC.

Frequently Asked Questions about stm32f4-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run STM32F4 firmware unit tests on a PC without hardware?

Host-based STM32F4 firmware unit tests run on a PC by using Unity and FFF to mock HAL functions, allowing application logic validation without physical MCU hardware. This approach executes test cases directly on the host machine.

What is HAL mocking in embedded firmware testing?

HAL mocking in embedded firmware testing uses the Fake Function Framework to replace hardware abstraction layer functions with fake implementations, removing hardware dependencies to validate application logic, state machines, and protocol parsers quickly.

Do I need real STM32F4 hardware to validate state machines and protocol parsers?

You do not need real STM32F4 hardware to validate state machines and protocol parsers. By using Unity and FFF to create a minimal HAL fake layer, host-based tests execute these components entirely on a PC.

How to apply Red-Green-Refactor TDD cycles to STM32F4 drivers?

Apply Red-Green-Refactor TDD cycles to STM32F4 drivers by defining a host-based test structure with Unity and FFF, writing tests for driver logic, running them on a PC, and refactoring safely with immediate feedback from the test runner.

Can I use Unity and FFF to test STM32F4 application logic on a host machine?

You can use Unity and FFF to test STM32F4 application logic on a host machine. This combination provides a test harness that mocks HAL dependencies, enabling fast execution of realistic test scenarios without flashing firmware.

What are the limitations of host-based testing for STM32F4 firmware?

Host-based testing for STM32F4 firmware cannot validate real hardware timing, interrupt behavior, or peripheral electrical characteristics. It is limited to testing application logic, state machines, protocol parsers, and driver logic through mocked HAL functions.