thanks for all the help everyone!
i got busy for a while, so i only just had a chance to try this again and i got it working!
one big difference is that i have an intel mac with OS X 10.5 now (previously had a G4 with 10.4) which makes building everything actually work as opposed to having endless confusing errors.
so anyway for posterity here's everything i did to get it working:
1. I downloaded a prebuilt arm-GCC from
http://www.paintyourdragon.com/uc/osxstm32/ (thanks pburgess!), which is basically just a prebuilt CodeSourcery distribution.
2. then I downloaded the D2XX drivers from
http://www.ftdichip.com/Drivers/D2XX.htm and installed them as per the included readme
3. then built OpenOCD as per
http://openfacts.berlios.de/index-en.ph ... ng_OpenOCD with the configure option --enable-ft2232_ftd2xx
4. then made an openocd.cfg file for the STM32 / ARM-USB-TINY combination, based on /usr/local/lib/openocd/interface/olimex-jtag-tiny-a.cfg and /usr/local/lib/openocd/target/stm32.cfg which were almost correct but needed the TINY's product id and needed to specify the offset and size of the flash address bank. the resulting openocd.cfg file:
Code: Select all# REFERENCE: http://www.olimex.com/dev/arm-usb-tiny.html
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x0004
# script for stm32
# jtag speed
jtag_khz 500
jtag_nsrst_delay 100
jtag_ntrst_delay 100
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
jtag_device 5 0x1 0x1 0x1e
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target cortex_m3 little 0
working_area 0 0x20000000 16384 nobackup
#flash bank str7x <base> <size> 0 0 <target#> <variant>
flash bank stm32x 0x08000000 0x20000 0 0 0
# For more information about the configuration files, take a look at:
# openocd.texi
5. lastly i found a simple blinking light example:
http://www.siwawi.arubi.uni-kl.de/avr_p ... tm32_blink
i changed the PC4 led pin in main.c to PC12 (the Olimex STM32-H103 board's led pin), ran make, and plugged the programmer USB in as well as the board USB (for power).
finally, I ran openocd with my openocd.cfg file from above, telnetted to localhost:4444, and ran the commands:
Code: Select allhalt
stm32x mass_erase 0
flash write_bank 0 main.bin 0
reset
And the light blinked! So, next time I have some time I can hopefully do something more substantial...