Last update for a bit: I've got the code working pretty happily now, I
think.  I've verified that I can mass erase and program the ATMEGA32U4 over
JTAG, and I've implemented JTAG queuing (similar to the code in
interface/jlink.c), which brought the performance up to a sane level.  It
can write to the flash in my AVR at 7.9 KiB/s (compared to 20.7 KiB/s with
my J-Link), so it's in the ballpark.

Latest code:

    https://github.com/myelin/openocd/tree/cmsis-dap-jtag

I'll let this sit for a while, and tidy it up for review once it's gotten a
little bit of use.

Cheers,
Phil

On Wed, Mar 9, 2016 at 1:10 AM, Phillip Pearson <p...@myelin.nz> wrote:

> I finally got my hands on a known-good board with a non-ARM JTAG target on
> it, and verified that my code worked to at least do the initial reset and
> IDCODE read.  It's still very hacky (lots of debug output) but if anyone
> with a CMSIS-DAP adapter and a known-good JTAG chain would like to give it
> a try, clone this repo and check out the cmsis-dap-jtag branch:
>
>     https://github.com/myelin/openocd
>
> openocd -d -f interface/cmsis-dap.cfg -c 'transport select jtag' -f
> target/...
>
> Especially awesome would be anyone who has a non-ARM target (FPGA,
> boundary scan, other processor...) handy, and can verify further than just
> that the IDCODE reads out properly, but anything would be good.
>
> So far I've tested it with an LPC-Link II (with the latest CMSIS-DAP
> firmware programmed in) against an Atmel ATMEGA32U4 target.
>
> Cheers,
> Phil
>
>
> On Thu, Feb 25, 2016 at 3:57 AM, Spencer Oliver <s...@spen-soft.co.uk>
> wrote:
>
>> On 25 February 2016 at 09:38, Paul Fertser <fercer...@gmail.com> wrote:
>> > Hey Spencer,
>> >
>> > On Thu, Feb 25, 2016 at 08:49:13AM +0000, Spencer Oliver wrote:
>> >> If I recall the details CMSIS-DAP operates at the ADIv5 layer so from
>> >> OpenOCD's point of view we still use the swd driver mode but change
>> >> the actual adapter to JTAG mode.
>> >>
>> >> We should not need to implement the full jtag_interface. Try setting
>> >> cmsis_dap_usg::swd_mode to false as a start.
>> >
>> > I'd disagree. If raw JTAG mode is implemented, CMSIS-DAP adapters
>> > would become useful for all kind of OpenOCD work, including
>> > heterogeneous JTAG chains, boundary scan, FPGA/CPLD configuration
>> > etc. Adding just the ADIv5 JTAG mode won't buy us much, IMHO. Why
>> > agree for less when we can get more? ;)
>> >
>>
>> I agree that is a better overall solution, if someone has time to
>> implement it then great.
>>
>> Spen
>>
>
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to