Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lmicdi hangs for a long time after "Calling handle_events()" #23

Open
thejpster opened this issue Aug 9, 2016 · 5 comments
Open

lmicdi hangs for a long time after "Calling handle_events()" #23

thejpster opened this issue Aug 9, 2016 · 5 comments

Comments

@thejpster
Copy link

This set-up used to work on earlier versions of Fedora (I can't remember as it was a while ago, but maybe F22 x64?). Now I'm on Fedora 24 x64 I seem to get a hang when connecting with GDB.

Running GDB:

$ arm-none-eabi-gdb ./target/lm4f120/release/bare-metal-arm-rust
GNU gdb (GDB) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/jonathan/Documents/programming/rust/bare-metal-arm-rust/target/lm4f120/release/bare-metal-arm-rust...(no debugging symbols found)...done.
(gdb) target remote :7777
Remote debugging using :7777
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...

Running lmicdi I get a very long pause, then libusb starts returning -6 (LIBUSB_ERROR_BUSY).

nDevs = 7
Considering device 0
Found device with matching VID and PID.  pDev = 0x74b2b0
iCfg = 0
        iIf = 0
                iAlt = 0
                Interface name (index 0, len = -2) = ''
        iIf = 1
                iAlt = 0
                Interface name (index 0, len = -2) = ''
        iIf = 2
                iAlt = 0
                Interface name (index 0, len = -2) = ''
                        iEndp = 0
                        Found ENDPOINT_IN
                        iEndp = 1
                        Found ENDPOINT_OUT
bind to port 7777
listen
accept...
doGdb: USB activity.  Calling handle_events()
<there's a very long pause here>
doGdb: USB activity.  Called handle_events() // I added this TRACE call
doGdb: Fd[1].revents = 0
doGdb: Fd[2].revents = 0
doGdb: Fd[3].revents = 0
doGdb: Fd[0].revents = 0
doGdb: Fd[1].revents = 0
doGdb: Fd[2].revents = 0
doGdb: socketFd.revents = 0x00000041
doGdb: recv returned 269
GDB_IDLE: '+'
GDB_IDLE: '$'
GDB_PAYLOAD: 'q' 0x71
GDB_PAYLOAD: 'S' 0x53
GDB_PAYLOAD: 'u' 0x75
GDB_PAYLOAD: 'p' 0x70
GDB_PAYLOAD: 'p' 0x70
GDB_PAYLOAD: 'o' 0x6f
GDB_PAYLOAD: 'r' 0x72
GDB_PAYLOAD: 't' 0x74
GDB_PAYLOAD: 'e' 0x65
GDB_PAYLOAD: 'd' 0x64
GDB_PAYLOAD: ':' 0x3a
GDB_PAYLOAD: 'm' 0x6d
GDB_PAYLOAD: 'u' 0x75
GDB_PAYLOAD: 'l' 0x6c
GDB_PAYLOAD: 't' 0x74
GDB_PAYLOAD: 'i' 0x69
GDB_PAYLOAD: 'p' 0x70
GDB_PAYLOAD: 'r' 0x72
GDB_PAYLOAD: 'o' 0x6f
GDB_PAYLOAD: 'c' 0x63
GDB_PAYLOAD: 'e' 0x65
GDB_PAYLOAD: 's' 0x73
GDB_PAYLOAD: 's' 0x73
GDB_PAYLOAD: '+' 0x2b
GDB_PAYLOAD: ';' 0x3b
GDB_PAYLOAD: 'q' 0x71
GDB_PAYLOAD: 'R' 0x52
GDB_PAYLOAD: 'e' 0x65
GDB_PAYLOAD: 'l' 0x6c
GDB_PAYLOAD: 'o' 0x6f
GDB_PAYLOAD: 'c' 0x63
GDB_PAYLOAD: 'I' 0x49
GDB_PAYLOAD: 'n' 0x6e
GDB_PAYLOAD: 's' 0x73
GDB_PAYLOAD: 'n' 0x6e
GDB_PAYLOAD: '+' 0x2b
GDB_PAYLOAD: '#' 0x23
GDB_CSUM1: '2'
GDB_CSUM2: 'a'
usbTxReq: '+$qSupported:multiprocess+;qRelocInsn+#2a'
usbTxReq: ...done
GDB_IDLE: '$'
GDB_PAYLOAD: 'q' 0x71
GDB_PAYLOAD: 'S' 0x53
GDB_PAYLOAD: 'u' 0x75
GDB_PAYLOAD: 'p' 0x70
GDB_PAYLOAD: 'p' 0x70
GDB_PAYLOAD: 'o' 0x6f
GDB_PAYLOAD: 'r' 0x72
GDB_PAYLOAD: 't' 0x74
GDB_PAYLOAD: 'e' 0x65
GDB_PAYLOAD: 'd' 0x64
GDB_PAYLOAD: ':' 0x3a
GDB_PAYLOAD: 'm' 0x6d
GDB_PAYLOAD: 'u' 0x75
GDB_PAYLOAD: 'l' 0x6c
GDB_PAYLOAD: 't' 0x74
GDB_PAYLOAD: 'i' 0x69
GDB_PAYLOAD: 'p' 0x70
GDB_PAYLOAD: 'r' 0x72
GDB_PAYLOAD: 'o' 0x6f
GDB_PAYLOAD: 'c' 0x63
GDB_PAYLOAD: 'e' 0x65
GDB_PAYLOAD: 's' 0x73
GDB_PAYLOAD: 's' 0x73
GDB_PAYLOAD: '+' 0x2b
GDB_PAYLOAD: ';' 0x3b
GDB_PAYLOAD: 'q' 0x71
GDB_PAYLOAD: 'R' 0x52
GDB_PAYLOAD: 'e' 0x65
GDB_PAYLOAD: 'l' 0x6c
GDB_PAYLOAD: 'o' 0x6f
GDB_PAYLOAD: 'c' 0x63
GDB_PAYLOAD: 'I' 0x49
GDB_PAYLOAD: 'n' 0x6e
GDB_PAYLOAD: 's' 0x73
GDB_PAYLOAD: 'n' 0x6e
GDB_PAYLOAD: '+' 0x2b
GDB_PAYLOAD: '#' 0x23
GDB_CSUM1: '2'
GDB_CSUM2: 'a'
usbTxReq: '$qSupported:multiprocess+;qRelocInsn+#2a'
usbTxReq: ERROR rc = -6
usbTxReq: ...done
@utzig
Copy link
Owner

utzig commented Aug 9, 2016

Hi, I have not used this in a long time! What is the libusb version you are using?

@thejpster
Copy link
Author

thejpster commented Aug 10, 2016

@ReeceStevens
Copy link

+1 on this issue. I'm running into a similar problem on OS X El Capitan using the Homebrew libusb installation (same version as @thejpster). I'm going to be working on solving this issue in the next couple of weeks since I have do some some work on a Tiva Launchpad for a class... If I figure out a solution, I'll make a pull request and you guys can try it out:)

@thejpster
Copy link
Author

thejpster commented Aug 26, 2016 via email

@ReeceStevens
Copy link

ReeceStevens commented Aug 26, 2016

@thejpster thank you so much for that recommendation! Worked out of the box for me too. I think I'll stick with OpenOCD for now:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants