whitequark changed the topic of #glasgow to: glasgow debug tool · code https://github.com/GlasgowEmbedded/Glasgow · logs https://freenode.irclog.whitequark.org/glasgow
miek has quit [Ping timeout: 252 seconds]
miek has joined #glasgow
<whitequark> marcan: ack
ghjkghjk8907 has joined #glasgow
ghjkghjk8907 has quit [Remote host closed the connection]
gregdavill has joined #glasgow
pie_ has quit [Quit: pie_]
Javantea has quit [Ping timeout: 258 seconds]
Javantea has joined #glasgow
nara has joined #glasgow
nagi has quit [Ping timeout: 258 seconds]
_whitelogger has joined #glasgow
<whitequark> tnt: hey, looking at spy-bi-wire
<whitequark> I'm curious, does the MSP430F1612 on the devkit have the JTAG fuse blown?
<tnt> whitequark: oh nice:) Did you get one of those launchpad ?
<whitequark> all DRs appear to be BYPASS
<whitequark> yes... via some unusually shady means
<tnt> You mean the msp that's used as the 'programmer' ? No idea, I never looked at it, but that wouldn't surprise me.
<whitequark> that seems overly paranoid
<whitequark> I'm wondering if I'm just driving it wrong
<whitequark> it looks like there's no IDCODE register even
<whitequark> hm, right, it *doesn't* have an IDCODE
<whitequark> what a strange chip
<tnt> yeah, seems a bit paranoid especially since you can download firmware updates for it :/
<whitequark> I might be still not driving it correctly
<whitequark> it has some weird "fuse check sequence"
<tnt> Ah yea, they can have a 'password' IIRC.
<whitequark> no, different thing
<whitequark> a fuse check sequence is some weird sequence on TMS/TDI that you need to clock in so that it actually recognizes the fuse is blown (or not)
<whitequark> and it can fail, with the chip misinterpreting an intact fuse as blown
<whitequark> shit design imo
<tnt> wtf
<whitequark> i couldn't get 4-wire JTAG to work on the DUT either.
<whitequark> not really a fan of msp430 now
<tnt> which target device is it ?
<tnt> I've never actually used 4 wire jtag on any msp430 tbh, I only ever used the 2 wire mode.
<whitequark> M430G2553
ronyrus has quit [Quit: %me%]
ronyrus has joined #glasgow
<tnt> mmm, you need to enable it somehow ? switch it to 4w mode ?
<whitequark> I think I am switching it
<whitequark> but it doesn't work
<whitequark> shrug
<tnt> Ah yeah, that's what the 'TEST' pin is for apparently.
<whitequark> yeah
<whitequark> i really don't like this chip :/
<whitequark> ah well
<tnt> I never had any issues with them, but I always used the official TI FET :p
<whitequark> i'm sure i can make it work reliably
<whitequark> that doesn't mean i have to like it
<tnt> hehe
<tnt> Maybe the 'note' at the bottom of the page helps http://processors.wiki.ti.com/index.php/JTAG_(MSP430) ?
<tnt> ( "Note on Devices with TEST pins " )
<whitequark> i've read slau320 in full many times
<whitequark> though the way i drive TEST is a bit hacky
<whitequark> so that might still be the reason, yes
<whitequark> bottom line: i couldn't make it work yet
<whitequark> tnt: that said... SBW fits really well as an extension of the JTAG applet
<whitequark> with some small modifications that I might reuse if I ever get around to adding RTCK support
<gregdavill> I have one of the MSP430-FETs So I could try poking at some MSP430 chips in JTAG mode and give you some logic dumps.
<whitequark> it's probably fine for now
<tnt> whitequark: yeah, having a quick look at it when I opened the issue and it seemed it was really jus tserializing the normal jtag, so I figured it'd just be a layer above the normal jtag applet that just simulated its io buffer.
<whitequark> more or less... clocking adds some complexoty
<whitequark> complexity*
gregdavill has quit [Ping timeout: 250 seconds]
<marcan> whitequark: msp430 is hilarious
<marcan> it can only be used as the first device in a chain
<marcan> because it requires a clock on TDI to program
<marcan> yes on TDI
<marcan> (which isn't passed through combinatorially through a chain)
* marcan wrote an msp430 programmer thing in a past life
<marcan> I should have a FET and some chips lying around
<whitequark> marcan: yes, i noticed that
<whitequark> it looks like they fixed it in later chips?
<whitequark> ... sort of
<marcan> oh they finally have an internal clock now?
<whitequark> it looks like they do, but i haven't read very closely into it
<whitequark> their jtag still seems hilaribad
<marcan> yup
<marcan> IIRC you program them by streaming instructions into their CPU core
<whitequark> oh, so like MIPS
<whitequark> great.
<whitequark> i fucking *hate* that.
<whitequark> it's also extremely slow with glasgow cuz of all the USB roundtrips.
<whitequark> this is why i designed boneless, to stick a core that would generate all of that shite on the FPGA
<marcan> can't just use a dumb state machine?
<whitequark> they get *huuuuge8
<marcan> when I wrote all this shit one of the things I had was a protocol where you could do things like "AND/OR/XOR reg, wait for bit" and just stream that crap via USB
<whitequark> especially given that yosys' frontend is kind of shit
<marcan> so I'd avoid the round trips
<whitequark> that's half a cpu already
<marcan> yeah, but streaming
<marcan> so no real loops
<marcan> just self contained waits
<whitequark> that's why i said *half*
<marcan> :p
<whitequark> and you want something more complex for MIPS anyway
<whitequark> or probably for *debug* of msp430
<whitequark> since you want to load all the registers and so on
<marcan> fun fact: I wrote that state machine to speed that POS up on my last day at that company
<marcan> (it was a summer job)
<marcan> (first job too)
<whitequark> ha
<whitequark> hm, looks like i refactored the JTAG applet sufficient
<whitequark> ly. let's try it on a router
<whitequark> I: g.applet.debug.mips: found CPU with IMPCODE=0x00800904
<whitequark> I: g.applet.debug.mips: found MIPS32 CPU 0x82 (EJTAG version 1.x/2.0)
<whitequark> W: g.applet.debug.mips: found cursed EJTAG 1.x/2.0 CPU, using undocumented DCR.MP bit to enable PrAcc
<whitequark> I: g.applet.debug.mips: target is a MIPS32 R1 big endian CPU with standard TLB MMU
<whitequark> yep gonna say it works
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+0/-0/±2] https://git.io/fj9G2
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark b88b7b1 - applet.interface.jtag_probe: refactor to support other transports.
<whitequark> I like how it ended up
<whitequark> might later separate a sequencer off Driver, so that it could be driven by a CPU or other FSM
<whitequark> or something like that
gregdavill has joined #glasgow
<gruetzkopf> depending on when i finish work today i'm gonna try a cursed (mips-based) raid soc today or tomorrow
<whitequark> oh cool
<whitequark> is it little endian or big endian
<gruetzkopf> that's a great question, according to the block diagram (which is the only thing i have) it's a mips64 5Kc
<gruetzkopf> vitesse VSC7250
<whitequark> i mean... that could be either LE or EB.
<whitequark> tnt: poke
<whitequark> tnt: I: g.applet.interface.sbw_probe: found MSP430 core with JTAG ID 0x91
<whitequark> MSP430 debugger left as exercise to the reader.
<_whitenotifier-3> [GlasgowEmbedded/Glasgow-Archive] whitequark pushed 1 commit to master [+1/-0/±0] https://git.io/fj9nl
<_whitenotifier-3> [GlasgowEmbedded/Glasgow-Archive] whitequark 0245d92 - Add G00038
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark pushed 2 commits to master [+1/-0/±4] https://git.io/fj9n8
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark e008803 - applet.interface.jtag_probe: allow specifying TDI for shift_tms.
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark b8889ce - applet.interface.spy_bi_wire: new applet.
<_whitenotifier-3> [Glasgow] whitequark closed issue #143: Spy-Bi-Wire support - https://git.io/fjRva
<tnt> whitequark: oh, nice !
<tnt> thx !
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/fj9cJ
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark dd6ee64 - applet.interface.sbw_probe: remove unnecessary TMS setup delay.
ali-as has joined #glasgow
pie_ has joined #glasgow
gregdavill has quit [Ping timeout: 250 seconds]
pie_ has quit [Ping timeout: 252 seconds]
pie_ has joined #glasgow
englishm has quit [Excess Flood]
englishm has joined #glasgow
gregdavill has joined #glasgow
gregdavill has quit [Ping timeout: 245 seconds]
flammit_ has joined #glasgow
yuriks_ has joined #glasgow
whitequa1k has joined #glasgow
flammit has quit [*.net *.split]
yuriks has quit [*.net *.split]
whitequark has quit [*.net *.split]
flammit_ is now known as flammit
yuriks_ is now known as yuriks