Few days back I started working on serial debugging. Having access to BusBlaster v3, I used OpenOCD to tinker with the mcu. First things first -- I had to solder few wires to the pads.
First step is to configure the CLPD on the BusBlaster board with kt-link device. I used ready-to-use svf file from https://github.com/bharrisau/busblaster project.
$ openocd -f board/dp_busblaster_v3.cfg -c "adapter_khz 1000; init; svf system.svf; shutdown"
After that, I started OpenOCD with configuration for stm32f0x boards (available in the project repository on github):
$ openocd -f openocd-swd.cfg
OpenOCD exposes two TCP ports:- 4444 - for interactive console
- 3333 - for gdb
Connecting to 4444 with telnet and issuing simple command proved the setup is working as expected.
$ telnet localhost 4444 Trying ::1... Trying 127.0.1.1... Connected to localhost. Escape character is '^]'. Open On-Chip Debugger > flash info 0 #0 : stm32f1x at 0x08000000, size 0x00004000, buswidth 0, chipwidth 0 # 0: 0x00000000 (0x400 1kB) not protected # 1: 0x00000400 (0x400 1kB) not protected # 2: 0x00000800 (0x400 1kB) not protected # 3: 0x00000c00 (0x400 1kB) not protected # 4: 0x00001000 (0x400 1kB) not protected # 5: 0x00001400 (0x400 1kB) not protected # 6: 0x00001800 (0x400 1kB) not protected # 7: 0x00001c00 (0x400 1kB) not protected # 8: 0x00002000 (0x400 1kB) not protected # 9: 0x00002400 (0x400 1kB) not protected # 10: 0x00002800 (0x400 1kB) not protected # 11: 0x00002c00 (0x400 1kB) not protected # 12: 0x00003000 (0x400 1kB) not protected # 13: 0x00003400 (0x400 1kB) not protected # 14: 0x00003800 (0x400 1kB) not protected # 15: 0x00003c00 (0x400 1kB) not protected STM32F03x - Rev: 1.0In the next episode, I'll try to build simple blinkenlights firmware and flash it onto the board.
Catch you later.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.