JTAG and bare snickerdoodle

341 views
Skip to first unread message

Rob Barris

unread,
Jul 14, 2016, 10:43:41 PM7/14/16
to snickerdoodle forum
After a snafu with my pin-to-pin wiring, I'm able to contact the base snickerdoodle (7010 connectors up model) via the Digilent HS3 JTAG, in XSDK, but I am having trouble making it launch and debug a standalone baremetal app.

I've done this with Zedboard and with Snickerdoodle black on the breakyBreaky, so I'm not sure what's different here.

I am able to program the FPGA easily.  And in XSDK I have been able to issue the "rst -srst" command in the XSDB console.  However, trying to launch the "hello world" UART app (*) hasn't yet succeeded.  I did set up my "debug configuration" to always reset and program the whole device at initiation of debug session.

Info: ARM Cortex-A9 MPCore #0 (target 3) Stopped at 0x0 (Vector Catch)
Info: ARM Cortex-A9 MPCore #1 (target 4) Stopped at 0xffffff34 (Suspended)
100%    1MB   1.8MB/s  00:01    
Downloading Program -- /home/rbarris/genxdemos/starter_ksd/starter_ksd.sdk/hello/Debug/hello.elf
section, .text: 0x00100000 - 0x00101963
section, .init: 0x00101964 - 0x0010197b
section, .fini: 0x0010197c - 0x00101993
section, .rodata: 0x00101994 - 0x001019ab
section, .data: 0x001019b0 - 0x00101e23
section, .eh_frame: 0x00101e24 - 0x00101e27
section, .mmu_tbl: 0x00104000 - 0x00107fff
section, .init_array: 0x00108000 - 0x00108007
section, .fini_array: 0x00108008 - 0x0010800b
section, .bss: 0x0010800c - 0x00108033
section, .heap: 0x00108034 - 0x0010a03f
section, .stack: 0x0010a040 - 0x0010d83f
aborting, 1 pending requests... 
Failed to download /home/rbarris/genxdemos/starter_ksd/starter_ksd.sdk/hello/Debug/hello.elf
Info: ARM Cortex-A9 MPCore #0 (target 3) Running
xsdb% Info: ARM Cortex-A9 MPCore #1 (target 4) Running

So I am wondering, why was this super easy to get going on the black+breakybreaky but I'm struggling to get this to run on the base unit with JTAG wired direct to J2.

Is there any other pin or signal I need to adjust/wire, or should I remove the SDcard, or any ideas on what's happening here would be helpful.

(*) is UART0 the correct UART in the Zynq to enable, to send output back through the USB / ttyACM0 link ?  When I created a default project in Vivado using the snickerdoodle boardfile, none of the UARTs were checked as enabled in the PS/PL config for the Zynq IP in the block design.  As a guess, I checked the "UART0" and rebuilt the bitstream and re-exported hardware, after which I was then able to create that hello-world-UART project; XSDK wouldn't let me create it before because it felt the hardware config coming from Vivado had "no UART", which was true...

Rob Barris

unread,
Jul 14, 2016, 11:14:56 PM7/14/16
to snickerdoodle forum
I did find out that maybe the UART / MIO selection in the IP config dialog for the Zynq component, maybe different on the 7010 board preset compared to the 7020 ?

i.e. it starts off with the UART0 checkbox off, I turned that on, and later on I noticed that the little green button on that row off to the right, to pick the MIO pins 50/51, that one wasn't clicked either, whereas on the 7020 project it was.

I still don't have the debugger launching the app code correctly though, but I did want to point out a possible discrepancy in the board presets.

weath...@krtkl.com

unread,
Jul 14, 2016, 11:20:17 PM7/14/16
to krtkl-sni...@googlegroups.com
Bare metal on connectors up with XSDK Rob.   Now you are speaking my language!  I can probably help you with this one.
Unfortunately I just got done snaking out my sink drain so I need to go shower and wash up before I build something for you.

Sooner or later I will get the WiFi working BareMetal based upon this: http://www.ti.com/tool/WILINK8-WIFI-MCP8

Rob, yes the UART Console is on MIO50/51 -- we need to add an issue on Github for the software team if that is broken

Anyway here is my JTAG adapter:


IMG_4861.jpeg
IMG_4862.jpeg
wiring.png

Rob Barris

unread,
Jul 14, 2016, 11:25:03 PM7/14/16
to krtkl-sni...@googlegroups.com
I'll try making a new project from scratch and see how that goes, keeping the UART0 config in mind

Oh and yes, that set of pics was what I was staring at last night to wire up the teeny little pins on my HS3

Rob Barris

unread,
Jul 14, 2016, 11:48:58 PM7/14/16
to krtkl-sni...@googlegroups.com
I got it to work with UART0 activated on MIO 50/51. (Meaning I was able to export that bitstream, make a hello world project in XSDK, and launch it in the system debugger, step through and get the output in minicom.)

I noticed that when I set up the block design and ran the design automation assistance that it also enabled a bunch of other PS IO subsystems that hadn't been set on my first project for the 7010.  So I might have somehow messed up that project setup.  Going to run through it one more time.

Varun Nagpal

unread,
Apr 4, 2018, 6:04:44 PM4/4/18
to snickerdoodle forum
Hello Rob,

I am almost new (rusty) to FPGA design. I have a snickerdoodle black 7020 with connectors in up configuration. I donot have breakyBreaky but instead jumper wires. I have not loaded any micro sd card on the board so far so there is no linux booting on it. 4

I was therefore trying to create a standalone bare metal application on using Vivado and XSDK on WIndows. I donot have any JTAG programming cable and I was thinking maybe micro USB cable will be able to transfer my bare metal image to the snickerdoodle. But whenever I try to run my hello world app containing my c code and bitstream via xsdk on the device, I get errors that device cannot be found. The target device shown is local and neither vivado nor xsdk is able to communicate with the device.  By the way, I also tried GPIO example application available on github repository, but Vivado is not able to load the project properly when converting it to latest version and subsequently gives error when I try to build it. 

How do I move forward to run a bare metal app on my snickerdoodle ? Can i load my bare metal app in QSPI flash ?  Or should I buy a JTAG adapter...if yes, can anyone recommend a generic JTAG cable-adapter which can work on variety of Xilinx devices and possibly Altera ?

Thanks for help!

Markus

unread,
Apr 4, 2018, 6:44:38 PM4/4/18
to snickerdoodle forum
hello Varun, 

The snickerdoodle does not support JTAG over micro USB cable. Once you load your image to snickerdoodle you can communicate on UART over microUSB. 

For your device beeing found in Vivado or XSDK you'll need a JTAG adapter. 

You should post your error report for further help on example application. 

Create bootloader and place it on microSD-Card

can't give you any recommendations regarding JTAG adapter

cheers

Rob Barris

unread,
Apr 5, 2018, 12:04:43 PM4/5/18
to snickerdoodle forum
I use the Digilent HS3 adapter, it works well with Vivado.  In my case I have breakyBreaky so it just plugs in there.  To connect it to connectors-up model, you will need to thread jumpers from each JTAG pin to the JTAG adapter:  see table B.1 in this PDF (page 109 of 116, or page "97" per the page labeling text)


I did build one such jig using a 2mm connector so I could plug HS3 into the J2 JTAG pins on a connectors-up snickerdoodle but I only used it briefly.  If you need more to go on I could dust it off and take some pics, but it's basically just the connector with a set of jumpers wired to each of the key pins and then each wire plugs into the right spot on J2.
Reply all
Reply to author
Forward
0 new messages