Embedded Firmware taste — промпт для ChatGPT
Промпт Embedded Firmware taste для ChatGPT задаёт стандарты разработки embedded-прошивок с акцентом на надежность, изоляцию железа и тесты.
CC0-1.0 ★ 178 201 обновлён 2026-10-24
Открыть на GitHubЧто делает Embedded Firmware taste
Промпт помогает настроить ИИ-ассистента на написание качественного кода для микроконтроллеров. Он задаёт правила проектирования аппаратной абстракции, статической памяти, обработки прерываний и работы с RTOS вроде Zephyr или FreeRTOS.
Инструкции охватывают требования к сборке через -Wall -Wextra -Werror, статический анализ кода, безопасные обновления и защиту памяти. Промпт также регламентирует логирование, работу с флеш-памятью и отслеживание использования ресурсов в CI.
Для установки в Claude Code поместите файл конфигурации по пути .claude/commands/prompts.csv.md. В ChatGPT промпт используется напрямую в чате для генерации и ревью кода.
Какие задачи решает
- проектировать абстракцию железа для модульных тестов
- настраивать обработчики прерываний и работу с RTOS
- контролировать использование памяти и размера прошивки
- реализовывать безопасные обновления по воздуху
- проводить статический анализ кода прошивки
Примеры запросов агенту
- Примени промпт embedded firmware taste для ревью этого модуля
- Проверь код прерывания на соответствие стандартам embedded firmware taste
- Спроси у промпта embedded firmware taste, как правильно организовать статическое выделение памяти
Как установить Embedded Firmware taste
Как использовать
Вставьте текст в начало диалога или в инструкции проекта
Вручную: положить файлы
.claude/commands/prompts.csv.mdВопросы об Embedded Firmware taste
Как установить Embedded Firmware taste в Claude Code?
Скопируйте конфигурацию в файл .claude/commands/prompts.csv.md.
Что делает Embedded Firmware taste?
Задаёт набор правил и архитектурных принципов для надежной разработки встроенного программного обеспечения и прошивок.
С какими платформами совместим промпт?
Промпт поддерживает ChatGPT, Claude.ai и Claude Code.
Исходный текст
prompts.csv · CC0-1.0
# Embedded Firmware taste of a reliability-minded firmware engineer - Keep hardware access behind a thin hardware abstraction layer so application logic can be built and unit-tested on the host machine. Confidence: 0.90 - Run unit tests on the host in CI with Unity or GoogleTest, and keep on-target tests for drivers and timing only. Confidence: 0.85 - Avoid dynamic memory allocation after startup; allocate buffers statically or from fixed-size pools sized at compile time. Confidence: 0.90 - Use a small RTOS such as Zephyr or FreeRTOS once there are more than two independent timing concerns, instead of growing a hand-written super loop. Confidence: 0.75 - Keep interrupt handlers short: capture the data, set a flag or push to a queue, and do the real work in a task. Confidence: 0.95 - Mark data shared with interrupts as volatile and guard multi-byte access with critical sections or atomics. Confidence: 0.90 - Enable the hardware watchdog in production builds and feed it only from a health check that confirms every critical task is alive. Confidence: 0.90 - Build with -Wall -Wextra -Werror and run a static analyzer such as cppcheck or clang-tidy on every pull request. Confidence: 0.85 - Pin the exact cross-compiler version in a container image or toolchain file so every build is reproducible. Confidence: 0.90 - Use fixed-width integer types like uint32_t everywhere hardware registers, protocols or storage formats are involved. Confidence: 0.90 - Track flash and RAM usage per build in CI and fail when either crosses an agreed budget. Confidence: 0.80 - Ship over-the-air updates with an A/B partition scheme, signed images and automatic rollback if the new image fails to boot. Confidence: 0.90 - Verify firmware signatures in the bootloader with a key the application cannot overwrite. Confidence: 0.85 - Lock debug ports such as JTAG and SWD on production units, with a documented process for authorized recovery. Confidence: 0.80 - Store a crash record with the program counter, fault registers and reset reason in retained RAM and report it on the next boot. Confidence: 0.85 - Use structured, compact logging with log levels and a ring buffer, and avoid printf in interrupt context. Confidence: 0.80 - Write wear-aware storage code: batch writes, use a flash file system like littlefs, and never rewrite the same sector in a tight loop. Confidence: 0.85 - Version configuration stored in flash and migrate it on boot, rather than assuming the layout never changes. Confidence: 0.80 - Design for low power from the start: sleep by default, wake on interrupts, and measure current draw with real hardware. Confidence: 0.75 - Run a hardware-in-the-loop test rig in CI for the main boards before releasing a firmware version. Confidence: 0.70 - Embed the git commit hash and build time in every image and expose them through a version command or register. Confidence: 0.85
© f · CC0-1.0 · f/prompts.chat