gbulmer,
Re: Olimex ARM-USB-TINY, I am sad to report that it doesn't work. I don't know why. It should work according to the Olimex docs, as they think the only differences are "no output buffers just current limitation resistor protectors, no RS232, no power supply to target" which shouldn't matter. But it does.
Re: there are other combinations of trst and srst, yes, I think there probably are... but I am not an embedded ARM expert and don't know much about this. On the Maple R5 schematic, the system reset NRST and the JTAG tap reset TRST are indeed wired together. The OpenOCD docs imply that there are other ways to do it:
In the best case, OpenOCD can hold SRST, then reset the TAPs via TRST and send commands through JTAG to halt the CPU at the reset vector before the 1st instruction is executed. Then when it finally releases the SRST signal, the system is halted under debugger control before any code has executed. This is the behavior required to support the reset halt and reset init commands; after reset init a board-specific script might do things like setting up DRAM.
http://openocd.berlios.de/doc/html/Reset-Configuration.html#Reset-Configuration
And I am not able to get the reset halt
command to work - I can reset, and I can halt, but not both together. When I do, I get the following response:
Open On-Chip Debugger
> reset halt
JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)
Halt timed out, wake up GDB.
timed out while waiting for target halted
TARGET: stm32.cpu - Not halted
Command handler execution failed
in procedure 'reset' called at file "command.c", line 650
called at file "command.c", line 361
I am guessing that means that if I wanted to debug system startup code, I would have a hard time. But that's a guess!
Re: not proving the absence of an error, yes, you are right. The circuit could still work and contain an error.
Re: fixing using various combinations of the reset_config line - I tried several and couldn't find one that worked.
Re: what STM32 JTAG circuit diagram was I referring to, it's figure 12 on page 19 of this document:
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00164185.pdf
Here's a PNG:
http://imgur.com/dJX65
Our current schematic matches this one, except that in the diagram above, the STM32's nRSTIN is connected separately to the JTAG connector's nSRST, and the STM32's nJTRST is connected to the JTAG connector's nTRST. They are not combined, they are separate.
Ideally the next rev of Maple would conform to this diagram, though, since it is what ST recommends. Does this allow a reset halt
? I don't know, but I think it would. Does it matter...? It would probably be more compatible with other JTAG adapters... but again, I don't know for sure.
Re: Maple should support all STM32F JTAG adapters that support 10 pin JTAG, yes, I agree. And it
does bug me that the ARM-USB-TINY doesn't work. But - now that I have a working JTAG adapter this is less of a priority for me. I want to make sure the adapter PCB we designed works. But after that - I want to go on to debugging my project. :-)