Skip to content

Instantly share code, notes, and snippets.

@todbot
Last active September 6, 2023 18:54
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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