Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
- Compiling manual
- Updated version support for macOS
  • Loading branch information
Nightwalker-87 committed Apr 7, 2020
1 parent a8c1f41 commit 23c071e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 42 deletions.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,20 @@ Currently known working combinations of programmers and targets are listed in [d

## Installation

**Windows**: download [v1.6.0](https://github.com/texane/stlink/releases/tag/v1.6.0) from the releases page.
**Windows**:

Windows pre-compiled binaries are available at http://www.emb4fun.de/archive/stlink/index.html (outdated, not recommended for use)
Please compile and install from source as described in our [compiling manual](doc/compiling.md#Windows).

**macOS**: install [from homebrew](http://brewformulas.org/Stlink) or download [v1.6.0](https://github.com/texane/stlink/releases/tag/v1.6.0) from the releases page.
Long awaited binaries will be available soon...

**macOS**:

We recommend to install from:

* [homebrew](https://formulae.brew.sh/formula/stlink) or
* [MacPorts](https://ports.macports.org/port/stlink)

Alternatively one can compile and install from source as described in our [compiling manual](doc/compiling.md#macOS).

**Linux**:

Expand All @@ -56,9 +65,9 @@ We recommend to install `stlink-tools` from the package repository of the used d

**Other Operating Systems**:

* RedHat/CentOS 8: Users can install [from EPEL repository](https://src.fedoraproject.org/rpms/stlink/branch/epel8)
* FreeBSD: Users can install [from freshports](https://www.freshports.org/devel/stlink)
* OpenBSD: Users need to install [from source](doc/compiling.md).
* RedHat/CentOS 8: Users can install from [EPEL repository](https://src.fedoraproject.org/rpms/stlink/branch/epel8)
* FreeBSD: Users can install from [freshports](https://www.freshports.org/devel/stlink)
* OpenBSD: Users need to compile and install from source as described in our [compiling manual](doc/compiling.md).


## Installation from source (advanced users)
Expand Down
57 changes: 28 additions & 29 deletions doc/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ On Windows users should ensure that the following software is installed:


### Building
#### MinGW64
#### MinGW-w64

1. Use the command-line to move to the `scripts` directory within the source-folder: `cd stlink\scripts\`
2. Execute `./mingw64-build.bat`
Expand Down Expand Up @@ -158,47 +158,46 @@ Choose on of the following options _before_ connecting the device to your comput
2. `modprobe -r usb-storage && modprobe usb-storage`


Author: nightwalker-87
## macOS
### Common requirements

-----
The best way is to install a package manager for open source software,
either [homebrew](https://brew.sh) or [MacPorts](https://www.macports.org/).

---- **The following content is outdated and unrevised!** ----
Then install the following dependencies from the package repository:

## Mac OS X
* `git`
* `cmake`
* `libusb`

When compiling on a mac you need the following:
To do this with only one simple command, type:

* A compiler toolchain (XCode)
* CMake
* Libusb 1.0
* for homebrew: `sudo brew install git cmake libusb` or
* for MacPorts:`sudo port install git cmake libusb`

The best way is to install [homebrew](http://brew.sh) which is a package manager
for opensource software which is missing from the Apple App Store. Then install
the dependencies:
Additionally we recommend to install Xcode which delivers the necessary C-compiler toolchain Clang (LLVM).

```
brew install libusb cmake
```

Compile as described in the first section of this document.
### Installation

1. Open a new terminal window
2. Create a new destination folder at a place of your choice e.g. at `~/git`: `mkdir $HOME/git`
3. Change to this directory: `cd ~/git`
4. Fetch the project sourcefiles by running `git clone https://github.com/texane/stlink.git`


## Build using different directories for udev and modprobe
### Building

To put the udev or the modprobe configuration files into a different directory
during installation you can use the following cmake options:
1. Change into the project source directory: `cd stlink`
2. Run `make release` to create the _Release_ target
3. Run `make debug` to create the _Debug_ target (_optional_)<br />
The debug target is only necessary in order to modify the sources and to run under a debugger.

```
$ cmake -DSTLINK_UDEV_RULES_DIR="/usr/lib/udev/rules.d" \
-DSTLINK_MODPROBED_DIR="/usr/lib/modprobe.d" ..
```

## Build using a different directory for shared libs

## Build using different directory for shared libs
To put the compiled shared libs into a different directory during installation,
you can use the cmake option `cmake -DLIB_INSTALL_DIR:PATH="/usr/lib64" ..`.

To put the compiled shared libs into a different directory during installation
you can use the following cmake option:

```
$ cmake -DLIB_INSTALL_DIR:PATH="/usr/lib64" ..
```
Author: nightwalker-87
11 changes: 4 additions & 7 deletions doc/version_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ Thus no user interaction regarding libusb is necessary.

### Apple macOS

On macOS users should ensure that cmake 3.17.0 is installed.

--> libusb Installation routine: (TBD) Work in progress...

* macOS 10.15 Catalina
* macOS 10.14 Mojave
* macOS 10.13 High Sierra
| Package Repository | libusb<br />version | cmake<br />version | Supported macOS versions |
| --- | --- | --- | --- |
| homebrew | 1.0.23 | 3.17.0 | 10.12 (Sierra)- 10.15 (Catalina) |
| MacPorts | 1.0.23 | 3.17.0 | 10.6 (Snow Leopard) - 10.15 (Catalina) |


### Linux-/Unix-based:
Expand Down

0 comments on commit 23c071e

Please sign in to comment.