stlink: [macOS] ST-Link-v1 driver issues / libusb problems

Unable to build driver on macOS Sierra 10.12.3

Output:

OS X version not supported.
make: *** [osx_stlink_shield] Error 1

Expected/description: Tried building with Yosemite and El Capitan configurations as in driver readme, none seem to work.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I’m seems OK with OS X 10.13.6.

I’ve done csrutil disable in recovery mode, booted back to normal.

I took 10.10 kext and moved it to /System/Library/Extensions.

When I load it I see everything’s okay: $ sudo kextload -v /System/Library/Extensions/stlink_shield10_10.kext

Requesting load of /System/Library/Extensions/stlink_shield10_10.kext.
/System/Library/Extensions/stlink_shield10_10.kext loaded successfully (or already loaded).

And then $ sudo touch /System/Library/Extensions

And then got this below (you must rebuild st-link yourself, my build version is 1.4.0-47-gae717b9): $ ./build/Release/src/gdbserver/st-util -1

2018-09-06T15:22:32 WARN sg.c: Your stlink got into a real weird configuration, trying to fix it!
2018-09-06T15:22:32 INFO common.c: Loading device parameters....
2018-09-06T15:22:32 INFO common.c: Device connected is: F1 High-density device, id 0x10036414
2018-09-06T15:22:32 INFO common.c: SRAM size: 0x10000 bytes (64 KiB), Flash: 0x80000 bytes (512 KiB) in pages of 2048 bytes
2018-09-06T15:22:32 INFO sg.c: Successfully opened a stlink v1 debugger
2018-09-06T15:22:32 INFO gdb-server.c: Chip ID is 00000414, Core ID is  1ba01477.
2018-09-06T15:22:32 INFO gdb-server.c: Listening at *:4242...

some extra tests: $ ./build/Release/st-flash write XXX.bin 0x8000000

st-flash 1.4.0-47-gae717b9
2018-09-06T15:45:39 INFO common.c: Loading device parameters....
2018-09-06T15:45:39 INFO common.c: Device connected is: F1 High-density device, id 0x10036414
2018-09-06T15:45:39 INFO common.c: SRAM size: 0x10000 bytes (64 KiB), Flash: 0x80000 bytes (512 KiB) in pages of 2048 bytes
2018-09-06T15:45:39 INFO common.c: Attempting to write 62032 (0xf250) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x0800f000 erased
2018-09-06T15:45:40 INFO common.c: Finished erasing 31 pages of 2048 (0x800) bytes
2018-09-06T15:45:40 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2018-09-06T15:45:40 INFO flash_loader.c: Successfully loaded flash loader in sram
 31/31 pages written
2018-09-06T15:45:43 INFO common.c: Starting verification of write complete
2018-09-06T15:45:44 INFO common.c: Flash written and verified! jolly good!

and my st-link is v1:

        STM32 Mass Storage:

          Product ID: 0x3744
          Vendor ID: 0x0483  (STMicroelectronics)
          Version: 1.00
          Serial Number: 000000000001
          Speed: Up to 12 Mb/sec
          Manufacturer: STMicroelectronics
          Location ID: 0x14200000 / 7
          Current Available (mA): 500
          Current Required (mA): 100
          Extra Operating Current (mA): 0

$ lsusb

Bus 020 Device 005: ID 05ac:8290 Apple Inc. Bluetooth USB Host Controller
Bus 020 Device 007: ID 0483:3744 STMicroelectronics STM32 Mass Storage  Serial: 000000000001
Bus 000 Device 001: ID 1d6b:IWPT Linux Foundation USB 3.0 Bus

Hi @amok its not a problem to discus here which probably could cause the problem.