-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated xcode project settings v11.3.1 - Removed support for 10.6-10.12 - Compiled new kexts for macOS 10.13-10.15 - Moved instructions to separate README - Updated installation instructions
- Loading branch information
1 parent
937f4d6
commit 230497c
Showing
29 changed files
with
1,666 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
### | ||
# Installation instructions for STLINK/v1 driver | ||
### | ||
|
||
When connecting to the STLINK/v1 on macOS via USB, the system claims the programmer as a SCSI device. Thus libusb is not able to initialise and establish a connection to it. To solve this issue Marco Cassinerio ([email protected]) has created a so called "codeless driver" which claims the device. It is of higher priority then the default apple mass storage driver, what allows the device to be accessed through libusb. | ||
|
||
To make use of this alternative approach one needs to go through the following steps: | ||
|
||
1) Install the macOS Kernel Extension (kext): | ||
- Open a terminal console and navigate to this subdirectory `/stlinkv1_macos_driver` | ||
- Use the command ```sudo sh ./install.sh``` to install the appropiate kext for your system version. | ||
|
||
2) Install the ST-Link-v1 driver from this subdirectory `/stlinkv1_macos_driver` by executing: ```sudo make osx_stlink_shield```. This should result in the following output: | ||
|
||
``` | ||
Requesting load of /System/Library/Extensions/stlink_shield.kext. | ||
/System/Library/Extensions/stlink_shield.kext loaded successfully (or already loaded). | ||
``` | ||
|
||
3) Configure System Integrity Protection (SIP) | ||
|
||
The above system security setting introduced by Apple with OS X El Capitan (10.11) in 2015 is active per default | ||
and prevents the operating system amongst other things to load unsigned Kernel Extension Modules (kext). | ||
Thus the STLINK/v1 driver supplied with the tools, which installs as a kext, remains not functional, | ||
until SIP is fully deactivated. | ||
|
||
Without SIP-deactivation, st-util fails to detect a STLINK/v1 device: | ||
|
||
``` | ||
st-util -1 | ||
st-util $VERSION-STRING$ | ||
WARN src/sg.c: Failed to find an stlink v1 by VID:PID | ||
ERROR src/sg.c: Could not open stlink device | ||
``` | ||
|
||
In order to deactivate SIP, boot into the recovery mode and run ```csrutil disable``` in a terminal console window. | ||
|
||
4) Reboot the system. | ||
|
||
5) Verify correct detection of the STLINK/v1 device with the following input: `st-util -1` | ||
You should then see a similar output like in this example: | ||
|
||
``` | ||
INFO common.c: Loading device parameters.... | ||
INFO common.c: Device connected is: F1 High-density device, id 0x10036414 | ||
INFO common.c: SRAM size: 0x10000 bytes (64 KiB), Flash: 0x80000 bytes (512 KiB) in pages of 2048 bytes | ||
INFO sg.c: Successfully opened a stlink v1 debugger | ||
INFO gdb-server.c: Chip ID is 00000414, Core ID is 1ba01477. | ||
INFO gdb-server.c: Listening at *:4242... | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
ISMACOS=$(sw_vers -productVersion) | ||
case $ISMACOS in | ||
10.13*) | ||
KEXT="stlink_shield_10_13.kext" | ||
;; | ||
10.14*) | ||
KEXT="stlink_shield_10_14.kext" | ||
;; | ||
10.15*) | ||
KEXT="stlink_shield_10_15.kext" | ||
;; | ||
*) | ||
echo "OS X version not supported." | ||
exit 1 | ||
;; | ||
esac | ||
chown -R root:wheel $KEXT/ | ||
cp -R $KEXT /System/Library/Extensions/stlink_shield.kext | ||
kextload -v /System/Library/Extensions/stlink_shield.kext | ||
touch /System/Library/Extensions |
82 changes: 82 additions & 0 deletions
82
stlinkv1_macos_driver/stlink_shield_10_13.kext/Contents/Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>BuildMachineOSBuild</key> | ||
<string>18G4032</string> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.libusb.stlink-shield</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>KEXT</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleSupportedPlatforms</key> | ||
<array> | ||
<string>MacOSX</string> | ||
</array> | ||
<key>CFBundleVersion</key> | ||
<string>1.0.0</string> | ||
<key>DTCompiler</key> | ||
<string>com.apple.compilers.llvm.clang.1_0</string> | ||
<key>DTPlatformBuild</key> | ||
<string>11C504</string> | ||
<key>DTPlatformVersion</key> | ||
<string>GM</string> | ||
<key>DTSDKBuild</key> | ||
<string>19B90</string> | ||
<key>DTSDKName</key> | ||
<string>macosx10.15</string> | ||
<key>DTXcode</key> | ||
<string>1130</string> | ||
<key>DTXcodeBuild</key> | ||
<string>11C504</string> | ||
<key>IOKitPersonalities</key> | ||
<dict> | ||
<key>DeviceDriver</key> | ||
<dict> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.apple.kpi.iokit</string> | ||
<key>IOClass</key> | ||
<string>IOService</string> | ||
<key>IOProviderClass</key> | ||
<string>IOUSBDevice</string> | ||
<key>bcdDevice</key> | ||
<integer>256</integer> | ||
<key>idProduct</key> | ||
<integer>14148</integer> | ||
<key>idVendor</key> | ||
<integer>1155</integer> | ||
</dict> | ||
<key>InterfaceDriver</key> | ||
<dict> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.apple.kpi.iokit</string> | ||
<key>IOClass</key> | ||
<string>IOService</string> | ||
<key>IOProviderClass</key> | ||
<string>IOUSBInterface</string> | ||
<key>bConfigurationValue</key> | ||
<integer>1</integer> | ||
<key>bInterfaceNumber</key> | ||
<integer>0</integer> | ||
<key>idProduct</key> | ||
<integer>14148</integer> | ||
<key>idVendor</key> | ||
<integer>1155</integer> | ||
</dict> | ||
</dict> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>10.13</string> | ||
<key>OSBundleLibraries</key> | ||
<dict> | ||
<key>com.apple.iokit.IOUSBFamily</key> | ||
<string>1.8</string> | ||
<key>com.apple.kpi.libkern</key> | ||
<string>11.2.0</string> | ||
</dict> | ||
</dict> | ||
</plist> |
Binary file added
BIN
+33 KB
stlinkv1_macos_driver/stlink_shield_10_13.kext/Contents/MacOS/stlink_shield_10_13
Binary file not shown.
1 change: 1 addition & 0 deletions
1
stlinkv1_macos_driver/stlink_shield_10_13.kext/Contents/PkgInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
KEXT???? |
Oops, something went wrong.