ARM-USB-OCD + STM32-H103 + OpenOCD + Eclipse + Win7 64bit

Hi All,

I’m new to the ARM world, I got myself the STM32-H103 board and the Olimex ARM-USB-OCD jTAG debugger :slight_smile: .

For some reason I am having a hard time flashing the STM board with the simple LED blinking example :cry: ! I downloaded the Olimex package software (OpenOCD, Eclipse IDE, YAGARTO) and I am working on Win7 64bit. I had a problem at first with “make”. it sent out an error “Can not find program “make”” which I solved by using the full path in the project properties of where “make” is located. now I’m getting another error on the eclipse ‘console’ tab:

**** Build of configuration Default for project STM32-P103_blink_FLASH ****

D:\OlimexODS\yagarto\bin\make.exe all 
".compiling"
arm-none-eabi-gcc -Wall -fno-common -c -g -mcpu=cortex-m3 -mthumb -g -O0 -I./ -I./lib/ -I./lib/inc/ -I./lib/inc/../../ -DTRACE_LEVEL=4 -o obj/main.o main.c
arm-none-eabi-gcc: CreateProcess: No such file or directory
make: *** [obj/main.o] Error 1

I’m not sure where to go from here!?!

I’m also new to Eclipse :slight_smile: so I’d appreciate the extra explanation if required :wink:

Appreciate your help…

My first guess is that your make program is not in the path. Possibly the compiler as well. Can’t help with win 7, don’t have it. I would guess somewhere you can modify the path.

Can you also put the complete path in the makefile (At least for the compiler stuff).

I am more of a hardware guy who manages to get the software to eventually work.

Ok so now I managed (somehow) to get it to build and got the below output, I think this means building went alright (I think! :smiley: )

**** Build of configuration Default for project STM32-H107_blink_RAM ****

make all 
".compiling"
arm-none-eabi-gcc -Wall -fno-common -c -g -mcpu=cortex-m3 -mthumb -g -O0 -I./ -I./lib/ -I./lib/inc/ -I./lib/inc/../../ -DTRACE_LEVEL=4 -o obj/main.o main.c
arm-none-eabi-gcc -Wall -fno-common -c -g -mcpu=cortex-m3 -mthumb -g -O0 -I./ -I./lib/ -I./lib/inc/ -I./lib/inc/../../ -DTRACE_LEVEL=4 -o obj/system_stm32f10x.o system_stm32f10x.c
arm-none-eabi-gcc -Wall -fno-common -c -g -mcpu=cortex-m3 -mthumb -g -O0 -I./ -I./lib/ -I./lib/inc/ -I./lib/inc/../../ -DTRACE_LEVEL=4 -o obj/stm32f10x_it.o stm32f10x_it.c
".compiling libraries"
arm-none-eabi-gcc -Wall -fno-common -c -g -mcpu=cortex-m3 -mthumb -g -O0 -I./ -I./lib/ -I./lib/inc/ -I./lib/inc/../../ -DTRACE_LEVEL=4 -o obj/stm32f10x_gpio.o ./lib/src/stm32f10x_gpio.c 
arm-none-eabi-gcc -Wall -fno-common -c -g -mcpu=cortex-m3 -mthumb -g -O0 -I./ -I./lib/ -I./lib/inc/ -I./lib/inc/../../ -DTRACE_LEVEL=4 -o obj/stm32f10x_rcc.o ./lib/src/stm32f10x_rcc.c 
".assembling"
arm-none-eabi-as -g -mapcs-32 -o obj/startup_stm32f10x_cl.o ./lib/startup_stm32f10x_cl.s
"..linking"
arm-none-eabi-ld -g -v -nostartfiles  -Map ./main.map -T./lib/stm32_ram.ld -o ./main.out obj/main.o obj/system_stm32f10x.o obj/stm32f10x_gpio.o obj/stm32f10x_rcc.o obj/stm32f10x_it.o obj/startup_stm32f10x_cl.o libgcc.a
GNU ld (GNU Binutils) 2.20.1.20100303
arm-none-eabi-objcopy -O binary ./main.out ./main.bin
arm-none-eabi-objdump -x --syms -S ./main.out > ./main.list 
"...completed."

Now when I try to Run (Run → External tools → ARM-USB-OCD) I get the below and it just halts there and does nothing

Open On-Chip Debugger 0.4.0 (2010-11-23-14:20)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.berlios.de/doc/doxygen/bugs.html
1000 kHz
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
Info : clock speed 1000 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)
Info : stm32.cpu: hardware has 6 breakpoints, 4 watchpoints

What possibly could I be doing wrong? Or what is stopping it from actually continuing as it should??

Appreciate your help! :frowning:

Congratulations, openocd is now running and connected to the processor. It’s just the server that is running which you need to connect to using telnet.

In another terminal try:

telnet localhost 4444

That works on Linux, you’ll probably have a lot more pain on Windows, but once you figure that out, then you can interact with openocd via its command syntax.

Thanks! My problem was actually that I simply didn’t start the debug mode! as smead said, that above only means that openocd is running, all I had to do is start the debugger from eclipse (the “bug” icon to the right of “build” icon at the top) and that’s it :slight_smile: