Bootloaders Embedded logo

Bootloaders Embedded

Community
mohitmishra786
bootloaders-embedded

Embedded bootloader skill for firmware update and app handoff. Use when writing a custom bootloader, jumping to application code, relocating VTOR, or implementing DFU/USB firmware update on Cortex-M. Activates on queries about bootloader jump, vector table relocation, application entry point, STM32 DFU, or dual-bank flash.

Overview

Publishermohitmishra786
Repositorylow-level-dev-skills
Skill namebootloaders-embedded
Stars
266
Forks
31
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by mohitmishra786 on GitHub. Read the source before you install it.

Installation

Install the Bootloaders Embedded AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/baremetal/bootloaders-embedded
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git /tmp/low-level-dev-skills
mkdir -p .claude/skills
cp -r /tmp/low-level-dev-skills/skills/baremetal/bootloaders-embedded .claude/skills/bootloaders-embedded
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Bootloaders Embedded in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Bootloaders Embedded on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Bootloaders Embedded is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Embedded Bootloaders

Purpose

Guide agents through embedded bootloader fundamentals: vector table relocation, safe handoff from bootloader to application, flash partitioning, and basic firmware-update patterns (UART, USB DFU, or custom protocol) on Cortex-M and similar MCUs.

When to Use

  • Application must run at non-zero flash offset (e.g. 0x08010000)
  • Implementing OTA or USB DFU without vendor HAL
  • Debugging "app works when flashed alone but not via bootloader"
  • Integrating with skills/baremetal/baremetal-startup and skills/baremetal/stm32-baremetal

Workflow

1. Memory layout (typical STM32)

RegionAddressSizeContent
Bootloader0x0800000016–64 KBBL code, update logic
Application0x08010000remainderApp vector + code

Linker script for app must set FLASH ORIGIN to app base; vector table must live at app base.

2. Valid application image check

Before jump, verify:

App vector[0] (initial SP) points into RAM region
App vector[1] (Reset) points into flash region and has Thumb bit set (LSB=1)
Optional: CRC or magic word in app metadata section
c
#define APP_BASE  0x08010000U

static int app_valid(uint32_t base)
{
    uint32_t sp = *(uint32_t *)base;
    uint32_t reset = *(uint32_t *)(base + 4);
    if (sp < SRAM_BASE || sp > SRAM_END)
        return 0;
    if ((reset & 1U) == 0U)
        return 0;
    if (reset < base || reset > FLASH_END)
        return 0;
    return 1;
}

3. Cortex-M handoff sequence

c
typedef void (*app_entry_t)(void);

void jump_to_app(uint32_t app_base)
{
    uint32_t sp    = *(uint32_t *)app_base;
    uint32_t reset = *(uint32_t *)(app_base + 4);

    /* Disable interrupts and de-init peripherals/boot-owned hardware */
    __disable_irq();
    SysTick->CTRL = 0;
    for (int i = 0; i < 8; i++) {
        NVIC->ICER[i] = 0xFFFFFFFFU;
        NVIC->ICPR[i] = 0xFFFFFFFFU;
    }

    SCB->VTOR = app_base;
    __set_MSP(sp);
    __DSB();
    __ISB();

    app_entry_t entry = (app_entry_t)reset;
    entry(); /* does not return */
}

Application must set SCB->VTOR = APP_BASE early in Reset_Handler if startup assumes relocatable vector table.

4. Bootloader responsibilities

Power-on
├── Init minimal clock + UART/USB for update
├── Check update flag in RTC backup / GPIO strap
├── If update requested → receive image, verify, program flash
└── Else if valid app → jump_to_app()
    └── Else stay in bootloader shell

5. STM32 system memory DFU (factory ROM)

STM32 chips expose USB DFU in system memory when BOOT0=1. Custom bootloaders are separate — do not confuse ROM DFU with user flash BL.

6. Update safety

  • Write to scratch sector, verify CRC, then swap metadata pointer (A/B)
  • Never erase the only valid image without recovery path
  • Reset watchdog only after verified commit

7. Agent usage

/bootloaders-embedded Write STM32F4 jump-to-app at 0x08010000 with VTOR setup

Common Problems

SymptomCauseFix
HardFault after jumpSP invalid or Thumb bit missingValidate vectors; ensure reset | 1
IRQs hit bootloader handlersVTOR not relocatedSet SCB->VTOR before enabling IRQs
App OK standalone, fails via BLLinker still at 0x08000000Relink app with correct ORIGIN
UART garbage after jumpBL left UART runningDe-init or reset peripherals
Brick after OTAPower loss mid-eraseDual-bank or metadata rollback

Related Skills

  • skills/baremetal/baremetal-startup — vector table and Reset_Handler
  • skills/baremetal/stm32-baremetal — flash map and CMSIS
  • skills/baremetal/interrupts-and-exceptions-baremetal — NVIC disable pattern
  • skills/embedded/linker-scripts — VMA/LMA for split images
  • skills/embedded/openocd-jtag — recover bricked flash

Frequently asked questions

What does the Bootloaders Embedded AI skill do?

Embedded bootloader skill for firmware update and app handoff. Use when writing a custom bootloader, jumping to application code, relocating VTOR, or implementing DFU/USB firmware update on Cortex-M. Activates on queries about bootloader jump, vector table relocation, application entry point, STM32 DFU, or dual-bank flash.

Why use Bootloaders Embedded on TypingMind?

Because you install it once and use it with any model. Bootloaders Embedded is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Bootloaders Embedded in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/baremetal/bootloaders-embedded. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Bootloaders Embedded?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Bootloaders Embedded?

As many as you like. As long as a model supports skills, you can use Bootloaders Embedded with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Bootloaders Embedded AI skill free?

Yes. It is published on GitHub by mohitmishra786 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇