Coder Social home page Coder Social logo

Comments (7)

JayToltTech avatar JayToltTech commented on September 3, 2024

Was going to uninstall hidapi from brew in case that was coming down as an Intel binary, but I noticed that open-ocd has this same dependency and it's working fine from my M1 Macbook, so the problem doesn't seem to be with hidapi being the wrong binary.

from edbg.

ataradov avatar ataradov commented on September 3, 2024

I have no way of debugging this. If you feel like it, you can put print statements along the way to see where it fails specifically. May be we can figure out something based on this information. But otherwise there is nothing I can do.

from edbg.

JayToltTech avatar JayToltTech commented on September 3, 2024

Thank you for the amazingly prompt response. Went in to start doing this and...was working fine.

Uh, "have you tried turning it off and turning it back on again?" All I can figure is a reboot whacked things in just the right way.

from edbg.

JayToltTech avatar JayToltTech commented on September 3, 2024

Hmm, started to reproduce again. Using print statements, I've sussed out that dbg_open is failing the if (!handle) check and then when perror_exit calls into disconnect_debugger -> dap_led -> dbg_dap_cmd -> hid_write that's what triggers seg_fault, I assume because handle was never set and so hid_write is going boink.

from edbg.

JayToltTech avatar JayToltTech commented on September 3, 2024

OK, root cause. If I'm simultaneously running openocd, then the device is busy and the dbg_open call fails, and as part of its failure path it tries writing to the invalid hid handle and segfaults.

edbg --list works and edbg -t list works while openocd has the device open, but edbg -t %device% fails, so to a noob like me it's a little mysterious.

from edbg.

ataradov avatar ataradov commented on September 3, 2024

Should be fixed now. All those errors appeared after I tried to be nice and close the connection correctly.

Ideally individual OS drivers would track this and not execute commands if debugger is not open, but for not a global flag would do.

from edbg.

JayToltTech avatar JayToltTech commented on September 3, 2024

Confirmed that I now receive "unable to open device: No such file or directory" when I reproduce the 'device in use by openocd' error condition.

Thank you.

from edbg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.