mark_feathers has quit [Remote host closed the connection]
sugarbeet has quit [Read error: Connection reset by peer]
sugarbeet has joined #openocd
electricworry has joined #openocd
MGF_Fabio has quit [Ping timeout: 256 seconds]
uartist has joined #openocd
nerozero has quit [Ping timeout: 272 seconds]
f has joined #openocd
f has quit [K-Lined]
crabbedhaloablut has quit []
crabbedhaloablut has joined #openocd
slobodan has quit [Ping timeout: 264 seconds]
Guest60 has joined #openocd
<Guest60>
Hello. I'm trying to load a bitstream to my xilinx spartan lx9 through an obscure digilent jtag adapter, and I dont have a config file avaliable.
<Guest60>
I'm very new to this all, and I don't know where to begin; I've previously ran some programs interacting with the LED and DCM with the ise, and did boundary scanning with iMPACT, but I can't get drivers for my new OS anymore for my board.
Guest60 is now known as EmilSinclair
EmilSinclair is now known as MaxDemian
MaxDemian has quit [Changing host]
MaxDemian has joined #openocd
<PaulFertser>
MaxDemian: hi
<PaulFertser>
MaxDemian: ok, so OpenOCD has configs for some digilent adapters, what adapter do you have and what configs did you try?
<MaxDemian>
PaulFertser: I grep'd the /scripts/ folder by vendor and product, but couldn't find any for my adapter
<PaulFertser>
MaxDemian: as to bitstream, if that doesn't work you can make ise/impact/vivado generate an SVF file for you and OpenOCD will play it back.
<MaxDemian>
oh, I haven't passed the bitstream yet
<PaulFertser>
MaxDemian: so what's your adapter, can you pastebin lsusb -v for it or something?
<MaxDemian>
ID 1443:0007 Digilent Development board JTAG
<PaulFertser>
MaxDemian: do you see what IC is connected to USB there?
<MaxDemian>
Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0010
<MaxDemian>
1x 16 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage
<MaxDemian>
Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Device Status: 0x0000 (Bus Powered)
<PaulFertser>
MaxDemian: please use some pastebin next time'
<MaxDemian>
Would it be worth a try to buy another newer jtag cable, or one that is compatable?
<PaulFertser>
MaxDemian: do you have any regular JTAG adapter?
<PaulFertser>
You can even use raspberrypi to bitbang JTAG if the target voltage levels are 3.3 V.
<MaxDemian>
I wouldn't, no. I'll have to get one. I was hoping to bitbang with openocd
<PaulFertser>
MaxDemian: do you not have a raspberrypi?
<MaxDemian>
no
<MaxDemian>
I'm really very new
<PaulFertser>
Any other MCU or SBC boards probably?
<MaxDemian>
no nothing else besides this
<PaulFertser>
Are you in a university or some other help you can get from more experienced local people, probably a hackspace?
<MaxDemian>
no, not yet in uni
<MaxDemian>
but we're getting off topic
bvernoux has quit [Quit: Leaving]
<MaxDemian>
what would be my next move from here? buy a regular jtag cable?
<PaulFertser>
Yes, e.g. Olimex ARM JTAG or DP Busblaster or TUMPA (non-lite), something like that.
<MaxDemian>
no way I could make my own config file for this adapter?
<PaulFertser>
You can install windows in a VM, configure impact there, sniff the USB communication and reverse-engineer the protocol and write a driver.
<PaulFertser>
I'm not able to find any information about it published. So you have to research it if you really need that.
<MaxDemian>
Would it be a good way to learn?
<MaxDemian>
that sounds really cool
<PaulFertser>
MaxDemian: probably but it would require some essential amount of background knowledge about USB protocols in general (bulk endpoints etc), the JTAG state machine and how the signals look on the wire, probably familiarity with some other protocols (e.g. mpsse) to see how they're usually implemented etc.
<MaxDemian>
this repo this repo has some of the dspi protocols documented
<MaxDemian>
Writing my own driver for this sounds interesting, but since Im so new, should I try doing somethinge else first?
<PaulFertser>
I'd say yes, getting and using a regular JTAG adapter should be fast and reasonable and then you can start to actually do what you want with that FPGA rather than spend time figuring details about JTAG.
<PaulFertser>
Depends on what you want and like more of course.
<PaulFertser>
I wouldn't be surprised if this utility can be tweaked a bit to just reflash SPI NOR flash on your board by using that "SPI configuration" mentioned in the board datasheet.
<MaxDemian>
with getboardtype() it returns:
<MaxDemian>
obp, which is the name of my device
<MaxDemian>
it was what digilent-adept returned, as well
<MaxDemian>
and I couldn't use adept either, since my lx9 wasnt among the supported boards
<PaulFertser>
MaxDemian: ok, so that's the protocol!
<PaulFertser>
So you probably do not need JTAG, you just need a way to change the NOR flash contents over SPI, right?
<MaxDemian>
what is nor flash content?
<PaulFertser>
MaxDemian: idk, isn't your target FPGA reading its whole configuration from external flash chip?
<MaxDemian>
yes
<MaxDemian>
so how can I use this protocol?
<PaulFertser>
Probably try using the same way it works on that ice board why not?
<MaxDemian>
I prob can't use the spi interface and do io in the same way; the apis are probably written differently
<PaulFertser>
Or probably not
<PaulFertser>
How do you tell?
<MaxDemian>
because digilent has their own api sheet
<PaulFertser>
You have documentation for this USB protocol?
<MaxDemian>
yeah its in the repo I sent above
<MaxDemian>
in the /docs/ foler theres DSPI.pdf
<PaulFertser>
MaxDemian: it doesn't even mention USB!
<MaxDemian>
so what does that mean?
<PaulFertser>
It means you telling weird things. I asked if you have docs for this USB protocol, you answer with a document that doesn't even mention USB. This makes no sense.
<MaxDemian>
sorry, I was talking about SPI
<MaxDemian>
but no, I guess the usb protocol is not documented. But I coulnd't send a bitstream through usb could I?
<PaulFertser>
If it's external flash IC then it's talking its own protocol documented in the datasheet for the flash.
<PaulFertser>
It's mostly the same for all SPI NOR flash devices.
<MaxDemian>
hey, got a chance to look at it; first run returns a protocol error: libiceblink.SPIProtocolError: Command SPISpeed failed with error: Resource not opened