Dangerous Prototypes

Dangerous Prototypes => Bus Blaster JTAG debugger => Topic started by: pppd on October 08, 2011, 12:26:13 pm

Title: [SOLVED] Anyone successful with the KT-Link/SWD?
Post by: pppd on October 08, 2011, 12:26:13 pm
Sorry for starting a new topic just for that but nobody seems to have noticed the earlier entry in SWD - BBv2 CPLD KT-link (http://http://dangerousprototypes.com/forum/viewtopic.php?f=37&t=2001). Has anybody been successful with the KT-Link/SWD combination? I tried it with multiple targets using different software and I just can't get it to work. I always get a message that no target is present.
Title: Re: Anyone successful with the KT-Link/SWD?
Post by: ian on October 10, 2011, 11:49:28 am
The only one I can find is in the other thread:
viewtopic.php?f=37&t=2001&p=22817&hilit=ktlink#p22817 (http://dangerousprototypes.com/forum/viewtopic.php?f=37&t=2001&p=22817&hilit=ktlink#p22817)

There could well be a bug in the buffer design. It looks like I did in in a schematic, which is junky. I should re-do it in Verlog. Any thoughts on the current implementation: viewtopic.php?f=37&t=2001&p=22817&hilit=ktlink#p19571 (http://dangerousprototypes.com/forum/viewtopic.php?f=37&t=2001&p=22817&hilit=ktlink#p19571)

Can you please list the targets/softwares so I can find something to test with.
Title: Re: Anyone successful with the KT-Link/SWD?
Post by: pppd on October 10, 2011, 12:10:45 pm
I tried it with LPCXpresso (LPC1114), STM32VLDISCOVERY both host (STM32F103C8T6) and target (STM32F100RBT6B). I am sure I was using the right pins because they worked just fine when using another STM32VLDISCOVERY board flashed with Versaloon as the debugger interface or partly worked when using the BP + pirateSWD python script. I tried the 30 day trial of Cross Studio for ARM and Openocd.

To be honest I have no idea about the KTLink original design so I can't really tell if there's anything wrong or not :/ I just hoped someone used it successfully and could share their experience. Attached is OLS recording of an SWD target identification attempt made with BBv2 + Cross Studio.
Title: Re: Anyone successful with the KT-Link/SWD?
Post by: ian on October 10, 2011, 12:22:50 pm
Thanks, I will order one of these and try it. I have not had the chance to use it myself, I just did my best to imitate the ktlink in the CPLD :)
Title: Re: Anyone successful with the KT-Link/SWD?
Post by: pppd on October 10, 2011, 12:27:48 pm
If you can wait a few days I will send you a home made breakout PCB with an STM32 chip that's working with Versaloon.
Title: Re: Anyone successful with the KT-Link/SWD?
Post by: ian on October 10, 2011, 12:49:55 pm
Sure, thank you. I am out of the country over the weekend, I can't get to it until after next week anyways.
Title: Re: Anyone successful with the KT-Link/SWD?
Post by: sdixon on October 10, 2011, 09:08:27 pm
As I said in the previous thread, I have one datapoint which I can give with certainty:  BBV2 programmed with KTLink using CrossWorks Arm version on OS X (under 30 day trial license).  The target was an LPC1343 on a board design I've been working on.  Chip programming and debugging both worked fine.  The CrossWorks trial license has expired so I can no longer try this again, sorry.  But I did a fair amount of debugging while I had the license so I am confident that it worked in SWD mode for this particular setup.  I didn't try any other targets at the time.  Have you any reason to believe that your BBV2 is functional?  Have you been able to use it for some other target?  Seems like it could just be a defective board.
-scott
Title: Re: Anyone successful with the KT-Link/SWD?
Post by: pppd on October 10, 2011, 09:14:42 pm
Can you please try the CrossWorks without a license? I never activated mine but it still lets me try the target->connect feature. I was waiting for it to start working before using my license.

I tested the BBv2 with CPLDs and it can program them just fine.
Title: Re: Anyone successful with the KT-Link/SWD?
Post by: sdixon on October 10, 2011, 09:59:56 pm
> Can you please try the CrossWorks without a license? I never activated mine but it still lets me try the target->connect feature. I was waiting for it to start working before using my license.
I'll try to dig everything out and give it a try in the next day or so.  I'll let you know what happens.  One thing I do recall now though is that the BBV2 doesn't have the right USB PID/VID to be recognized as a KTLink by CrossWorks by default.  I created a new target in CrossWorks by (I think) duplicating the KTLink entry and changing the USB PID/VID to correspond to the BBV2.  That might be part of your problem.
Title: Re: Anyone successful with the KT-Link/SWD?
Post by: pppd on October 10, 2011, 10:02:36 pm
Thanks! And unfortunately it's not the PID/VID I have actually changed mine to fit the original KTLink. Besides then the message is different and CrossWorks can talk to the BBv2 ( attached OLS log ).
Title: Re: Anyone successful with the KT-Link/SWD?
Post by: sdixon on October 12, 2011, 07:33:55 am
I hooked up my LPC1343 board via SWD lines to the BBV2 (KTLink) and fired up my license expired version of CrossWorks.  If I try to connect to the target it doesn't find one.  However, if I first open an LPC1343 project that I was working on before, then connect to the BusBlaster it finds the Cortex M3 target just fine.  And I can do a few other things without a license including attaching the debugger and doing a little poking around.
So I suspect you are having a problem because you don't have an appropriate project open before trying to connect to your target.  At least, that would be consistent with the behavior I'm seeing.
Title: Re: [SOLVED] Anyone successful with the KT-Link/SWD?
Post by: pppd on October 12, 2011, 11:45:01 am
Thanks a lot, that was it! Now it works as advertised :) I just need to figure out why I can't make it to work with OpenOCD and my ARM programming can finally begin without VMWare! It seems to have problems with STM32F100 unless I disable fast memory access, but at least I know the board is okay.

I will also try to make a combined jtagkey/ktlink SVF for the CPLD so I don't need to flash it every time I change my project.
Title: Re: [SOLVED] Anyone successful with the KT-Link/SWD?
Post by: sdixon on October 12, 2011, 07:02:35 pm
Excellent!  I'm glad you got it going.  CrossWorks is a nice package on OS X.  I just can't justify $150 for personal use just for the ARM version. 
I'd love to see someone get OpenOCD working with SWD on OS X.  I haven't looked at the current progress of SWD in OpenOCD.  Last time I looked, a few months ago, it still wasn't there yet.
[quote author="pppd"]
I will also try to make a combined jtagkey/ktlink SVF for the CPLD so I don't need to flash it every time I change my project.[/quote]
That would be really handy.  Hope you get it working.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01022079544session_write_close ( )...(null):0
20.01052211120ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01052211896Database_MySQL->query( ).../DatabaseHandler.php:119
40.05452350616Database_MySQL->error( ).../Db-mysql.class.php:273