Porting DirtyJTAG on Snickerdoodle Platform Controller

282 views
Skip to first unread message

dominique%...@gtempaccount.com

unread,
Apr 12, 2018, 3:39:24 PM4/12/18
to snickerdoodle forum
According to Snickerdoodle schematic sheet 4, there is a link between the [K] Platform Controller and ZYNQ_JTAG.

With the recent release of both:
  1. https://github.com/krtkl/snickerdoodle-STM32F078-firmware and
  2. https://github.com/jeanthom/DirtyJTAG
It could be possible to provide Snickerdoodle STM32 firmware with DirtyJTAG services (or similar JTAG SW I/F as per https://github.com/jeanthom/DirtyJTAG#inspiration--links)
If well understood, this solution could avoid the purchase of a dedicated JTAG I/F. What could be the pros/cons of such solution ? Anyone interested in such port ?

Regards, Dominique Torette.

Markus

unread,
Apr 12, 2018, 4:50:44 PM4/12/18
to krtkl-sni...@googlegroups.com
hello Dominique, 

The advantage of this solution would be the cost. A dedicated JTAG programmer is expensive. 
You're saving on parts and it is more convenient to use
The disadvantage would be a slight decrease in speed, and it won't be integrated into Xilinx software. So you can use it to program the FPGA but you can't use the debugger from SDK. 

have you had a look at Derek's Post? He was using XilinxVirtualCable to integrate his JTAG server with the Xilinx tools. He run a hardware server on his raspberry pi. I don't know if his solution has any limitations, seems like it fully integrates in Vivado. 

Derek Mulcahy

unread,
Apr 12, 2018, 4:58:01 PM4/12/18
to Markus, snickerdoodle forum
Hi Dominique and Marcus,

Yes my solution does fully integrate with Vivado. A fork of my code has been created to support the a more recent Raspberry Pi by carlosFPGA. I haven’t tried it but it looks like an good update.

The XilinxVirtualCable support is pretty simple. I would think an ESP32 or ESP8266 could be hacked together without too much effort.

Marcus, you have a good memory!

Derek

On Apr 12, 2018, at 4:50 PM, Markus <123mar...@gmail.com> wrote:

hello Dominique, 

The advantage of this solution would be the cost. A dedicated JTAG programmer is expensive. 
The disadvantage would be a slight decrease in speed, and it won't be integrated into Xilinx software. So you can use it to program the FPGA but you can't use the debugger from SDK. 

have you had a look at Derek's Post? He was using XilinxVirtualCable to integrate his JTAG server with the Xilinx tools. He run a hardware server on his raspberry pi. I don't know if his solution has any limitations, seems like it fully integrates in Vivado. 




Am Donnerstag, 12. April 2018 20:39:24 UTC+1 schrieb Dominique Torette:
According to Snickerdoodle schematic sheet 4, there is a link between the [K] Platform Controller and ZYNQ_JTAG.

With the recent release of both:
  1. https://github.com/krtkl/snickerdoodle-STM32F078-firmware and
  2. https://github.com/jeanthom/DirtyJTAG
It could be possible to provide Snickerdoodle STM32 firmware with DirtyJTAG services (or similar JTAG SW I/F as per https://github.com/jeanthom/DirtyJTAG#inspiration--links)
If well understood, this solution could avoid the purchase of a dedicated JTAG I/F. What could be the pros/cons of such solution ? Anyone interested in such port ?

Regards, Dominique Torette.

--
You received this message because you are subscribed to the Google Groups "snickerdoodle forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to krtkl-snickerdo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/krtkl-snickerdoodle/2535ee51-7275-483c-9e6a-71f50097c646%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

weath...@krtkl.com

unread,
Apr 12, 2018, 5:04:09 PM4/12/18
to snickerdoodle forum
The most clever way to do this without Xilinx support would be to make the STM32F078 USB device look like a USB Ethernet adapter then run the XVC on that using lwIP.

Markus

unread,
Apr 12, 2018, 5:31:36 PM4/12/18
to snickerdoodle forum
yes, I agree. 

after reading XAPP1251, this solution even allows to debug in SDK. The reference design is for linux OS but it can be implemented in bare metal as well, using lwIP. The reference design requires ethernet connection and a USB Ethernet adapter came to my mind (although I don't know how this is done, yet). 

I am not experienced in this field but have been working with lwIP once before. I'd be interested in helping if there's someone with more experience. It really does not seem too complicated at first glance. 

weatherbee, I did not understand, what do you mean by "without Xilinx support"?

Markus

unread,
Apr 12, 2018, 5:41:35 PM4/12/18
to snickerdoodle forum
your post was worth to remember :D

To remember is not the issue but the real challenge is to link to that post from a year ago :S

Markus

unread,
Apr 13, 2018, 12:03:51 PM4/13/18
to snickerdoodle forum
Am Donnerstag, 12. April 2018 20:39:24 UTC+1 schrieb Dominique Torette:
Anyone interested in such port ?

Regards, Dominique Torette.

hi Dominique, 

does this mean you are looking for contributors for this task? 

Dominique Torette

unread,
Apr 13, 2018, 3:25:30 PM4/13/18
to snickerdoodle forum
DirtyJTAG seems to be short piece of firmware which should be a quickly ported.
XilinxVirtualCable interfaced with an USB Ethernet adapter seems a more ambitious project, but much more valuable for the Snickerdoodle community!
Yes, the idea is to build a team with such kind of project in order to demonstrate the interest of an Open-Source Platform Controller Firmware and to learn about the Snickerdoodle on a real and very useful project.
I've some experience in embedded SW, but I'm newbie on ARM platform. So some additional expertise would be very welcome.
As first goal, I'll try to port the XilinxVirtualCable on a RedPitaya to control the a Snickerdoodle...
Any initiative is very welcome! Dominique Torette

Dominique Torette

unread,
Apr 14, 2018, 6:32:31 AM4/14/18
to snickerdoodle forum
Have you any reference for USB Ethernet adapter and lwIP stack for the STM32F078?
Is KRTKL considering to integrate such library in the default firmware?
What do I need to recompile the the STM32 firmware?
Is the no-cost Kiel MDK-lite enough? TIA.

weath...@krtkl.com

unread,
Apr 15, 2018, 9:07:02 PM4/15/18
to snickerdoodle forum
The most likely pathway to success with this is something called RNDIS: https://en.wikipedia.org/wiki/RNDIS
"The Remote Network Driver Interface Specification (RNDIS) is a Microsoft proprietary protocol used mostly on top of USB. It provides a virtual Ethernet link to most versions of the Windows, Linux, and FreeBSD operating systems."

There is a lightweight GitHub project "LRNDIS" that appears to run on an STM32F103 - these are Cortex M3 based but have a Flash and RAM size similar to the Cortex M0 STM32F078 on snickerdoodle.

https://youtu.be/hsqWIqY8b6A
https://github.com/Lexatagan/LRNDIS
https://github.com/fetisov/lrndis

You will see that the above code is using lwIP: https://github.com/fetisov/lrndis/tree/master/lrndis

Once you have lwIP running with a USB Ethernet interface via RNDIS then Xilinx XVC would be trivial to implement:  https://www.xilinx.com/products/intellectual-property/xvc.html

weath...@krtkl.com

unread,
Apr 15, 2018, 9:09:26 PM4/15/18
to snickerdoodle forum
FYI, here is the free professional ARM/Keil IDE/Compiler/Debugger for the STM32F0:  http://www2.keil.com/stmicroelectronics-stm32/mdk

weath...@krtkl.com

unread,
Apr 27, 2018, 12:31:30 AM4/27/18
to snickerdoodle forum
Looking at the code and readme for the reference TCP/IP server posted here illustrates how trivial an XVC server is to implement if a TCP/IP stack (like lwIP+lwRNDIS) is available.

https://github.com/Xilinx/XilinxVirtualCable
Message has been deleted

Markus

unread,
May 17, 2018, 6:53:40 PM5/17/18
to snickerdoodle forum
Any success porting XilinxVirtualCable? I am still struggling with it.

UI0 is listed, eventually.

Markus

unread,
May 21, 2018, 1:12:42 PM5/21/18
to snickerdoodle forum



It's working!

weath...@krtkl.com

unread,
May 21, 2018, 2:17:52 PM5/21/18
to snickerdoodle forum
Awesome!
How does this code work?

Markus

unread,
May 21, 2018, 6:48:34 PM5/21/18
to krtkl-sni...@googlegroups.com
this is the first step, running XVC server on a zynq platform as described in XAPP1251. It is using petalinux on the ARM processor. 

I had a lot of issues with it, since the documentation is outdated. 

It is not running on the platform controller, there is still a lot to do. 

Cousins

unread,
May 22, 2018, 12:31:15 AM5/22/18
to snickerdoodle forum
Sounds like something that needs to be added to the wiki...stat. :)
Reply all
Reply to author
Forward
0 new messages