LibMaple

LibMaple is a port of Wiring for STM32 chips. LibMaple is developed by Leaflabs. Find more info about LibMaple here: www.leaflabs.com

LibMaple is compatible with the Arduino Library. This might be main.cpp:

#include <wirish/wirish.h>

#define LED1  27 // PB0

void setup() {
    pinMode(LED1, OUTPUT);
    Serial1.begin(9600);
}

void loop() {
    Serial1.println("on");
    digitalWrite(LED1, 1);
    delay(500);

    Serial1.println("off");
    digitalWrite(LED1, 0);
    delay(500);
}

To compile your main.cpp with libmaple, make sure you're in the 'arminarm' branch.

cd src/libmaple
git checkout arminarm
[edit main.cpp to your liking]
make BOARD=arminarm MEMORY_TARGET=jtag

Upload the resulting arminarm.bin file with the 'arminarm' tool.

arminarm flash arminarm.bin