Skip to content

Instantly share code, notes, and snippets.

@todbot
Last active October 16, 2024 20:03
Show Gist options
  • Save todbot/6b8da4bed3545313ae976be6be7ffc40 to your computer and use it in GitHub Desktop.
Save todbot/6b8da4bed3545313ae976be6be7ffc40 to your computer and use it in GitHub Desktop.
Programming a Tomu EFM32HG with ST-Link V2 and OpenOCD

Programming a Tomu EFM32HG with ST-Link V2 and OpenOCD

Here's one way to program a Tomu (https://tomu.im/) or EFM32 chip using a cheap $8 ST-Link V2 programmer

  1. Install OpenOCD - http://openocd.org/

    e.g. on Mac OS X: brew install openocd

  2. Create a file called "~/openocd-stlinkv2-efm32.cfg" that contains:

    source [find interface/stlink-v2.cfg]
    set CHIPNAME efm32
    set CPUTAPID 0x0bc11477
    source [find target/efm32.cfg]
  1. Program a Tomu with a .bin file
    cd tomu-quickstart/miniblink
    make 
    openocd -f ~/openocd-stlinkv2-efm32.cfg -c "program miniblink.bin verify reset exit 0x4000"
  1. Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment