NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
sugarbeet has quit [Ping timeout: 260 seconds]
sugarbeet has joined #openocd
dreamcat4 has quit [Quit: Connection closed for inactivity]
Gissio has joined #openocd
Gissio has quit [Client Quit]
marex has quit [Ping timeout: 246 seconds]
defiant has quit [Ping timeout: 268 seconds]
marex has joined #openocd
electricworry has quit [Ping timeout: 255 seconds]
nerozero has joined #openocd
MGF_Fabio has joined #openocd
MGF_Fabio has quit [Ping timeout: 272 seconds]
dreamcat4 has joined #openocd
bvernoux has joined #openocd
slobodan has joined #openocd
wingsorc has quit [Ping timeout: 240 seconds]
MGF_Fabio has joined #openocd
joconor has quit [Quit: ZNC 1.8.2 - https://znc.in]
joconor has joined #openocd
Haohmaru has joined #openocd
Hawk777 has joined #openocd
Haohmaru has quit [Quit: saionara]
gzlb has quit [Ping timeout: 260 seconds]
gzlb has joined #openocd
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> here's the whole dump: JTAG Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 16 idVendor 0x1443 Digilent idProduct 0x0007 Development board JTAG bcdDevice 0.00 iManufacturer 1 Digilent iProduct 2 Digilent Adept USB Device iSerial 0 bNumConfigurations 1 Configuration
<MaxDemian> Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x002e bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 4 bInterfaceClass 0 bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint
<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> sorry
<PaulFertser> MaxDemian: are you sure you do not have any other thing plugged in the same computer? Because this VID:PID match what cheap iCE boards used: https://github.com/davidcarne/iceBurn/blob/master/iCEburn/libiceblink.py#L296
<PaulFertser> MaxDemian: where did you get that adapter from and what does it look like?
<MaxDemian> it was with my lx9 package; it is a gray usb cord https://devicehunt.com/view/type/usb/vendor/1443
<MaxDemian> it came alone with a silicon labs UART interface, which let me run some avnet programs to test the device through serial
EmilSinclair has joined #openocd
<PaulFertser> MaxDemian: do you mean it's part of lx9 board or a separate device?
<EmilSinclair> Oh, its another cable
<PaulFertser> EmilSinclair: try copying digilent-hs1.cfg and changing VID:PID to 1443:0007 there and see what OpenOCD can tell with that config.
<MaxDemian> I'll try, but It's not an hs1 cable
<PaulFertser> MaxDemian: can you see what's inside the cable you have?
<EmilSinclair> /nick MaxDemian
MaxDemian has quit [Quit: Client closed]
EmilSinclair is now known as MaxDemian
<MaxDemian> Could you clarify?
<PaulFertser> MaxDemian: there must be some physical thing, a chip that USB lines are connected to directly. Can you see it (visually observe)?
<MaxDemian> no, its just a M-F adapter
<PaulFertser> To what type of connector?
<MaxDemian> USB male on both ends, to a usb bus
<MaxDemian> so usb-jtag
<PaulFertser> Is this the board ?
<MaxDemian> yes
<PaulFertser> MaxDemian: this PDF says the JTAG adapter is integrated, part of the board, implemented as firmware in AT90USB MCU.
<PaulFertser> MaxDemian: it also mentions Digilent HS1
<PaulFertser> Who knows what protocol exactly that AT90 firmware implements, probably it's compatible with FTDI MPSSE, worth a try.
<MaxDemian> So it's using hs1?
PaulFertser has quit [Ping timeout: 268 seconds]
PaulFertser has joined #openocd
<MaxDemian> no, even after running sudo openocd -f digilent-hs1.cfg, Im getting the following:
<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.
<PaulFertser> BTW, it's worth checking if https://github.com/davidcarne/iceBurn can talk meaningfully to this adapter.
<PaulFertser> Because if it can then the protocol is semi-researched already.
<MaxDemian> I did some reverse engineering on some of the digilent protocols, https://github.com/AlexWillisson/soc/tree/master/digilent.adept.sdk_2.0.1
<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'd try that https://github.com/davidcarne/iceBurn just for the kicks, to see if it's matching anything at all.
<PaulFertser> MaxDemian: actually endpoint numbers match
<MaxDemian> for what? I had to use 1
<PaulFertser> it would be interesting what it returns for get_board_type there
<PaulFertser> MaxDemian: USB endpoinds mentioned in https://github.com/davidcarne/iceBurn/blob/master/iCEburn/libiceblink.py match your lsusb paste.
<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
<MaxDemian> but I couldn't send a bitstream through this usb protocol, could I? even if there's jtag in the firmware
MaxDemian has quit [Quit: WeeChat 3.5]
wingsorc has joined #openocd