Ok, I tried openocd, uploaded the code:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> reset halt
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000e10 msp: 0x20005000
> flash write_image erase /home/dan/bluepill.elf
auto erase enabled
device id = 0x20036410
flash size = 64kbytes
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0x20005000
wrote 4096 bytes from file /home/dan/bluepill.elf in 0.292450s (13.678 KiB/s)
> reset
>
And this is the output from the openocd window:
sudo openocd -f /usr/share/openocd/scripts/board/bluepill.cfg -f /usr/share/openocd/scripts/interface/stlink-v2.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
none separate
Warn : Interface already configured, ignoring
Error: already specified hl_layout stlink
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.247152
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'telnet' connection on tcp/4444
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000e10 msp: 0x20005000
auto erase enabled
Info : device id = 0x20036410
Info : flash size = 64kbytes
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0x20005000
wrote 4096 bytes from file /home/dan/bluepill.elf in 0.292450s (13.678 KiB/s)
Still no blinky. I am following some tutorial that I found online, so maybe the commands that I used were not the correct ones?