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

STM32F411E-Discovery: st-util cant find any st-link/V2 devices #672

Closed
mahershaikh1 opened this issue Feb 21, 2018 · 8 comments
Closed

STM32F411E-Discovery: st-util cant find any st-link/V2 devices #672

mahershaikh1 opened this issue Feb 21, 2018 · 8 comments

Comments

@mahershaikh1
Copy link

Hi,

I am very new to a lot of what I have been working on so I will try to describe my problem as carefully as possible. I am using an STM32F411E-DISCO on a Mid 2012 Macbook pro with version 10.13.3 I just used homebrew with the command "brew install stlink" to get stlink.

When entering "st-util" into terminal, I get the error:
"WARN usb.c: Couldn't find any ST-Link/V2 devices"

Any ideas whats wrong?

Thanks

@xor-gate
Copy link
Member

xor-gate commented Feb 21, 2018

I must say I have not tested on latest macOS 10.13 myself. It did work before. Maybe there is some permission problem you could try to run it as root with: sudo st-info --probe.

@xor-gate
Copy link
Member

xor-gate commented Feb 21, 2018

Works for me with STM32 L1 discovery board (installed from homebrew latest stlink v1.5.0). I have no STM32F411E-DISCO, so unable to test the board.

jerry@Jerrys-iMac:[~]
 > sw_vers
ProductName:	Mac OS X
ProductVersion:	10.13.3
BuildVersion:	17D47
jerry@Jerrys-iMac:[~]
 > st-info --probe
Found 1 stlink programmers
 serial: 503f7206506752553329033f
openocd: "\x50\x3f\x72\x06\x50\x67\x52\x55\x33\x29\x03\x3f"
  flash: 262144 (pagesize: 256)
   sram: 32768
 chipid: 0x0427
  descr: L1 Medium-Plus-density device

@maxmunzel
Copy link

For me the homebrew install works just fine with macOS Mojave on a late 2017 MBP and a NUCLEO-F401RE board (also a F4/V2).

$st-util
st-util 1.5.1
2018-11-04T16:46:33 INFO common.c: Loading device parameters....
2018-11-04T16:46:33 INFO common.c: Device connected is: F4 device (Dynamic Efficency), id 0x10016433
2018-11-04T16:46:33 INFO common.c: SRAM size: 0x18000 bytes (96 KiB), Flash: 0x80000 bytes (512 KiB) in pages of 16384 bytes
2018-11-04T16:46:33 INFO gdb-server.c: Chip ID is 00000433, Core ID is  2ba01477.
2018-11-04T16:46:33 INFO gdb-server.c: Listening at *:4242...

image

@ghost
Copy link

ghost commented Dec 27, 2018

When I connect the ST-Link V2 on Mojave, I don't see the serial port. Must I do something for the serial port to show up?

Without a serial port, the st-info/st-util don't work...

@xor-gate
Copy link
Member

There is no such thing as a "normal serial port" on the programmers except for the v2-1 on some nucleo boards which have USB-serial. st-info --probe displays only output when a microcontroller is detected.

@ghost
Copy link

ghost commented Jan 2, 2019

Thx, I do see my St-Link V2 debugger using command:

st-info --probe

However, I don't see the information on the connected bluepill device:

Found 1 stlink programmers
serial: 533f7006483f49505128173f
openocd: "\x53\x3f\x70\x06\x48\x3f\x49\x50\x51\x28\x17\x3f"
flash: 0 (pagesize: 0)
sram: 0
chipid: 0x0000
descr: unknown device

Any clue why that would be?

@pan-mroku
Copy link

@Reinual I think your problem is different than OP. probe has found your programmer but can't get info (flash: 0, sram: 0, chipid: 0). I am having the same problem with some faulty program that uses DMA and I2C (haven't found which one is the culprit yet). In order to unlock it I use #705 (comment):

  1. Press reset button on the board and hold it
  2. openocd -f interface/stlink-v2-1.cfg -f target/stm32f4x.cfg -c "init; reset halt; stm32f4x unlock 0; reset halt; exit"
  3. When opencd starts waiting for target to halt release the button (you will notice a timeout when it waits)
  4. st-flash erase
    It will fail for the first time
  5. st-flash erase
    this will erase the program in flash and everything should get back to normal. As long as you don't program the same binary again of course. ;)

@Nightwalker-87 Nightwalker-87 added this to the General milestone Feb 19, 2020
@Nightwalker-87 Nightwalker-87 self-assigned this Feb 21, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: General, Feedback required Feb 21, 2020
@Nightwalker-87 Nightwalker-87 removed their assignment Mar 20, 2020
@Nightwalker-87 Nightwalker-87 changed the title st-util cant find any st-link/V2 devices [mac] st-util cant find any st-link/V2 devices Apr 5, 2020
@Nightwalker-87 Nightwalker-87 changed the title [mac] st-util cant find any st-link/V2 devices STM32F411E-Discovery: st-util cant find any st-link/V2 devices Apr 6, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: Feedback required, Resolved questions & general issues Apr 6, 2020
@Nightwalker-87
Copy link
Member

As shown by xor-gate and maxmunzel the original problem does obviously not appear to be related to the stlink toolset itself - one feedback addresses the same macOS version and the other a similar STM32F4 device. Thus it seems appropriate to close this issue as resolved now.

@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants