whitequark[cis] changed the topic of #glasgow to: https://glasgow-embedded.org · digital interface explorer · https://www.crowdsupply.com/1bitsquared/glasgow · meetings Saturday 2200 UTC · code https://github.com/GlasgowEmbedded/glasgow · logs https://libera.irclog.whitequark.org/glasgow · matrix #glasgow-interface-explorer:matrix.org · discord https://1bitsquared.com/pages/chat
ar-jan has quit [Ping timeout: 256 seconds]
jstein has quit [Ping timeout: 252 seconds]
jn_ has joined #glasgow
jn_ has joined #glasgow
jn has quit [Ping timeout: 276 seconds]
redstarcomrade has joined #glasgow
redstarcomrade has quit [Changing host]
redstarcomrade has joined #glasgow
lxdr5 has joined #glasgow
pie_ has quit [Remote host closed the connection]
lxdr has quit [Ping timeout: 276 seconds]
pie_ has joined #glasgow
FireFly has quit [Ping timeout: 245 seconds]
davidc__ has quit [Remote host closed the connection]
FireFly has joined #glasgow
davidc__ has joined #glasgow
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #glasgow
skipwich has quit [Quit: DISCONNECT]
skipwich has joined #glasgow
redstarcomrade has quit [Read error: Connection reset by peer]
Wanda[cis] has quit [Quit: Idle timeout reached: 172800s]
<_whitenotifier-3> [glasgow] neuschaefer opened issue #511: JEDEC manufacturer lookup fails for bank 15 - https://github.com/GlasgowEmbedded/glasgow/issues/511
joerg has quit [Ping timeout: 264 seconds]
joerg has joined #glasgow
<_whitenotifier> [glasgow] wanda-phi opened pull request #512: database.jedec: fix lookup for unknown banks. - https://github.com/GlasgowEmbedded/glasgow/pull/512
<_whitenotifier-3> [glasgow] wanda-phi synchronize pull request #512: database.jedec: fix lookup for unknown banks. - https://github.com/GlasgowEmbedded/glasgow/pull/512
<_whitenotifier-3> [glasgow] wanda-phi commented on issue #511: jtag-probe: JEDEC manufacturer lookup fails for bank 15 - https://github.com/GlasgowEmbedded/glasgow/issues/511#issuecomment-1890335895
notgull has joined #glasgow
<_whitenotifier-3> [glasgow] wanda-phi commented on issue #511: jtag-probe: JEDEC manufacturer lookup fails for bank 15 - https://github.com/GlasgowEmbedded/glasgow/issues/511#issuecomment-1890338036
<_whitenotifier> [glasgow] wanda-phi opened pull request #513: database.jedec: bump to JEP106BI - https://github.com/GlasgowEmbedded/glasgow/pull/513
<_whitenotifier-3> [glasgow] neuschaefer commented on issue #511: jtag-probe: JEDEC manufacturer lookup fails for bank 15 - https://github.com/GlasgowEmbedded/glasgow/issues/511#issuecomment-1890339644
Wanda[cis] has joined #glasgow
<Wanda[cis]> huh. they're about to run out of JTAG manufacturer IDs, aren't they
<whitequark[cis]> little bit
notgull has quit [Ping timeout: 256 seconds]
<_whitenotifier> [glasgow] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-512-417b06ab30204acfe53faecc18fbf96ec263e299 - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] wanda-phi closed pull request #512: database.jedec: fix lookup for unknown banks. - https://github.com/GlasgowEmbedded/glasgow/pull/512
<_whitenotifier> [GlasgowEmbedded/glasgow] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/417b06ab3020...a2a46d2278f2
<_whitenotifier> [glasgow] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-512-417b06ab30204acfe53faecc18fbf96ec263e299 - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier> [glasgow] wanda-phi closed issue #511: jtag-probe: JEDEC manufacturer lookup fails for bank 15 - https://github.com/GlasgowEmbedded/glasgow/issues/511
<_whitenotifier> [glasgow] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-513-a2a46d2278f2b7c33e95d22590efd3f87483a89b - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [GlasgowEmbedded/glasgow] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/a2a46d2278f2...f49ff364f6a2
<_whitenotifier> [GlasgowEmbedded/glasgow] wanda-phi f49ff36 - database.jedec: bump to JEP106BI
<_whitenotifier> [glasgow] wanda-phi closed pull request #513: database.jedec: bump to JEP106BI - https://github.com/GlasgowEmbedded/glasgow/pull/513
<_whitenotifier> [glasgow] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-513-a2a46d2278f2b7c33e95d22590efd3f87483a89b - https://github.com/GlasgowEmbedded/glasgow
notgull has joined #glasgow
bvernoux has joined #glasgow
notgull has quit [Ping timeout: 260 seconds]
notgull has joined #glasgow
<_whitenotifier-3> [glasgow] purdeaandrei synchronize pull request #507: Improvements for mec16xx - https://github.com/GlasgowEmbedded/glasgow/pull/507
notgull has quit [Ping timeout: 264 seconds]
ar-jan has joined #glasgow
K900 has quit [Quit: Idle timeout reached: 172800s]
purdeaandrei[m] has joined #glasgow
<purdeaandrei[m]> where should I look for any potential teardown actions performed by glasgow? I am seeing something weird:
<purdeaandrei[m]> I'm trying to implement an emergency erase jtag sequence on mec16xx
<purdeaandrei[m]> 1) if I do a certain sequence of steps, then I return from interact(), then I power cycle, I can see my erase was successful
<purdeaandrei[m]> 2) If I put an infinite loop before that return, and I power cycle, then kill glasgow, then the erase is NOT successful
<purdeaandrei[m]> 3) If I put an infinite loop before that return, and I hit the emergency stop button on the glasgow, then I power cycle my taget, then erase is still NOT successful
<purdeaandrei[m]> I hacked JTAGProbeInterface in the case of 1) to print everything with logging.INFO level, but after the return nothing is printed
<purdeaandrei[m]> So in short there must be an extra action that allows the erase to complete, but I have no idea where it is and what it is 🙂
<purdeaandrei[m]> 4) If I ctrl-c that infinite loop before power cycle, then erase completes successfully
<purdeaandrei[m]> 5) if I ctrl-\ that infinite loop before power cycle, then erase fails
<purdeaandrei[m]> must be something within a finally block or something like that
<Wanda[cis]> huh.
<Wanda[cis]> could be something more obscure like some destructor within libusb
<purdeaandrei[m]> you mean like something registered by atexit()?
<Wanda[cis]> that, or something called from a Python object destructor
<purdeaandrei[m]> it's not in atexit() (if I put the infinite loop at the end of _main()'s finally, then it succeeds)
<purdeaandrei[m]> it's not device.close() which is called in _main()'s finally, because if I put the infinite loop before it, it still succeeds
<galibert[m]> I've noticed recently that infinite loops are hard in C/C++
benny2366[m] has joined #glasgow
<benny2366[m]> while(true){
<benny2366[m]> }
<benny2366[m]> i mean ok that was hard XP
<galibert[m]> And what do you think this compiles to with say clang? Not at all what you expect
<Wanda[cis]> good thing this is a C-specific problem and doesn't affect other languages, such as Rust
<Wanda[cis]> oh wait.
<benny2366[m]> never used rust tbh
<galibert[m]> In my case it was jumping in the next method iirc
<purdeaandrei[m]> compiler bug?
<Wanda[cis]> no.
<Wanda[cis]> it just happens to be UB according to C standard.
<galibert[m]> Nope, infinite loops are UB
<Wanda[cis]> and compilers happily exploit it
<Wanda[cis]> and "infinite loops are considered UB" was deeply ingrained into LLVM because of clang, affecting Rust as well
<Wanda[cis]> it was a longstanding bug that took ages to fix
<Wanda[cis]> (and probably other languages with LLVM-based compilers too)
<galibert[m]> Had to do a while(v); where v was a extern volatile bool set in a different translation unit (and I'm not using lto)
<purdeaandrei[m]> any best place where I can read up on this?
<purdeaandrei[m]> @galibert: does a: goto a; behave the same?
<Wanda[cis]> yes
<Wanda[cis]> the thing that is UB is to hang indefinitely without doing a side effect
<Wanda[cis]> ie. volatile int a; while (1) a++; is fine; int a; while (1) a++; is UB
<Wanda[cis]> er, I don't think it was called "side effect"
<Wanda[cis]> visible effect? idk
<Wanda[cis]> https://github.com/rust-lang/rust/issues/28728 this is the relevant Rust issue btw
<Wanda[cis]> note the time elapsed between filing and closing
<Wanda[cis]> it was a long saga
<purdeaandrei[m]> my extra action is somewhere in device.demultiplexer.flush()
<Wanda[cis]> oh.
<Wanda[cis]> yeah
<Wanda[cis]> you may want to add await iface.flush()
<_whitenotifier-3> [glasgow] neuschaefer commented on pull request #506: applet.interface.spi_serprog: New applet that implements the Flashrom Serprog protocol - https://github.com/GlasgowEmbedded/glasgow/pull/506#issuecomment-1890555134
<purdeaandrei[m]> @Wanda so then the explanation would be that my last `await self.lower.lower.write_dr()` command wasn't really sent to the gasgow because it didn't return anything, right?
<Wanda[cis]> mhm
<Wanda[cis]> it was just queued up in som ebuffer
<Wanda[cis]> s/som/some/, s/ebuffer/buffer/
<purdeaandrei[m]> what's the right thing to call in the mec16xx program applet?
<purdeaandrei[m]> await self.lower.lower.lower.flush() ?
<Wanda[cis]> hmmm
<Wanda[cis]> do you need that many lowers?
<purdeaandrei[m]> there's no flush() in any of the other objects
altracer[m] has joined #glasgow
<altracer[m]> Hello fellow EE! This looks like a NXP LPC11U36F/401, if I'm reading the chip markings right, and Blackmagic Debug supports flash operations https://github.com/blackmagic-debug/blackmagic/blob/main/src%2Ftarget%2Flpc11xx.c#L255
<altracer[m]> The small pinout could be figured out by staring at two-sided PCB traces long enough, or with a DMM in continuity mode -- there's no buffers or other shenanigans
<Wanda[cis]> hmmm. fair enough
<Wanda[cis]> I think we may want to add a flush() to TAPInterface, making it one fewer .lower
<altracer[m]> TP5 looks like it may be either VTref or ground; the others are a combination of Cortex-M SWD standard wires of SWDIO, SWCLK, Reset, Gnd/Vtref. I don't think a mouse would get full JTAG or at least SWO trace capture pin.
<Wanda[cis]> I have some of my own additions to that class queued up, too
<purdeaandrei[m]> I already started making that change, but do you prefer I don't make it, so we don't end up with merge conflicts?
<Wanda[cis]> nah, do it
<Wanda[cis]> just make it its own PR
<Wanda[cis]> mine will take a while
<purdeaandrei[m]> @Cathrine do you remember which exact MEC16xx the applet was originally tested with? I'm curious if I can reproduce the problem that caused the need for the non-burst `read_flash()` code. With the mec1633 I have not seen a single warning notifying me of a read glitch so far. (I did see that warning printed, but only in REPL mode when I forgot to call `enable_flash_access()`
<purdeaandrei[m]> On another note I don't thing emergency erase ever really worked correctly in the past, on the different MEC either. It looks like the documentation is contradicting itself when it comes to the polarity of the VTR_POR bit. The mass erase sequence describes it wrong, while the register description is correct. And the contradiction seems to be the same way with other MEC datasheets to (e.g. MEC1609i).
hackwithanders[m has joined #glasgow
<hackwithanders[m> hello guys
<hackwithanders[m> i am a hacking expert and i can teach hacking real hacking for you with a much lower price than the online courses, plus practice and supprt and i will guide you through all your road to ethical hacking journey thank you.
hackwithanders[m has left #glasgow [#glasgow]
TriCento has joined #glasgow
jstein has joined #glasgow
redstarcomrade has joined #glasgow
TriCento has quit [Ping timeout: 256 seconds]
redstarcomrade has quit [Read error: Connection reset by peer]
TriCento has joined #glasgow
TriCento has quit [Client Quit]
FFY00_ has quit [Read error: Connection reset by peer]
cr1901_ is now known as cr1901
bvernoux has quit [Read error: Connection reset by peer]
<whitequark[cis]> <purdeaandrei[m]> "@Cathrine do you remember..." <- hell if i know. it was so long ago
<whitequark[cis]> do the commit messages not spill any information about it? or the docs imported into the archive?
redstarcomrade has joined #glasgow
redstarcomrade has quit [Changing host]
redstarcomrade has joined #glasgow