tests for stm32l152discovery board
arm-none-eabi-gcc -I. -fno-common -O0 -g -mcpu=cortex-m0 -mthumb -c -o main arm-none-eabi-ld -v -TSTM32L152xB.ld -nostartfiles -o demo.elf main.o arm-none-eabi-objcopy -Obinary ch.elf ch.bin openocd -f /usr/share/openocd/scripts/board/stm32ldiscovery.cfg
in another terminal; telnet localhost 4444 poll reset halt flash probe 0 flash write_image erase ch.bin 0x08000000 reset exit
arm-none-eabi-gdb ch.elf target remote :3333 cont print i print i quit