Skip to content

Commit

Permalink
General Project Update
Browse files Browse the repository at this point in the history
- Updated CHANGELOG.md
- Updated README.md
- Removed support for macOS (Closes #1269)
  • Loading branch information
Nightwalker-87 committed Oct 23, 2022
1 parent c2db68e commit 2087711
Show file tree
Hide file tree
Showing 28 changed files with 8 additions and 1,245 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ labels: ""
In order to allow developers to isolate and target your respective issue, please take some time to select the check boxes below and fill out each of the following items appropriate to your specific problem.

- [ ] Programmer/board type: [enter here] (e.g STLINK /V1, /V2, /V2-onboard, /V2-clone, /V3)
- [ ] Operating system an version: [enter here] (e.g Linux, macOS, Windows)
- [ ] Operating system an version: [enter here] (e.g Linux, Windows)
- [ ] **stlink tools version** and/or git commit hash: [enter here] (e.g v1.6.1/git-d0416149)
- [ ] stlink commandline tool name: [enter here] (e.g `st-info`, `st-flash`, `st-trace`, `st-util`)
- [ ] Target chip (and board, if applicable): [enter here] (e.g STM32F103C8T6 (NUCLEO-F103RB))
Expand Down
82 changes: 0 additions & 82 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,88 +188,6 @@ jobs:
run: sudo make package
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean

# macOS

job_macos_10_15_gcc:
name: macos-10.15 gcc
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: brew install gcc libusb gtk+3
- name: make debug
run: sudo make clean && make debug
- name: make test
run: sudo make clean && make test
- name: make release
run: sudo make clean && make release
- name: sudo make install
run: sudo make clean && sudo make install
- name: sudo make package
run: sudo make package
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean

job_macos_10_15_clang:
name: macos-10.15 clang
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: brew install llvm libusb gtk+3
- name: make debug
run: sudo make clean && make debug
- name: make test
run: sudo make clean && make test
- name: make release
run: sudo make clean && make release
- name: sudo make install
run: sudo make clean && sudo make install
- name: sudo make package
run: sudo make package
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean

# job_macos_11_gcc:
# name: macos-11.0 gcc
# runs-on: macos-11.0
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: brew install gcc libusb gtk+3
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
# job_macos_11_clang:
# name: macos-11.0 clang
# runs-on: macos-11.0
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: brew install llvm libusb gtk+3
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean

# Linux MinGW cross compliation

# job_linux_20_04_cross:
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Updates & changes:
- [refactoring] Sourcefile 'common.c' ([#1218](https://github.com/stlink-org/stlink/pull/1218), [#1220](https://github.com/stlink-org/stlink/pull/1220))
- Set C standard through cmake variables ([#1221](https://github.com/stlink-org/stlink/pull/1221))
- [doc] Added make install to the macOS compiling instructions ([#1259](https://github.com/stlink-org/stlink/pull/1259))
- [doc] Linux Install from code Documentation improvement ([#1263](https://github.com/stlink-org/stlink/pull/1263), (commit [#2926648](https://github.com/stlink-org/stlink/commit/2926648be78f32919c0624bf1060b17fffde8b0d))
- [doc] Linux Install from code Documentation improvement ([#1263](https://github.com/stlink-org/stlink/pull/1263), (commit [#43498de](https://github.com/stlink-org/stlink/commit/43498dedf651260ef34197e512d35e3ad7142401))

Fixes:
- cmake: Install shared libraries in proper directories ([#1142](https://github.com/stlink-org/stlink/pull/1142))
Expand All @@ -63,6 +63,7 @@ Fixes:
- Included 'SSIZE_MAX' from 'limits.h' in 'src/common.c' ([#1207](https://github.com/stlink-org/stlink/pull/1207))
- Fix for libusb_kernel_driver_active & error handling for st.st_size () ([#1210](https://github.com/stlink-org/stlink/pull/1210), [#1211](https://github.com/stlink-org/stlink/pull/1211), [#1214](https://github.com/stlink-org/stlink/pull/1214)
- st-trace: Fixed clock issues ([#1251](https://github.com/stlink-org/stlink/pull/1251), [#1252](https://github.com/stlink-org/stlink/pull/1252))
- Fixed compilation with gcc-12 ([#1257](https://github.com/stlink-org/stlink/pull/1257), [#1267](https://github.com/stlink-org/stlink/pull/1267))
- Fixed flash regs addr for STM32L152RET6 in common_flash.c ([#1265](https://github.com/stlink-org/stlink/pull/1265))
- Fixed flash, dbgmcu and rcc registers for STM32L1 ([#1266](https://github.com/stlink-org/stlink/pull/1266))

Expand Down
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
[![CodeQL](https://github.com/stlink-org/stlink/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/stlink-org/stlink/actions/workflows/codeql-analysis.yml)
[![C/C++ CI](https://github.com/stlink-org/stlink/actions/workflows/c-cpp.yml/badge.svg?branch=testing)](https://github.com/stlink-org/stlink/actions/workflows/c-cpp.yml)
[![Linux Status](https://img.shields.io/travis/stlink-org/stlink/master?env=BADGE=linux&label=linux)](https://travis-ci.org/stlink-org/stlink)
[![macOS Status](https://img.shields.io/travis/stlink-org/stlink/master?env=BADGE=osx&label=osx)](https://travis-ci.org/stlink-org/stlink)

Recent new features and bugfixes can be found in the [Changelog](CHANGELOG.md) of this software project.

Expand All @@ -22,7 +21,7 @@ The stlink library and tools are licensed under the **[BSD-3 License](LICENSE.md
stlink is an open source toolset to program and debug STM32 devices and boards manufactured by STMicroelectronics.
It supports several so called STLINK programmer boards (and clones thereof) which use a microcontroller chip to translate commands from USB to JTAG/SWD. There are four generations available on the market which are _all_ supported by this toolset:

- **STLINK/V1** _[obsolete as of 21-11-2019, continued support by this toolset] \*)_
- **STLINK/V1** _[obsolete as of 21-11-2019, continued support by this toolset]_
- transport layer: SCSI passthru commands over USB
- stand-alone programmer
- on-board on STM32VL Discovery boards
Expand All @@ -38,8 +37,6 @@ It supports several so called STLINK programmer boards (and clones thereof) whic
- stand-alone programmer (STLINK-V3SET, STLINK-V3MINI, STLINK-V3MODS)
- on-board on some STM32 Nucleo boards (STLINK-V3E)

_\*)_ *Note: Support for the STLINK/V1 on macOS is limited to 10.15. Due to the deprecation and removal of macOS Kernel Extensions (KEXT) there will be no support for this programmer on macOS 11 or any later version.*

On the user level there is no difference in handling or operation between these different revisions.

The STlink toolset includes:
Expand Down Expand Up @@ -70,15 +67,6 @@ Please ensure to select the correct version for your system (i686 or x86_64). Th

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

**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**:

We recommend to install `stlink-tools` from the package repository of the used distribution:
Expand Down
19 changes: 1 addition & 18 deletions cmake/modules/Findlibusb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,7 @@

include(FindPackageHandleStandardArgs)

if (APPLE) # macOS
FIND_PATH(
LIBUSB_INCLUDE_DIR NAMES libusb.h
HINTS /usr /usr/local /opt
PATH_SUFFIXES libusb-1.0
)
set(LIBUSB_NAME libusb-1.0.a)
find_library(
LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
HINTS /usr /usr/local /opt
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libusb DEFAULT_MSG LIBUSB_LIBRARY LIBUSB_INCLUDE_DIR)
mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARY)
if (NOT LIBUSB_FOUND)
message(FATAL_ERROR "No libusb library found on your system! Install libusb-1.0 from Homebrew or MacPorts")
endif ()

elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FreeBSD; libusb is integrated into the system
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FreeBSD; libusb is integrated into the system
FIND_PATH(
LIBUSB_INCLUDE_DIR NAMES libusb.h
HINTS /usr/include
Expand Down
7 changes: 1 addition & 6 deletions cmake/packaging/cpack_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ set(CPACK_SET_DESTDIR "ON")
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/dist)
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_BINARY_DIR}/dist")

if (APPLE) # macOS
set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-macos-amd64")
set(CPACK_INSTALL_PREFIX "")

elseif (WIN32 AND (NOT EXISTS "/etc/debian_version")) # Windows
if (WIN32 AND (NOT EXISTS "/etc/debian_version")) # Windows
set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-win32")
set(CPACK_INSTALL_PREFIX "")
Expand Down
1 change: 0 additions & 1 deletion cmake/packaging/deb/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: stlink
Upstream-Contact: Nightwalker-87 <stlink-org>
Source: https://github.com/stlink-org/stlink
Files-Excluded: stlinkv1_macos_driver

Files: *
Copyright: 2011-2020 stlink-org
Expand Down
42 changes: 0 additions & 42 deletions doc/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,48 +183,6 @@ Choose one of the following options _before_ connecting the device to your compu
1. `cp stlink_v1.modprobe.conf /etc/modprobe.d`
2. `modprobe -r usb-storage && modprobe usb-storage`

## macOS

### Common requirements

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

Then install the following dependencies from the package repository:

- `git`
- `gcc` or `llvm` (for clang) (C-compiler)
- `cmake`
- `libusb`
- `gtk+3` or `gtk3` (_optional_, needed for `stlink-gui`)

To do this with only one simple command, type:

- for homebrew:
- with gcc: `sudo brew install git gcc cmake libusb gtk+3` or
- with clang: `sudo brew install git llvm cmake libusb gtk+3` or
- for MacPorts:
- with gcc: `sudo port install git gcc10 cmake libusb gtk3` or
- with clang: `sudo port install git llvm-10 cmake libusb gtk3`

### 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/stlink-org/stlink.git`

### Building

1. Change into the project source directory: `cd stlink`
2. Run `make clean` to clean remnants of any previous builds.
3. Run `make release` to create the _Release_ target
4. Run `make install` to full install the package with complete system integration. This might require sudo permissions.
5. 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.

As an option you may also install to an individual user-defined folder e.g `$HOME` with `make install DESTDIR=$HOME`.

## Build options

### Build using a different directory for shared libs
Expand Down
3 changes: 1 addition & 2 deletions doc/dev/app-example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Warning: This example assumes that you are building on a host with pkg-config available (e.g. linux).
# The logic required to build under windows/mingw and/or mac was intentionally omitted to keep this
# CMakeLists as small as possible.
# The logic required to build under windows/mingw was intentionally omitted to keep this CMakeLists as small as possible.

cmake_minimum_required(VERSION 3.4.2)

Expand Down
9 changes: 0 additions & 9 deletions doc/version_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ Up on compiling c-make will **automatically** download and install the latest co
- Windows 10
- Windows 8.1

### Apple macOS

| Package Repository | libusb | cmake | gtk-3-dev | Supported macOS versions |
| ------------------ | ------ | ------ | ------------------ | ------------------------ |
| homebrew | 1.0.25 | 3.22.1 | 3.24.30<br />gtk+3 | **10.10 - 12.x** |
| MacPorts | 1.0.25 | 3.22.1 | 3.24.31<br />gtk3 | **10.4 - 12.x** |

NOTE: In order to use a STLINK/V1 programmer on macOS, version 10.15 is required.

### Linux-/Unix-based:

| Operating System | libusb | cmake | libgtk-dev | Notes |
Expand Down
2 changes: 1 addition & 1 deletion src/win32/getopt/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ int getopt_long(int argc,

if (match->has_arg == required_argument) {
/* Only scan the next argv for required arguments. Behavior is not
specified, but has been observed with Ubuntu and macOS. */
specified, but has been observed with Ubuntu. */
if (optarg == NULL && ++optind < argc) { optarg = argv[optind]; }

if (optarg == NULL) { retval = ':'; }
Expand Down
58 changes: 0 additions & 58 deletions stlinkv1_macos_driver/Makefile

This file was deleted.

39 changes: 0 additions & 39 deletions stlinkv1_macos_driver/README.md

This file was deleted.

Loading

0 comments on commit 2087711

Please sign in to comment.