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

Already on GitHub? Sign in to your account

second session on OSX fails without a power cycle #31

Closed
peabody124 opened this Issue Nov 23, 2011 · 2 comments

Comments

Projects
None yet
2 participants

peabody124 commented Nov 23, 2011 edited by xor-gate

Connecting to an F4 discovery board with st-util works perfectly the first time. However, after exiting with ctrl-c and running again I get errors from libusb. Here is a verbose log from the two executions:

$ ./gdbserver/st-util -v99
2011-11-23T11:41:02 DEBUG src/stlink-common.c: stlink current mode: dfu
2011-11-23T11:41:02 INFO src/stlink-usb.c: -- exit_dfu_mode
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_exit_dfu_mode ***
2011-11-23T11:41:02 DEBUG src/stlink-common.c: stlink current mode: mass
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_enter_swd_mode ***
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** looking up stlink version
2011-11-23T11:41:02 DEBUG src/stlink-common.c: st vid         = 0x0483 (expect 0x0483)
2011-11-23T11:41:02 DEBUG src/stlink-common.c: stlink pid     = 0x3748
2011-11-23T11:41:02 DEBUG src/stlink-common.c: stlink version = 0x2
2011-11-23T11:41:02 DEBUG src/stlink-common.c: jtag version   = 0xe
2011-11-23T11:41:02 DEBUG src/stlink-common.c: swim version   = 0x0
2011-11-23T11:41:02 DEBUG src/stlink-common.c:     notice: the firmware doesn't support a swim interface
2011-11-23T11:41:02 INFO src/stlink-common.c: Loading device parameters....
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_core_id ***
2011-11-23T11:41:02 DEBUG src/stlink-common.c: core_id = 0x00000000
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_read_mem32 ***
2011-11-23T11:41:02 WARN src/stlink-common.c: unknown chip id! 0
Chip ID is 00000000, Core ID is  00000000.
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_force_debug_mode ***
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_reset ***
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe0002000
KARL - should read back as 0x03, not 60 02 00 00
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_read_mem32 ***
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe0002008
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe000200c
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe0002010
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe0002014
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe0002018
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe000201c
init watchpoints
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_read_mem32 ***
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe000edfc
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe0001028
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe0001038
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe0001048
2011-11-23T11:41:02 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe0001058
Listening at *:4242...
^C
$ ./gdbserver/st-util -v99
libusb_handle_events() timeout
[!] send_recv
2011-11-23T11:41:14 DEBUG src/stlink-common.c: stlink mode: unknown!
libusb_handle_events() timeout
[!] send_recv
2011-11-23T11:41:17 DEBUG src/stlink-common.c: stlink mode: unknown!
2011-11-23T11:41:17 DEBUG src/stlink-common.c: *** stlink_enter_swd_mode ***
2011-11-23T11:41:17 DEBUG src/stlink-common.c: *** looking up stlink version
libusb_submit_transfer(-9)
[!] send_recv
2011-11-23T11:41:17 DEBUG src/stlink-common.c: st vid         = 0x0000 (expect 0x0483)
2011-11-23T11:41:17 DEBUG src/stlink-common.c: stlink pid     = 0x0000
2011-11-23T11:41:17 DEBUG src/stlink-common.c: stlink version = 0x2
2011-11-23T11:41:17 DEBUG src/stlink-common.c: jtag version   = 0xe
2011-11-23T11:41:17 DEBUG src/stlink-common.c: swim version   = 0x0
2011-11-23T11:41:17 DEBUG src/stlink-common.c:     notice: the firmware doesn't support a swim interface
2011-11-23T11:41:17 INFO src/stlink-common.c: Loading device parameters....
2011-11-23T11:41:17 DEBUG src/stlink-common.c: *** stlink_core_id ***
libusb_submit_transfer(-9)
[!] send_recv
2011-11-23T11:41:17 DEBUG src/stlink-common.c: core_id = 0x00000000
2011-11-23T11:41:17 DEBUG src/stlink-common.c: *** stlink_read_mem32 ***
libusb_handle_events() timeout
[!] send_recv
2011-11-23T11:41:20 WARN src/stlink-common.c: unknown chip id! 0x8023
Chip ID is 00008023, Core ID is  00000000.
2011-11-23T11:41:20 DEBUG src/stlink-common.c: *** stlink_force_debug_mode ***
libusb_handle_events() timeout
[!] send_recv
2011-11-23T11:41:23 DEBUG src/stlink-common.c: *** stlink_reset ***
libusb_handle_events() timeout
[!] send_recv
2011-11-23T11:41:26 DEBUG src/stlink-common.c: *** stlink_write_mem32 4 bytes to 0xe0002000

Ok - and per suggestion from karlp I realized that if you exit from gdb then it runs through _stlink_usb_close but not if you just ctrl-c. In the former case I can run st-util without power cycling.

@xor-gate xor-gate added the os/mac-osx label May 3, 2016

Collaborator

xor-gate commented May 14, 2016

As this issue is approximate 5 years I'm closing this in favor of the new v1.2.0 release of stlink library and tools. Feel free to open a new issue when the problem still remains.

@xor-gate xor-gate closed this May 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment