ormus-solutions/libreembed-claude-code/bootloader-patterns
- community
Checking that the SKILL.md file is still in the repository.
Bootloader patterns for STM32, nRF52, and SAM parts: boot decision tree, RTC backup register boot flags, dual-bank flash layout, YMODEM receive over UART, post-flash verification, and watchdog handling during boot. Use when building or reviewing the boot path of a device that updates in the field.
Install
npx vskill@latest install ormus-solutions/libreembed-claude-code/bootloader-patternsSKILL.md
bootloader-patterns
Knowledge Base
Production bootloader patterns for STM32, nRF52, and SAM MCUs.
Pattern 1: Boot Decision Tree
Pattern 2: RTC Backup Register for Boot Flags
STM32 RTC backup registers survive reset (not power-off). Ideal for bootloader flags.
Pattern 3: Dual-Bank Flash Layout (STM32F407, 1MB)
Linker scripts for application: ORIGIN = 0x08008080 (0x08008000 + 0x80 for header).
Pattern 4: YMODEM Receive Over UART
YMODEM-1K is the standard for bootloader firmware transfer. 1024-byte packets, CRC-16.
Libraries: libxmodem (open-source), or roll your own with 200 lines of C.
Pattern 5: Post-Flash Verification
After writing each page to flash, read it back and compare.
Pattern 6: Watchdog During Bootloader
Always feed a watchdog during flash write loops. If flash write hangs (bad sector), WDT resets and bootloader recovers.
Anti-Patterns
- Jumping to app without disabling IRQs: Application installs its own vector table; pending IRQs from bootloader fire in application context and crash it.
- Writing new image over running firmware without dual-bank: Power loss during write = unrecoverable brick.
- CRC only, no signature: CRC protects against corruption, not malicious injection. Add ECDSA for production.
- No boot counter with fallback: One bad image = permanent brick in the field.
- Bootloader in non-protected flash: Application bug can overwrite the bootloader.
References
- AN3965 (ST): STM32F40x/41x in-application programming using USART
- mcuboot: https://github.com/mcu-tools/mcuboot
- mbedTLS ECDSA: https://mbed-tls.readthedocs.io/
- YMODEM protocol specification by Chuck Forsberg
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/bootloader-design/skills/bootloader-patterns/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ormus-solutions/libreembed-claude-code/bootloader-patterns)