Hi guys
I’ve been trying for a while now to do something that should be possible to do, but I’m not sure. In short, I’m trying to use my STM32F4Discovery board (or at least the stlinkv2 on it) to program my board with an LPC1769 on. I have tried downloading openocd-0.6.0-rc2 and also using the versaloon branch with swd support. However, I’m not sure which files I should use (cfg-files for interface, target etc). Should I have an openocd.cfg as well (some guides mention this)? Using different combinations of files I get these kinds of errors:
- Using everything in openocd0.6.0 (specifically the interface stlink-V2)
sudo /Users/Sterna/Downloads/openocd/src/openocd -f /Users/Sterna/Downloads/openocd/tcl/interface/stlink-v2.cfg -f /Users/Sterna/Downloads/openocd/tcl/target/lpc1769.cfg
Open On-Chip Debugger 0.6.0-rc2-dev-00001-g9fbfb61 (2012-08-31-18:03)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
adapter speed: 1000 kHz
adapter_nsrst_delay: 200
Runtime Error: /usr/local/share/openocd/scripts/target/lpc17xx.cfg:54: invalid command name "jtag_ntrst_delay"
in procedure 'script'
at file "embedded:startup.tcl", line 58
at file "/Users/Sterna/Downloads/openocd/tcl/target/lpc1769.cfg", line 17
at file "/usr/local/share/openocd/scripts/target/lpc17xx.cfg", line 54
- Using everything (well, mostly the interface ) from versaloon branch (The top line is run straight in the terminal):
sudo /usr/local/openocd/bin/openocd -f interface/vsllink-swd.cfg -f lpc1769.cfg
Open On-Chip Debugger 0.6.0-dev-g1981fa8 (2012-09-01-01:02)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Warn : must select a transport.
Info : OpenOCD runs in SWD mode
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
500 kHz
Error: Can't find USB JTAG Interface!Please check connection and permissions.
Runtime Error: lpc1769.cfg:62:
in procedure 'script'
at file "embedded:startup.tcl", line 58
in procedure 'init' called at file "lpc1769.cfg", line 62
Since I have several versions of oocd (I have like three), it would be appreciated to know if there is any difference in the files I’m supposed to use.
What I HAVE succeded with is something I didn’t think would be possible. I have been programming an stm32F103 all summer using a combination of the st-flash util and gdb (using an stlinkv2 and swd) using the load command in gdb. This even loads stuff into flash. I’ve also tried using this on the LPC1769, and I can debug it (send start/stop commands and examine memory) but when I try to write, it fails immediately.
I also use Mac OSX, so building the software is a little trickier for me, since I can’t just go apt-get (I have to use Macports instead, and it doesn’t put things in /usr/local/).
Hope anyone can shed some light on my situation.