Merge pull request #955 from stlink-org/dist

Update for package distribution & refactoring of build settings
pull/961/head
nightwalker-87 2020-05-19 16:38:34 +02:00 zatwierdzone przez GitHub
commit da68271a03
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
50 zmienionych plików z 621 dodań i 869 usunięć

Wyświetl plik

@ -8,39 +8,64 @@ echo "----"
echo "WORK DIR:$DIR"
DIR=$PWD
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get update -qq || true
sudo apt-get install -qq -y --no-install-recommends libgtk-3-dev
if [ "$TRAVIS_JOB_NAME" == "linux-mingw" ]; then
echo "--> Building Release for Windows (x86-64) ..."
mkdir -p build-mingw && cd build-mingw
echo "-DCMAKE_SYSTEM_NAME=Windows -DTOOLCHAIN_PREFIX=x86_64-w64-mingw32 \
-DCMAKE_TOOLCHAIN_FILE=$PWD/../cmake/modules/set_toolchain.cmake -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR"
cmake -DCMAKE_SYSTEM_NAME=Windows -DTOOLCHAIN_PREFIX=x86_64-w64-mingw32 \
-DCMAKE_TOOLCHAIN_FILE=$PWD/../cmake/modules/set_toolchain.cmake -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR
make && rm -rf build-mingw && cd -
echo "--> Building Debug..."
mkdir -p build/Debug && cd build/Debug
echo "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/_install"
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/_install ../../
make && make package && cd -
echo "--> Building Release for Windows (i686) ..."
mkdir -p build-mingw && cd build-mingw
echo "-DCMAKE_SYSTEM_NAME=Windows -DTOOLCHAIN_PREFIX=i686-w64-mingw32 \
-DCMAKE_TOOLCHAIN_FILE=$PWD/../cmake/modules/set_toolchain.cmake -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR"
cmake -DCMAKE_SYSTEM_NAME=Windows -DTOOLCHAIN_PREFIX=i686-w64-mingw32 \
-DCMAKE_TOOLCHAIN_FILE=$PWD/../cmake/modules/set_toolchain.cmake -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR
make && rm -rf build-mingw && cd -
echo "--> Building Release..."
mkdir -p build/Release && cd build/Release
echo "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/_install"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/_install ../../
make && make package && cd -
elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get update -qq || true
sudo apt-get install -qq -y --no-install-recommends libgtk-3-dev
# echo "--> Building Binary..."
# mkdir -p build/Binary && cd build/Binary
# cho "-DCMAKE_BUILD_TYPE=Binary -DCMAKE_INSTALL_PREFIX=$PWD/_install"
# cmake -DCMAKE_BUILD_TYPE=Binary -DCMAKE_TOOLCHAIN_FILE=./cmake/linux-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$PWD/_install ../../
# make && make package && cd -
else [ "$TRAVIS_OS_NAME" == "osx" ];
brew install libusb
echo "--> Building Debug..."
mkdir -p build/Debug && cd build/Debug
echo "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/install"
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR
make && cd -
echo "--> Building Debug..."
mkdir -p build/Debug && cd build/Debug
echo "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/_install"
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/_install ../../
make && make package && cd -
echo "--> Building Release with package..."
mkdir -p build/Release && cd build/Release
echo "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR
make package && cd -
echo "--> Building Release..."
mkdir -p build/Release && cd build/Release
echo "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/_install"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/_install ../../
make && make package && cd -
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew install libusb
echo "--> Building Debug..."
mkdir -p build/Debug && cd build/Debug
echo "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/install"
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR
make && cd -
echo "--> Building Release with package..."
mkdir -p build/Release && cd build/Release
echo "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR
make package && cd -
else # local test-build
echo "--> Building Debug..."
mkdir -p build/Debug && cd build/Debug
echo "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/install"
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/install ../../
make && cd -
echo "--> Building Release with package..."
mkdir -p build/Release && cd build/Release
echo "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install ../../
make package && cd -
fi

Wyświetl plik

@ -1,98 +1,111 @@
language: c
matrix:
jobs:
include:
### 64-bit builds ###
### 64-bit builds on AMD64 ###
- os: linux
dist: bionic
env: BADGE=linux
arch: x64
compiler: gcc-5
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['gcc-5', 'libusb-1.0.0-dev', 'libgtk-3-dev']
packages: ['gcc-5', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm']
- os: linux
dist: bionic
env: BADGE=linux
arch: x64
compiler: gcc-7
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['gcc-7', 'libusb-1.0.0-dev', 'libgtk-3-dev']
- os: linux
env: BADGE=linux
arch: x64
compiler: gcc-9
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['gcc-9', 'libusb-1.0.0-dev', 'libgtk-3-dev']
packages: ['gcc-9', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm']
- os: linux
dist: xenial
env: BADGE=linux
arch: x64
compiler: clang-3.7
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-xenial-3.7']
packages: ['clang-3.7', 'libusb-1.0.0-dev', 'libgtk-3-dev']
packages: ['clang-3.7', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm']
- os: linux
dist: bionic
env: BADGE=linux
arch: x64
compiler: clang-6.0
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-bionic-6.0']
packages: ['clang-6.0', 'libusb-1.0.0-dev', 'libgtk-3-dev']
# - os: linux
# arch: x64
# compiler: clang-6.0
# addons:
# apt:
# sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-bionic-6.0']
# packages: ['clang-6.0', 'libusb-1.0.0-dev', 'libgtk-3-dev']
# env: CFLAGS=-m32 LDFLAGS=-m32
packages: ['clang-6.0', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm']
- os: linux
dist: bionic
env: BADGE=linux
compiler: clang-9
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['clang-9', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm']
### 32-bit builds ###
- os: linux
env: BADGE=linux
arch: x86
compiler: gcc-5
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['gcc-5', 'libusb-1.0.0-dev', 'libgtk-3-dev']
- os: linux
env: BADGE=linux
arch: x86
compiler: gcc-7
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['gcc-7', 'libusb-1.0.0-dev', 'libgtk-3-dev']
- os: linux
env: BADGE=linux
arch: x86
dist: bionic
env: BADGE=linux-mingw
name: linux-mingw
compiler: gcc-9
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['gcc-9', 'libusb-1.0.0-dev', 'libgtk-3-dev']
packages: ['gcc-9', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm', 'mingw-w64']
### 32-bit builds on AMD64 ###
- os: linux
dist: bionic
env: BADGE=linux
compiler: gcc-5
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['gcc-5', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm']
before_install:
- CFLAGS="$CFLAGS -m32"; CXXFLAGS="$CXXFLAGS -m32"; LDFLAGS="$LDFLAGS -m32";
- os: linux
dist: bionic
env: BADGE=linux
compiler: gcc-9
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['gcc-9', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm']
before_install:
- CFLAGS="$CFLAGS -m32"; CXXFLAGS="$CXXFLAGS -m32"; LDFLAGS="$LDFLAGS -m32";
- os: linux
dist: xenial
env: BADGE=linux
arch: x86
compiler: clang-3.7
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-xenial-3.7']
packages: ['clang-3.7', 'libusb-1.0.0-dev', 'libgtk-3-dev']
packages: ['clang-3.7', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm']
before_install:
- CFLAGS="$CFLAGS -m32"; CXXFLAGS="$CXXFLAGS -m32"; LDFLAGS="$LDFLAGS -m32";
- os: linux
dist: bionic
env: BADGE=linux
arch: x86
compiler: clang-6.0
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-bionic-6.0']
packages: ['clang-6.0', 'libusb-1.0.0-dev', 'libgtk-3-dev']
packages: ['clang-6.0', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm']
before_install:
- CFLAGS="$CFLAGS -m32"; CXXFLAGS="$CXXFLAGS -m32"; LDFLAGS="$LDFLAGS -m32";
- os: linux
dist: bionic
env: BADGE=linux
compiler: clang-9
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['clang-9', 'libusb-1.0.0-dev', 'libgtk-3-dev', 'rpm']
before_install:
- CFLAGS="$CFLAGS -m32"; CXXFLAGS="$CXXFLAGS -m32"; LDFLAGS="$LDFLAGS -m32";
### macOS ###
- os: osx
@ -114,8 +127,14 @@ matrix:
- libusb
- gtk+3
### Windows ###
# - os: windows
# env: BADGE=windows
# compiler: gcc
script:
- git fetch --tags
- printenv
- cmake --version
- ./.travis.sh
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] || [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis.sh; fi
# - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then cmd.exe /C 'mingw64-build.bat'; fi

Wyświetl plik

@ -9,7 +9,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
###
# General project settings
###
@ -18,14 +17,6 @@ project(stlink C)
set(PROJECT_DESCRIPTION "Open source version of the STMicroelectronics ST-LINK Tools")
include(GNUInstallDirs) # Define GNU standard installation directories
set(STLINK_UDEV_RULES_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/udev/rules.d" CACHE PATH "udev rules directory")
set(STLINK_MODPROBED_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/modprobe.d" CACHE PATH "modprobe.d directory")
set(STLINK_STATIC_LIB ON CACHE BOOL "Install static lib")
option(STLINK_INSTALL_UDEV_RULES "Install udev rules files" ON)
option(STLINK_INSTALL_MODPROBE_CONF "Install modprobe conf files" ON)
option(STLINK_GENERATE_MANPAGES "Generate manpages with pandoc" OFF)
## Determine project version
include(${CMAKE_MODULE_PATH}/get_version.cmake)
@ -40,16 +31,7 @@ else ()
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG")
endif ()
## Set installation directories for libraries
if (IS_DIRECTORY ${LIB_INSTALL_DIR})
set(LIB_INSTALL_DIR ${LIB_INSTALL_DIR} CACHE PATH "Main library directory")
set(STLINK_LIBRARY_PATH "${LIB_INSTALL_DIR}")
else ()
set(LIB_INSTALL_DIR "lib" CACHE PATH "Main library directory")
set(STLINK_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
endif ()
## Set installation directories for header files
## Set installation directories for header files ### TODO: Clean this up...
if (IS_DIRECTORY ${INCLUDE_INSTALL_DIR})
set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_DIR} CACHE PATH "Main include directory")
set(STLINK_INCLUDE_PATH "${INCLUDE_INSTALL_DIR}")
@ -67,7 +49,7 @@ find_package(libusb REQUIRED)
## Package configuration (pkg-config) on unix-based systems
if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
add_subdirectory(cmake/pkgconfig)
#add_subdirectory(cmake/pkgconfig)
find_package(PkgConfig)
pkg_check_modules(GTK3 gtk+-3.0)
endif ()
@ -103,13 +85,14 @@ endif ()
include_directories(${LIBUSB_INCLUDE_DIR})
# ====
include_directories(include) ### TODO: Clean this up...
include_directories(${PROJECT_SOURCE_DIR}/include) ### TODO: Clean this up...
include_directories(${PROJECT_BINARY_DIR}/include/stlink)
include_directories(include/stlink)
include_directories(include/stlink/tools)
include_directories(${PROJECT_SOURCE_DIR}/include/stlink)
include_directories(${PROJECT_SOURCE_DIR}/include/stlink/tools)
# ====
include_directories(src)
include_directories(src/tools) ### TODO: Clean this up...
set(STLINK_HEADERS
include/stlink.h
@ -153,29 +136,30 @@ if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
endif ()
###
# Libraries
###
set(STLINK_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Main library install directory")
# Set the environment variable LD_LIBRARY_PATH to point to /usr/local/lib (per default).
execute_process (COMMAND bash -c "export LD_LIBRARY_PATH="${CMAKE_INSTALL_LIBDIR}"")
###
# Shared library
###
# Set library name
if (NOT WIN32)
set(STLINK_LIB_SHARED ${PROJECT_NAME})
else (WIN32)
set(STLINK_LIB_SHARED ${PROJECT_NAME}-shared)
endif ()
add_library(
${STLINK_LIB_SHARED} SHARED
${STLINK_HEADERS} # header files for ide projects generated by cmake
${STLINK_SOURCE}
)
target_link_libraries(
${STLINK_LIB_SHARED}
${LIBUSB_LIBRARY}
)
add_library(${STLINK_LIB_SHARED} SHARED ${STLINK_HEADERS} ${STLINK_SOURCE})
set(STLINK_SHARED_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
message(STATUS "STLINK_LIB_SHARED: ${STLINK_LIB_SHARED}")
message(STATUS "PROJECT_VERSION_MAJOR: ${PROJECT_VERSION_MAJOR}")
message(STATUS "VERSION: ${STLINK_SHARED_VERSION}")
@ -184,18 +168,17 @@ set_target_properties(
${STLINK_LIB_SHARED} PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${STLINK_SHARED_VERSION}
OUTPUT_NAME ${PROJECT_NAME}
)
# Link shared library with Apple macOS libraries
if (APPLE)
# Link shared library
if (APPLE) # ... with Apple macOS libraries
find_library(ObjC objc)
find_library(CoreFoundation CoreFoundation)
find_library(IOKit IOKit)
target_link_libraries(${STLINK_LIB_SHARED} ${CoreFoundation} ${IOKit} ${ObjC} ${SSP_LIB})
endif ()
if (WIN32 OR MINGW OR MSYS)
target_link_libraries(${STLINK_LIB_SHARED} ${LIBUSB_LIBRARY} wsock32 ws2_32 ${SSP_LIB})
target_link_libraries(${STLINK_LIB_SHARED} ${LIBUSB_LIBRARY} ${SSP_LIB} ${ObjC} ${CoreFoundation} ${IOKit})
elseif (WIN32) # ... with Windows libraries
target_link_libraries(${STLINK_LIB_SHARED} ${LIBUSB_LIBRARY} ${SSP_LIB} wsock32 ws2_32)
else ()
target_link_libraries(${STLINK_LIB_SHARED} ${LIBUSB_LIBRARY} ${SSP_LIB})
endif ()
@ -207,36 +190,36 @@ install(TARGETS ${STLINK_LIB_SHARED} DESTINATION ${STLINK_LIBRARY_PATH})
# Static library
###
# Set library name
set(STLINK_LIB_STATIC ${PROJECT_NAME}-static)
add_library(
${STLINK_LIB_STATIC} STATIC
${STLINK_HEADERS} # header files for ide projects generated by cmake
${STLINK_SOURCE}
)
add_library(${STLINK_LIB_STATIC} STATIC ${STLINK_HEADERS} ${STLINK_SOURCE})
set(STLINK_STATIC_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
message(STATUS "STLINK_LIB_STATIC: ${STLINK_LIB_STATIC}")
message(STATUS "PROJECT_VERSION_MAJOR: ${PROJECT_VERSION_MAJOR}")
message(STATUS "VERSION: ${STLINK_STATIC_VERSION}")
set_target_properties(
${STLINK_LIB_STATIC} PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${STLINK_STATIC_VERSION}
OUTPUT_NAME ${PROJECT_NAME}
)
# Link static library with Apple macOS libraries
if (APPLE)
# Link static library
if (APPLE) # ... with Apple macOS libraries
find_library(ObjC objc)
find_library(CoreFoundation CoreFoundation)
find_library(IOKit IOKit)
target_link_libraries(${STLINK_LIB_STATIC} ${CoreFoundation} ${IOKit} ${ObjC} ${SSP_LIB})
endif ()
if (WIN32 OR MINGW OR MSYS)
target_link_libraries(${STLINK_LIB_STATIC} ${LIBUSB_LIBRARY} wsock32 ws2_32 ${SSP_LIB})
target_link_libraries(${STLINK_LIB_STATIC} ${LIBUSB_LIBRARY} ${SSP_LIB} ${ObjC} ${CoreFoundation} ${IOKit})
elseif (WIN32) # ... with Windows libraries
target_link_libraries(${STLINK_LIB_STATIC} ${LIBUSB_LIBRARY} ${SSP_LIB} wsock32 ws2_32)
else ()
target_link_libraries(${STLINK_LIB_STATIC} ${LIBUSB_LIBRARY} ${SSP_LIB})
endif ()
if (STLINK_STATIC_LIB)
install(TARGETS ${STLINK_LIB_STATIC} ARCHIVE DESTINATION ${STLINK_LIBRARY_PATH})
endif ()
install(TARGETS ${STLINK_LIB_STATIC} ARCHIVE DESTINATION ${STLINK_LIBRARY_PATH})
###
@ -264,19 +247,25 @@ else ()
target_link_libraries(st-util ${STLINK_LIB_SHARED} ${SSP_LIB})
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
if (STLINK_INSTALL_MODPROBE_CONF)
install(FILES etc/modprobe.d/stlink_v1.conf DESTINATION ${STLINK_MODPROBED_DIR}/)
endif ()
if (STLINK_INSTALL_UDEV_RULES)
file(GLOB RULES_FILES etc/udev/rules.d/*.rules)
install(FILES ${RULES_FILES} DESTINATION ${STLINK_UDEV_RULES_DIR}/)
endif ()
endif ()
install(TARGETS st-flash DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS st-info DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS st-util DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS st-flash DESTINATION bin)
install(TARGETS st-info DESTINATION bin)
install(TARGETS st-util DESTINATION bin)
###
# Device configuration (Linux only)
###
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
## Install modprobe.d conf files / rules to /usr/local/etc/stlink (default)
set(STLINK_MODPROBED_DIR "${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME}/modprobe.d" CACHE PATH "modprobe.d directory")
install(FILES ${CMAKE_SOURCE_DIR}/config/modprobe.d/stlink_v1.conf DESTINATION ${STLINK_MODPROBED_DIR})
## Install udev rules files / rules to /usr/local/etc/stlink (default)
set(STLINK_UDEV_RULES_DIR "${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME}/udev/rules.d" CACHE PATH "udev rules directory")
file(GLOB RULES_FILES ${CMAKE_SOURCE_DIR}/config/udev/rules.d/*.rules)
install(FILES ${RULES_FILES} DESTINATION ${STLINK_UDEV_RULES_DIR})
endif ()
###
@ -290,9 +279,11 @@ add_subdirectory(include) # contains subordinate CMakeLists for version config a
add_subdirectory(src/stlink-gui) # contains subordinate CMakeLists to build GUI
add_subdirectory(tests) # contains subordinate CMakeLists to build test executables
add_subdirectory(doc/man) # contains subordinate CMakeLists to generate manpages
add_subdirectory(cmake/packaging) # contains subordinate CMakeLists to build packages
option(STLINK_GENERATE_MANPAGES "Generate manpages with pandoc" OFF)
add_subdirectory(doc/man) # contains subordinate CMakeLists to generate manpages
###
# Uninstall target

Wyświetl plik

@ -1,6 +1,7 @@
##
# This Makefile is used to drive building of Debug and Release targets of CMake
# This Makefile is used to drive building of CMake build targets
##
MAKEFLAGS += -s
# additional flags for cmake, e.g. install path -DCMAKE_INSTALL_PREFIX=$(HOME)/.local
@ -45,7 +46,7 @@ package: build/Release
@$(MAKE) -C build/Release package
test: debug
@echo "[TEST]"
@echo "[TEST] Debug"
@$(MAKE) -C build/Debug test
build/Debug:
@ -54,7 +55,7 @@ build/Debug:
build/Release:
@mkdir -p $@
@cd $@ && cmake -DCMAKE_BUILD_TYPE=Release $(CMAKEFLAGS) -Wno-dev ../../
@cd $@ && cmake -DCMAKE_BUILD_TYPE=Release $(CMAKEFLAGS) ../../
clean:
@echo "[CLEAN]"

Wyświetl plik

@ -66,9 +66,10 @@ Our [tutorial.md](doc/tutorial.md) may help you along with some advanced tasks a
**Windows**:
Please compile and install from source as described in our [compiling manual](doc/compiling.md#Windows).
As of Release v1.6.1 stand-alone Windows binaries are made available (again) on the release page of the project.
Please ensure to select the correct version for your system (i686 or x86_64). The archive file can be unzipped to any desired location as it does not contain any hardcoded paths. However we suggest to move the unzipped application folder to `C:\Program Files\` on 32-bit systems and to `C:\Program Files (x86)\` on 64-bit systems (the toolset is a 32-bit).
Long awaited binaries will be available soon...
Alternatively one may compile and install from source as described in our [compiling manual](doc/compiling.md#Windows).
**macOS**:

Wyświetl plik

@ -1,4 +1,6 @@
# Findlibusb.cmake
# Find and install external libusb library
# Once done this will define
#
# LIBUSB_FOUND libusb present on system
@ -8,7 +10,7 @@
include(FindPackageHandleStandardArgs)
if (APPLE) # macOS
if (APPLE) # macOS
FIND_PATH(
LIBUSB_INCLUDE_DIR NAMES libusb.h
HINTS /usr /usr/local /opt
@ -25,7 +27,7 @@ if (APPLE) # macOS
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
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FreeBSD; libusb is integrated into the system
FIND_PATH(
LIBUSB_INCLUDE_DIR NAMES libusb.h
HINTS /usr/include
@ -41,7 +43,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FreeBSD; libusb is integrated
message(FATAL_ERROR "Expected libusb library not found on your system! Verify your system integrity.")
endif ()
elseif (WIN32) # Windows
elseif (WIN32 OR (EXISTS "/etc/debian_version" AND MINGW)) # Windows or MinGW-toolchain on Debian
# for MinGW/MSYS/MSVC: 64-bit or 32-bit?
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCH 64)
@ -49,7 +51,7 @@ elseif (WIN32) # Windows
set(ARCH 32)
endif ()
if (NOT EXISTS "/etc/debian_version")
if (WIN32 AND NOT EXISTS "/etc/debian_version") # Skip this for Debian...
FIND_PATH(
LIBUSB_INCLUDE_DIR NAMES libusb.h
HINTS /usr /usr/local /opt
@ -71,12 +73,17 @@ elseif (WIN32) # Windows
endif ()
endif ()
if (NOT LIBUSB_FOUND OR EXISTS "/etc/debian_version")
if (NOT LIBUSB_FOUND)
# Preparations for installing libusb library
set(LIBUSB_WIN_VERSION 1.0.23) # set libusb version
set(LIBUSB_WIN_ARCHIVE libusb-${LIBUSB_WIN_VERSION}.7z)
set(LIBUSB_WIN_ARCHIVE_PATH ${CMAKE_BINARY_DIR}/${LIBUSB_WIN_ARCHIVE})
set(LIBUSB_WIN_OUTPUT_FOLDER ${CMAKE_BINARY_DIR}/3rdparty/libusb-${LIBUSB_WIN_VERSION})
if (WIN32 AND NOT EXISTS "/etc/debian_version") # ... on native Windows systems
set(LIBUSB_WIN_ARCHIVE_PATH ${CMAKE_BINARY_DIR}/${LIBUSB_WIN_ARCHIVE})
set(LIBUSB_WIN_OUTPUT_FOLDER ${CMAKE_BINARY_DIR}/3rdparty/libusb-${LIBUSB_WIN_VERSION})
else (EXISTS "/etc/debian_version" AND MINGW) # ... only for cross-building on Debian
set(LIBUSB_WIN_ARCHIVE_PATH ${CMAKE_SOURCE_DIR}/build-mingw/${LIBUSB_WIN_ARCHIVE})
set(LIBUSB_WIN_OUTPUT_FOLDER ${CMAKE_SOURCE_DIR}/build-mingw/3rdparty/libusb-${LIBUSB_WIN_VERSION})
endif ()
# Get libusb package
if (EXISTS ${LIBUSB_WIN_ARCHIVE_PATH}) # ... should the package be already there (for whatever reason)
@ -107,6 +114,7 @@ elseif (WIN32) # Windows
)
if (MINGW OR MSYS)
set(LIBUSB_NAME usb-1.0)
find_library(
LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
HINTS ${LIBUSB_WIN_OUTPUT_FOLDER}/MinGW${ARCH}/static
@ -115,6 +123,7 @@ elseif (WIN32) # Windows
)
else (MSVC)
set(LIBUSB_NAME libusb-1.0.lib)
find_library(
LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
HINTS ${LIBUSB_WIN_OUTPUT_FOLDER}/MS${ARCH}/dll
@ -127,7 +136,7 @@ elseif (WIN32) # Windows
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libusb DEFAULT_MSG LIBUSB_LIBRARY LIBUSB_INCLUDE_DIR)
mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARY)
else () # all other OS (unix-based)
else () # all other OS (unix-based)
FIND_PATH(
LIBUSB_INCLUDE_DIR NAMES libusb.h
HINTS /usr /usr/local /opt

Wyświetl plik

@ -1,3 +1,6 @@
# c_flags.cmake
# Configure C compiler flags
include(CheckCCompilerFlag)
function(add_cflag_if_supported flag)

Wyświetl plik

@ -1,6 +1,5 @@
# Determine project version
# * Using Git
# * Local .version file
# get_version.cmake
# Determine project version by using Git or a local .version file
set(__detect_version 0)
@ -77,13 +76,14 @@ if (GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
endif(GIT_DESCRIBE_RESULT EQUAL 0)
endif ()
##
# Failure to read version via git
# Possible cases:
# -> git is not found or
# -> /.git does not exist or
# -> GIT_DESCRIBE failed or
# -> version string is of invalid format
##
if (NOT GIT_FOUND OR NOT EXISTS "${PROJECT_SOURCE_DIR}/.git" OR ERROR_FLAG EQUAL 1)
message(STATUS "Git and/or repository not found.") # e.g. when building from source package
message(STATUS "Try to detect version from \"${PROJECT_SOURCE_DIR}/.version\" file instead...")

Wyświetl plik

@ -0,0 +1,20 @@
# set_toolchain.cmake
# Toolchain file for cross-building on a Debian/Ubuntu Linux system
###
# Set toolchain and configure target environment on the build host system
###
# Set cross compilers to use for C and C++
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
# Set path to directory with headers and libraries of the cross compiler
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
# Modify default behavior of FIND_XXX() commands to search for headers and libraries
# in the target environment and search for programs in the build host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Wyświetl plik

@ -1,6 +1,5 @@
add_subdirectory(debian)
add_subdirectory(fedora)
add_subdirectory(opensuse)
add_subdirectory(deb)
add_subdirectory(rpm)
add_subdirectory(windows)
include(cpack_config.cmake)

Wyświetl plik

@ -1,85 +1,115 @@
# cpack_config.cmake
# Configure and generate packages for distribution
###
# Configure package
###
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_DESCRIPTION "Open source STM32 MCU programming toolset")
set(CPACK_PACKAGE_VENDOR "stlink-org")
set(CMAKE_PROJECT_HOMEPAGE_URL "https://github.com/stlink-org/stlink")
set(CPACK_SET_DESTDIR "ON")
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_BINARY_DIR}/dist")
if (APPLE)
if (APPLE) # macOS
set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-macosx-amd64")
set(CPACK_INSTALL_PREFIX "")
elseif (WIN32) ### TODO: Binary build config for windows...
elseif (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 "")
# Sample toolchain file for building for Windows from a Debian/Ubuntu Linux system.
# Typical usage:
# *) install cross compiler: `sudo apt-get install mingw-w64`
# *) cd build
# *) cmake -DCMAKE_TOOLCHAIN_FILE=./cmake/linux-mingw64.cmake ..
# *) cmake -DCMAKE_TOOLCHAIN_FILE=./cmake/linux-mingw32.cmake ..
elseif (WIN32) # Windows cross-build on Debian/Ubuntu
set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-${TOOLCHAIN_PREFIX}")
set(CPACK_INSTALL_PREFIX "")
#set(CMAKE_SYSTEM_NAME Windows)
#set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
#set(TOOLCHAIN_PREFIX i686-w64-mingw32)
# cross compilers to use for C and C++
#set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
#set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
#set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
# target environment on the build host system
# set 1st to dir with the cross compiler's C/C++ headers/libs
#set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
# modify default behavior of FIND_XXX() commands to
# search for headers/libs in the target environment and
# search for programs in the build host environment
#set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
#set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND EXISTS "/etc/debian_version")
elseif (EXISTS "/etc/debian_version" AND NOT EXISTS WIN32) # Package-build is available on Debian/Ubuntu only
message(STATUS "Debian-based Linux OS detected")
### Debian-specific
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Open source STM32 MCU programming toolset")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/stlink-org/stlink")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Luca Boccassi")
set(CPACK_PACKAGE_CONTACT "bluca@debian.org")
set(CPACK_GENERATOR "DEB;RPM") # RPM requires package `rpm`
## Set debian_revision number
# Convention: Restart the debian_revision at 1 each time the upstream_version is increased.
set(CPACK_DEBIAN_PACKAGE_RELEASE "0")
###
# Debian (DEB)
###
## Debian package name
# CPACK_DEB_PACKAGE_NAME --> Default: CPACK_PACKAGE_NAME
## DEB package file name
# CPack DEB generator generates package file name in deb format:
# <PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
## Add CHANGELOG in Debian-specific format
### TODO
# CPACK_DEBIAN_PACKAGE_VERSION --> Default: CPACK_PACKAGE_VERSION
## Add license file
### TODO
## Set debian_revision number
# Convention: Restart the debian_revision at 1 each time the upstream_version is increased.
set(CPACK_DEBIAN_PACKAGE_RELEASE "1")
# Include a postinst-script
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/cmake/packaging/debian/postinst")
# CPACK_DEBIAN_PACKAGE_ARCHITECTURE --> Default: Output of dpkg --print-architecture
set(CPACK_DEBIAN_PACKAGE_DEPENDS "pkg-config, build-essential, debhelper (>=9), cmake (>= 3.4.2), libusb-1.0-0-dev (>= 1.0.20)")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Luca Boccassi <bluca@debian.org>")
# CPACK_DEBIAN_PACKAGE_DESCRIPTION --> Default: CPACK_DEBIAN_PACKAGE_DESCRIPTION (as it is set)
# CPACK_DEBIAN_PACKAGE_SECTION --> Default: devel
# CPACK_DEBIAN_ARCHIVE_TYPE --> Default: gnutar
# CPACK_DEBIAN_COMPRESSION_TYPE --> Default: gzip
# CPACK_DEBIAN_PACKAGE_PRIORITY --> Default: optional
# CPACK_DEBIAN_PACKAGE_HOMEPAGE --> Default: CMAKE_PROJECT_HOMEPAGE_URL
set(CPACK_DEBIAN_PACKAGE_SUGGESTS "libgtk-3-dev, pandoc")
### rpm-specific ### TODO: Package config for opensuse should go here...
## Additional package files in Debian-specific format:
# * changelog (package changelog)
# * copyright (license file)
# * rules
# * postinst-script
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
"${CMAKE_SOURCE_DIR}/cmake/packaging/deb/changelog"
"${CMAKE_SOURCE_DIR}/cmake/packaging/deb/copyright"
"${CMAKE_SOURCE_DIR}/cmake/packaging/deb/rules"
"${CMAKE_SOURCE_DIR}/cmake/packaging/deb/postinst"
)
###
# Slackware & Redhat (RPM)
###
set(CPACK_SET_DESTDIR "OFF") # Required for relocatable package
# CPACK_RPM_PACKAGE_SUMMARY --> Default: CPACK_PACKAGE_DESCRIPTION_SUMMARY
# CPACK_RPM_PACKAGE_NAME --> Default: CPACK_PACKAGE_NAME
## RPM package file name
# Allow rpmbuild to generate package file name
set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
# CPACK_RPM_PACKAGE_VERSION --> Default: CPACK_PACKAGE_VERSION
# CPACK_RPM_PACKAGE_ARCHITECTURE --> Default: Native architecture output by uname -m
## Set rpm revision number
# Convention: Restart the debian_revision at 1 each time the upstream_version is increased.
set(CPACK_RPM_PACKAGE_RELEASE "1")
set(CPACK_RPM_PACKAGE_LICENSE "BSD-3")
# CPACK_RPM_PACKAGE_GROUP --> Default: unknown (RPM Groups are deprecated on Fedora)
# CPACK_RPM_PACKAGE_VENDOR --> Default: CPACK_PACKAGE_VENDOR (as it is set)
# CPACK_RPM_PACKAGE_URL --> Default: CMAKE_PROJECT_HOMEPAGE_URL
set(CPACK_RPM_PACKAGE_DESCRIPTION CPACK_DEBIAN_PACKAGE_DESCRIPTION)
## Add package changelog in rpm-specific format
set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/cmake/packaging/rpm/changelog")
else ()
### TODO: Package config for fedora should go here...
# No package configuration on other platforms ...
endif ()
###
# Build package
# Build packages
###
include(CPack)

Wyświetl plik

@ -0,0 +1,49 @@
stlink (1.6.0+ds-1) unstable; urgency=medium
* Merge tag 'v1.6.0' into debian
* Bump Standards-Version to 4.5.0, no changes.
* Update libstlink1 symbols file for 1.6.0.
-- Luca Boccassi <bluca@debian.org> Tue, 25 Feb 2020 22:08:33 +0000
stlink (1.5.1+ds-2) unstable; urgency=medium
* Mark library packages as Multi-Arch: same.
* Apply cross.patch to fix cross-compiling the GUI. Thanks Helmut for the patch! (Closes: #941320)
* Vcs-Git: add -b debian
* Set Rules-Requires-Root: no
* Bump Standards-Version to 4.4.0
-- Luca Boccassi <bluca@debian.org> Sun, 29 Sep 2019 12:50:58 +0100
stlink (1.5.1+ds-1) unstable; urgency=medium
* Merge tag 'v1.5.1' into debian. See upstream changelog for info:
https://github.com/stlink-org/stlink/releases/tag/v1.5.1
* Mark packages as linux-any, other systems not supported.
-- Luca Boccassi <bluca@debian.org> Fri, 28 Sep 2018 10:26:39 +0100
stlink (1.5.0+ds-1) unstable; urgency=medium
* Upload to unstable. (Closes: #869421)
-- Luca Boccassi <bluca@debian.org> Fri, 16 Mar 2018 16:56:17 +0000
stlink (1.4.0) unstable; urgency=low
-- Andrew 'Necromant' Andrianov <andrew@ncrmnt.org> Sat, 01 Jul 2017 00:00:00 +0000
stlink (1.3.1) unstable; urgency=low
-- Andrew 'Necromant' Andrianov <andrew@ncrmnt.org> Sat, 25 Feb 2017 00:00:00 +0000
stlink (1.3.0) unstable; urgency=low
-- Andrew 'Necromant' Andrianov <andrew@ncrmnt.org> Sat, 28 Jan 2017 00:00:00 +0000
stlink (1.2.1) unstable; urgency=low
* Initial Debian-Packaged Release.
-- Andrew 'Necromant' Andrianov <andrew@ncrmnt.org> Sat, 09 Jul 2016 23:16:07 +0300

Wyświetl plik

@ -0,0 +1,9 @@
Source: stlink
Maintainer: Luca Bocassi <bluca@debian.org>
Build-Depends: cmake, dh-cmake, debhelper (>= 9), libusb-1.0-0-dev, libgtk-3-dev
Standards-Version: 4.1.3
Section: electronics
Priority: optional
Homepage: https://github.com/stlink-org/stlink
Vcs-Git: https://github.com/stlink-org/stlink.git
Vcs-Browser: https://github.com/stlink-org/stlink

Wyświetl plik

@ -0,0 +1,37 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: stlink
Upstream-Contact: Luca Bocassi <bluca@debian.org>
Source: https://github.com/stlink-org/stlink
Disclaimer:
Comment:
Files: *
Copyright: 2011-2020 stlink-org
Martin Capitanio [capnm]
Fabien Le Mentec [texane]
Jerry Jacobs [xor-gate]
[Nightwalker-87]
and many others...
A list of contributors can be found in "contributors.txt".
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Wyświetl plik

@ -11,7 +11,7 @@ include /usr/share/dpkg/default.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@ --buildsystem cmake
dh $@ --buildsystem cmake --with cpack
override_dh_auto_configure:
dh_auto_configure -- \

Wyświetl plik

@ -1,226 +0,0 @@
stlink (1.6.0) unstable; urgency=medium
Release date: 2020-02-20
Major changes and added features:
* Initial support for STM32L41X
* Working support for CKS32F103C8T6 and related CKS devices with Core-ID 0x2ba01477
* Added preliminary support for some STM32G0 chips
* Added support for mass erasing second bank on STM32F10x_XL
* Added call to clear PG bit after writing to flash
* Added support to write option bytes for the STM32G0
* Added support for STM32WB55 chips
* Added STLink V3SET VID:PIDs to the udev rules
* Support for "STM32+Audio" v2-1 firmware
* Build for Windows under Debian/Ubuntu
* Allow for 64 bytes serials
* Added full support for STLINK CHIP ID L4RX
* Added support for the STLink-v2.1 when flashed with no mass storage (PID 0x3752)
* Added support for writing option bytes on STM32L0xx
* Added support to read and write option bytes for STM32F2 series
* Added support to read and write option bytes for STM32F446
Updates and fixes:
* Fixed "unkown chip id", piped output and st-util -v
* Fixed an issue with versioning stuck at 1.4.0 for versions cloned with git
* Updated STM32F3xx chip ID that covers a few different devices
* Made udev rules and modprobe conf installation optional
* Fixed case when __FILE__ don't contain "/" nor "\\"
* Fixed double dash issue in doc/man
* Compiling documentation: package is called libusb-1.0-0-dev on Debian
* Only do bank calculation on STM32L4 devices with dual banked flash / Added chip-ID 0x464 for STM32L41xxx/L42xxx devices
* Added O_BINARY option to open file
* Fixed versioning when compiling from the checked out git-repo
* win32: move usleep definition to unistd.h
* Fixed relative path to the UI files needed by stlink-gui-local (GUI)
* Added howto for sending NRST signal through GDB
* Fixed package name "devscripts" in doc/compiling.md
* Fixed few potential memory/resource leaks
* Updated Linux source repositories in README.md: Debian and Ubuntu
* Do not issue JTAG reset on stlink-v1
* Fixed flash size of STM32 Discovery vl
* Updated documentation on software structure
General project updates:
* Updated README.md, CHANGELOG.md and issue templates
* Fixed travis build config file
* Added CODE_OF_CONDUCT
* Archived page from github project wiki to doc/wiki_old.md
-- Luca Boccassi <bluca@debian.org> Tue, 25 Feb 2020 22:08:33 +0000
stlink (1.5.1) unstable; urgency=medium
Release date: 2018-09-13
Major changes and added features:
* Added reset through AIRCR
* Added creation of icons for .desktop file
* Added desktop file for linux
* Added button to export STM32 flash memory to a file
* Updated libusb to 1.0.22
* Added icons for STLink GUI
* Added support for STM32L4R9 target
* Added memory map for STM32F411RE target
* Implemented intel hex support for GTK GUI
Updates and fixes:
* Fixed missing flash_loader for STM32L0x
* Fix for stlink library calls exit() or _exit()
* Added semihosting parameter documentation in doc/man
* Fixed reference to non-exisiting st-term tool in doc/man
* Fixed serial number size mismatch with stlink_open_usb()
* Debian packaging, CMake and README.md fixes
* Disabled static library installation by default
* Fix for libusb deprecation
* Renamed STLINK_CHIPID_STM32_L4R9 to STLINK_CHIPID_STM32_L4RX
* Regression: stlink installation under Linux (Debian 9) is broken since #695
* Fixed flash memory map for STM32F72xxx target
* Proper flash page size calculation for STM32F412xx target
* Return correct value on EOF for Semihosting SYS_READ
* FreeBSD defines LIBUSB_API_VERSION instead of LIBUSBX_API_VERSION
-- Luca Boccassi <bluca@debian.org> Fri, 28 Sep 2018 10:26:39 +0100
stlink (1.5.0) unstable; urgency=medium
Release date: 2018-02-16
Major changes and added features:
* Added support of STM32L496xx/4A6xx devices
* Added unknown chip dummy to obtain the serial of the ST-link by a call to st-info --probe
* Added support for STM32F72xx (chip-ID: 0x452) devices
Updates and fixes:
* Fixed verification of flash error for STM32L496x device
* Updated Linux source repositories in README.md: Gentoo, Fedora and RedHat/CentOS
* Updated changelog in debian package
* Added LIB_INSTALL_DIR to correct libs install on 64-bit systems
* Fixed write for microcontroller with RAM size less or equal to 32K
* Fixed memory map for STM32L496xx boards
* Fixed __FILE__ base name extraction
* Added debian/triggers to run ldconfig
* Fixed build on Fedora with GCC 8
-- Luca Boccassi <bluca@debian.org> Fri, 16 Mar 2018 16:56:17 +0000
stlink (1.4.0) unstable; urgency=low
Release date: 2017-07-01
Major changes and added features:
* Allow building of debian package with CPack
* Added support for STM32L011 target
* Added support for flashing second bank on STM32F10x_XL
* Initial support to compile with Microsoft Visual Studio 2017
* Added support for STM32L452 target
Updates and fixes:
* Fixed gdb-server: STM32L0xx has no FP_CTRL register for breakpoints
* Added --flash=n[k][m] command line option to override device model
* Updated libusb to 1.0.21 for Windows
* Fixed low-voltage flashing on STM32F7 devices
* Fixed building with mingw64
* Fixed possible memory leak
* Fixed installation path for shared objects
* Fixed a few -Wformat warnings
* Removed unused defines in mimgw.h
* Skip GTK detection when cross-compiling
* Fixed compilation with GCC 7
* Fixed flashing to 'f0 device' targets
* Fixed wrong counting when flashing
-- Andrew 'Necromant' Andrianov <andrew@ncrmnt.org> Sat, 01 Jul 2017 00:00:00 +0000
stlink (1.3.1) unstable; urgency=low
Release date: 2017-02-25
Major changes and added features:
* Added support for Semihosting `SYS_READC`
* Added support for STM32F413
* Added preliminary support for STM32L011 to see it after probe (chip-ID 0x457)
Updates and fixes:
* cmake/CPackConfig.cmake: Fixup OSX zip filename
* Updated source repositories in README.md: Windows, macOS, Alpine Linux
* Compilation fixes
* Stripped full paths to source files in log
* Fixed incorrect release folder name in docs
* Fixed compilation when path includes spaces
-- Andrew 'Necromant' Andrianov <andrew@ncrmnt.org> Sat, 25 Feb 2017 00:00:00 +0000
stlink (1.3.0) unstable; urgency=low
Release date: 2017-01-28
Major changes and added features:
* Deprecation of autotools (autoconf, automake) and fixed build with MinGW
* Added intel hex file reading for `st-flash`
* Added support for ARM semihosting to `st-util`
* Added manpages (generated with pandoc from Markdown)
* Removal of undocumented `st-term` utility, which is now replaced by `st-util` ARM semihosting feature
* Support serial numbers argument for `st-util` and `st-flash` to probe and control multiple connected programmers
* Merge st-probe tool into st-info
* Added support for native debian packaging
* Rewritten commandline parsing for `st-flash`
* Added `--reset` command to `st-flash`
* st-util should detect when USB commands fail
Chip support added for:
* STM32F401XE: Added memory map for device
* STM32F410RBTx
* STM32F412
* STM32F7xx
* STM32F7x7x
* STM32L0xx Cat2 devices (chip-ID: 0x425)
* STM32L0xx Cat5 devices (chip-ID: 0x447)
* STM32L4xx
* STM32L432
Updates and fixes:
* Fixed "unaligned addr or size" when trying to write a program in RAM
* Fixed flashing on STM32_F3_SMALL
* Fixed STM32L-problem with flash loader
* Don't read the target voltage on startup, because it crashes STM32F100
* Added a useful error message instead of "[!] send_recv"
* Do a JTAG reset prior to reading CPU information when processor is in deep sleep
* Fixed STM32F030 erase error
* Fixed memory map for STM32F7xx
* Redesign of `st-flash` commandline options parsing
* Set SWDCLK and fixed jtag_reset bug
* doc/compiling.md: Add note about installation and ldconfig
* Fixed Release target to generate the man-pages with pandoc
* Fixed Cygwin build
* Reset flash mass erase (MER) bit after mass erase for safety
* Wrong extract command in FindLibUSB.cmake
* Fixed compilation error on Ubuntu 16.10
-- Andrew 'Necromant' Andrianov <andrew@ncrmnt.org> Sat, 28 Jan 2017 00:00:00 +0000
libstlink (1.2.1) unstable; urgency=low
* Initial Debian-packaged release.
-- Andrew 'Necromant' Andrianov <andrew@ncrmnt.org> Sat, 09 Jul 2016 23:16:07 +0300

Wyświetl plik

@ -1,157 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: stlink
Upstream-Contact: Luca Bocassi <bluca@debian.org>
Source: https://github.com/stlink-org/stlink
Disclaimer:
Comment:
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: *
Copyright: 2011-2020 stlink-org
Martin Capitanio [capnm]
Fabien Le Mentec [texane]
Jerry Jacobs [xor-gate]
[Nightwalker-87]
.
Alexey Cherevatenko
Alexey Panarin
Anatoli Klassen [dev26th]
Andrea Mucignat
Andrew Andrianov [necromant]
Andrey Yurovsky
Andy Isaacson
Áron Radics
A. Sheaff
Björn Hauffe
Ihor Bobalo
Breton M. Saunders
Bruno Dal Bo
Burns Fisher
Cheng Guokai (Xim) [chenguokai]
Chris Dew
Chris Hiszpanski
Chris Li
Chris Samuelson
Christian Deussen [nullsub]
Christophe Levantis
Craig Lilley
Dan Dev
Dan Hepler
Daniel Campoverde [alx741]
Daniel O'Connor
Dave Flogeras
Dave Murphy [WinterMute]
Dave Vandervies [dj3vande]
Denis Fokin
Denis Osterland
Dmitry Bravikov [bravikov]
Efe Can İçöz
Ethan Zonca
Fabien Chouteau
Florian Hars
Friedrich Beckmann
Geoffrey Brown
George Talusan [gtalusan]
Georg von Zengen
Giuseppe Barba
Greg Alexander [galexander1]
Greg Meiste [meisteg]
Guillaume Revaillot [grevaillot]
Hakkavélin <hakkavelin@braudrist.lan>
Halt Hammerzeit
htk <htk@vdr.fritz.box>
Ian Griffiths
Jack Peel
Jakub Tyszkowski
Jan Sarenik
Jean-Luc Béchennec
Jean-Marie Lemetayer
Jeff Kent
Jeffrey Nelson
Jens Hoffmann
Jerome Lambourg
Jim Paris
Jiří Netolický
Jerry Nosky [jnosky]
Johannes Taelman
Jonas Danielsson
Jonas Norling
Josh Bialkowski
Karl Palsson [karlp]
Kevlar Harness
Kyle Manna
Lari Lehtomäki
Martin Nowak
Matteo Collina
Max Chen
Maxime Coquelin [mcoquelin-stm32]
Maxime Vincent
Michael Pratt [prattmic]
Michael Sparmann
Mike Szczys
Magnus Lundin [mlu]
mux <freelancer.c@gmail.com>
Ned Konz
Nic McDonald
Nicolas Schodet
Oleksiy Slyshyk [slyshykO]
Olivier Croquette
Olivier Gay
Onno Kortmann
orangeudav <orangeudav@gmail.com>
Pavel Kirienko
Pekka Nikander
Pete Nelson
Peter Zotov
Petteri Aimonen
Piotr Haber
Rene Hopf [rene-dev]
Robin Kreis
Roger Wolff [rewolff]
Rob Spanton
Rytis Karpuska
Sean Simmons
Sergey Alirzaev
Simon Wright
Stany Marcel
Stefan Misik
Sven Wegener
Joel Bodenmann [Tectu]
Tuomo Kaikkonen
Theodore A. Roth
Thomas Gärtner
Tobias Badertscher
Tom de Boer
Tristan Gingold
Uli Köhler
Uwe Bonnes [UweBonnes]
Vadim Kaushan
Vasiliy Glazov [Vascom]
Vegard Storheil Eriksen
Viacheslav Dobromyslov
Victor Mayoral Vilches
William Ransohoff [WRansohoff]
Wojciech A. Koszek
Woodrow Douglass
... and others

Wyświetl plik

@ -0,0 +1,2 @@
* Mon Jun 01 2020 Vasiliy Glazov <vascom@fedoraproject.org> - 1.6.1
- Initial RPM-packaged release

Wyświetl plik

@ -0,0 +1,28 @@
###
# Build package with binaries for Windows
###
# Install this cross-compiler toolchain:
#sudo apt-get install mingw-w64
# x86_64
mkdir build-mingw
cd build-mingw
cmake -DCMAKE_SYSTEM_NAME=Windows \
-DTOOLCHAIN_PREFIX=x86_64-w64-mingw32 \
-DCMAKE_TOOLCHAIN_FILE=./cmake/modules/set_toolchain.cmake ..
make package
cp dist/*.zip ../build/Release/dist
cd ..
rm -rf build-mingw
# i686
mkdir build-mingw
cd build-mingw
cmake -DCMAKE_SYSTEM_NAME=Windows \
-DTOOLCHAIN_PREFIX=i686-w64-mingw32 \
-DCMAKE_TOOLCHAIN_FILE=./cmake/modules/set_toolchain.cmake ..
make package
cp dist/*.zip ../build/Release/dist
cd ..
rm -rf build-mingw

124
contributors.txt 100644
Wyświetl plik

@ -0,0 +1,124 @@
List of contributors to the stlink project:
Alexey Cherevatenko
Alexey Panarin
Anatoli Klassen [dev26th]
Andrea Mucignat
Andrew Andrianov [necromant]
Andrey Yurovsky
Andy Isaacson
Áron Radics
A. Sheaff
Björn Hauffe
Ihor Bobalo
Breton M. Saunders
Bruno Dal Bo
Burns Fisher
Cheng Guokai (Xim) [chenguokai]
Chris Dew
Chris Hiszpanski
Chris Li
Chris Samuelson
Christian Deussen [nullsub]
Christophe Levantis
Craig Lilley
Dan Dev
Dan Hepler
Daniel Campoverde [alx741]
Daniel O'Connor
Dave Flogeras
Dave Murphy [WinterMute]
Dave Vandervies [dj3vande]
Denis Fokin
Denis Osterland
Dmitry Bravikov [bravikov]
Efe Can İçöz
Ethan Zonca
Fabien Chouteau
Florian Hars
Friedrich Beckmann
Geoffrey Brown
George Talusan [gtalusan]
Georg von Zengen
Giuseppe Barba
Greg Alexander [galexander1]
Greg Meiste [meisteg]
Guillaume Revaillot [grevaillot]
Hakkavélin <hakkavelin@braudrist.lan>
Halt Hammerzeit
htk <htk@vdr.fritz.box>
Ian Griffiths
Jack Peel
Jakub Tyszkowski
Jan Sarenik
Jean-Luc Béchennec
Jean-Marie Lemetayer
Jeff Kent
Jeffrey Nelson
Jens Hoffmann
Jerome Lambourg
Jim Paris
Jiří Netolický
Jerry Nosky [jnosky]
Johannes Taelman
Jonas Danielsson
Jonas Norling
Josh Bialkowski
Karl Palsson [karlp]
Kevlar Harness
Kyle Manna
Lari Lehtomäki
Martin Nowak
Matteo Collina
Max Chen
Maxime Coquelin [mcoquelin-stm32]
Maxime Vincent
Michael Pratt [prattmic]
Michael Sparmann
Mike Szczys
Magnus Lundin [mlu]
mux <freelancer.c@gmail.com>
Ned Konz
Nic McDonald
Nicolas Schodet
Oleksiy Slyshyk [slyshykO]
Olivier Croquette
Olivier Gay
Onno Kortmann
orangeudav <orangeudav@gmail.com>
Pavel Kirienko
Pekka Nikander
Pete Nelson
Peter Zotov
Petteri Aimonen
Piotr Haber
Rene Hopf [rene-dev]
Robin Kreis
Roger Wolff [rewolff]
Rob Spanton
Rytis Karpuska
Sean Simmons
Sergey Alirzaev
Simon Wright
Stany Marcel
Stefan Misik
Sven Wegener
Joel Bodenmann [Tectu]
Tuomo Kaikkonen
Theodore A. Roth
Thomas Gärtner
Tobias Badertscher
Tom de Boer
Tristan Gingold
Uli Köhler
Uwe Bonnes [UweBonnes]
Vadim Kaushan
Vasiliy Glazov [Vascom]
Vegard Storheil Eriksen
Viacheslav Dobromyslov
Victor Mayoral Vilches
William Ransohoff [WRansohoff]
Wojciech A. Koszek
Woodrow Douglass
... and others

10
debian/.gitignore vendored
Wyświetl plik

@ -1,10 +0,0 @@
.debhelper
files
debhelper-build-stamp
*.log
*.substvars
libstlink-dev
libstlink
stlink-gui
stlink-tools
tmp

1
debian/compat vendored
Wyświetl plik

@ -1 +0,0 @@
9

53
debian/control vendored
Wyświetl plik

@ -1,53 +0,0 @@
Source: stlink
Priority: optional
Maintainer: Luca Bocassi <bluca@debian.org>
Build-Depends: debhelper (>= 9), cmake, libusb-1.0-0-dev, libgtk-3-dev
Standards-Version: 4.1.3
Section: electronics
Homepage: https://github.com/stlink-org/stlink
Vcs-Git: https://github.com/stlink-org/stlink.git
Vcs-Browser: https://github.com/stlink-org/stlink
Package: libstlink-dev
Section: libdevel
Architecture: any
Depends: libstlink1 (= ${binary:Version}), ${misc:Depends}
Description: OpenSource ST-Link tools replacement.
Flashing tools for STMicroelectronics STM32VL and STM32L. The transport layers
STLINKv1 and STLINKv2 are supported.
.
This package contains the development files for stlink.
Package: libstlink1
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Breaks: libstlink
Replaces: libstlink
Description: OpenSource ST-Link tools replacement.
Flashing tools for STMicroelectronics STM32VL and STM32L. The transport layers
STLINKv1 and STLINKv2 are supported.
.
This package contains the shared library for stlink.
Package: stlink-tools
Architecture: any
Depends: libstlink1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Breaks: libstlink
Replaces: libstlink
Description: OpenSource ST-Link tools replacement.
Flashing tools for STMicroelectronics STM32VL and STM32L. The transport layers
STLINKv1 and STLINKv2 are supported.
.
This package contains commandline utilities for stlink, and modprobe and
udev rules.
Package: stlink-gui
Architecture: any
Depends: libstlink1 (= ${binary:Version}), stlink-tools (= ${binary:Version}),
${shlibs:Depends}, ${misc:Depends}
Description: OpenSource ST-Link tools replacement.
Flashing tools for STMicroelectronics STM32VL and STM32L. The transport layers
STLINKv1 and STLINKv2 are supported.
.
This package contains a GUI tool for stlink.

7
debian/gbp.conf vendored
Wyświetl plik

@ -1,7 +0,0 @@
[buildpackage]
upstream-tag = %(version)s
debian-branch = debian
[dch]
git-log = --first-parent
customizations = /usr/share/doc/git-buildpackage/examples/wrap_cl.py

Wyświetl plik

@ -1,4 +0,0 @@
usr/include/*
usr/lib/*/lib*.a
usr/lib/*/pkg-config/*
usr/lib/*/lib*.so

Wyświetl plik

@ -1 +0,0 @@
usr/lib/*/lib*.so.*

Wyświetl plik

@ -1,125 +0,0 @@
libstlink.so.1 libstlink1 #MINVER#
_parse_version@Base 1.5.0
_stlink_sg_close@Base 1.5.0
_stlink_sg_core_id@Base 1.5.0
_stlink_sg_current_mode@Base 1.5.0
_stlink_sg_enter_jtag_mode@Base 1.5.0
_stlink_sg_enter_swd_mode@Base 1.5.0
_stlink_sg_exit_debug_mode@Base 1.5.0
_stlink_sg_exit_dfu_mode@Base 1.5.0
_stlink_sg_force_debug@Base 1.5.0
_stlink_sg_jtag_reset@Base 1.5.0
_stlink_sg_read_all_regs@Base 1.5.0
_stlink_sg_read_debug32@Base 1.5.0
_stlink_sg_read_mem32@Base 1.5.0
_stlink_sg_read_reg@Base 1.5.0
_stlink_sg_reset@Base 1.5.0
_stlink_sg_run@Base 1.5.0
_stlink_sg_status@Base 1.5.0
_stlink_sg_step@Base 1.5.0
_stlink_sg_version@Base 1.5.0
_stlink_sg_write_debug32@Base 1.5.0
_stlink_sg_write_mem32@Base 1.5.0
_stlink_sg_write_mem8@Base 1.5.0
_stlink_sg_write_reg@Base 1.5.0
_stlink_usb_close@Base 1.5.0
_stlink_usb_core_id@Base 1.5.0
_stlink_usb_current_mode@Base 1.5.0
_stlink_usb_enter_swd_mode@Base 1.5.0
_stlink_usb_exit_debug_mode@Base 1.5.0
_stlink_usb_exit_dfu_mode@Base 1.5.0
_stlink_usb_force_debug@Base 1.5.0
_stlink_usb_jtag_reset@Base 1.5.0
_stlink_usb_read_all_regs@Base 1.5.0
_stlink_usb_read_all_unsupported_regs@Base 1.5.0
_stlink_usb_read_debug32@Base 1.5.0
_stlink_usb_read_mem32@Base 1.5.0
_stlink_usb_read_reg@Base 1.5.0
_stlink_usb_read_unsupported_reg@Base 1.5.0
_stlink_usb_reset@Base 1.5.0
_stlink_usb_run@Base 1.5.0
_stlink_usb_set_swdclk@Base 1.5.0
_stlink_usb_status@Base 1.5.0
_stlink_usb_step@Base 1.5.0
_stlink_usb_target_voltage@Base 1.5.0
_stlink_usb_version@Base 1.5.0
_stlink_usb_write_debug32@Base 1.5.0
_stlink_usb_write_mem32@Base 1.5.0
_stlink_usb_write_mem8@Base 1.5.0
_stlink_usb_write_reg@Base 1.5.0
_stlink_usb_write_unsupported_reg@Base 1.5.0
calculate_F4_sectornum@Base 1.5.0
calculate_F7_sectornum@Base 1.5.0
calculate_L4_page@Base 1.5.0
is_bigendian@Base 1.5.0
read_uint16@Base 1.5.0
read_uint32@Base 1.5.0
send_recv@Base 1.5.0
send_usb_data_only@Base 1.5.0
send_usb_mass_storage_command@Base 1.5.0
stlink_calculate_pagesize@Base 1.5.0
stlink_chip_id@Base 1.5.0
stlink_chipid_get_params@Base 1.5.0
stlink_close@Base 1.5.0
stlink_clr_hw_bp@Base 1.5.0
stlink_core_id@Base 1.5.0
stlink_core_stat@Base 1.5.0
stlink_cpu_id@Base 1.5.0
stlink_current_mode@Base 1.5.0
stlink_enter_swd_mode@Base 1.5.0
stlink_erase_flash_mass@Base 1.5.0
stlink_erase_flash_page@Base 1.5.0
stlink_exit_debug_mode@Base 1.5.0
stlink_exit_dfu_mode@Base 1.5.0
stlink_fcheck_flash@Base 1.5.0
stlink_flash_loader_init@Base 1.5.0
stlink_flash_loader_run@Base 1.5.0
stlink_flash_loader_write_to_sram@Base 1.5.0
stlink_force_debug@Base 1.5.0
stlink_fread@Base 1.5.0
stlink_fwrite_flash@Base 1.5.0
stlink_fwrite_sram@Base 1.5.0
stlink_get_erased_pattern@Base 1.5.0
stlink_is_core_halted@Base 1.5.0
stlink_jtag_reset@Base 1.5.0
stlink_load_device_params@Base 1.5.0
stlink_mwrite_flash@Base 1.5.0
stlink_mwrite_sram@Base 1.5.0
stlink_open_usb@Base 1.5.0
stlink_parse_ihex@Base 1.5.0
stlink_print_data@Base 1.5.0
stlink_probe_usb@Base 1.5.0
stlink_probe_usb_free@Base 1.5.0
stlink_q@Base 1.5.0
stlink_read_all_regs@Base 1.5.0
stlink_read_all_unsupported_regs@Base 1.5.0
stlink_read_debug32@Base 1.5.0
stlink_read_mem32@Base 1.5.0
stlink_read_reg@Base 1.5.0
stlink_read_unsupported_reg@Base 1.5.0
stlink_reset@Base 1.5.0
stlink_run@Base 1.5.0
stlink_run_at@Base 1.5.0
stlink_set_hw_bp@Base 1.5.0
stlink_set_swdclk@Base 1.5.0
stlink_stat@Base 1.5.0
stlink_status@Base 1.5.0
stlink_step@Base 1.5.0
stlink_target_voltage@Base 1.5.0
stlink_v1_open@Base 1.5.0
stlink_v1_open_inner@Base 1.5.0
stlink_verify_write_flash@Base 1.5.0
stlink_version@Base 1.5.0
stlink_write_debug32@Base 1.5.0
stlink_write_dreg@Base 1.5.0
stlink_write_flash@Base 1.5.0
stlink_write_mem32@Base 1.5.0
stlink_write_mem8@Base 1.5.0
stlink_write_reg@Base 1.5.0
stlink_write_unsupported_reg@Base 1.5.0
stm32l1_write_half_pages@Base 1.5.0
ugly_init@Base 1.5.0
ugly_log@Base 1.5.0
write_buffer_to_sram@Base 1.5.0
write_uint16@Base 1.5.0
write_uint32@Base 1.5.0

Wyświetl plik

@ -1 +0,0 @@
3.0 (native)

Wyświetl plik

@ -1,4 +0,0 @@
/usr/bin/stlink-gui*
/usr/share/stlink/stlink-gui.ui
/usr/share/applications/stlink-gui.desktop
/usr/share/icons/hicolor/scalable/apps/stlink-gui.svg

Wyświetl plik

@ -1,3 +0,0 @@
/usr/bin/st-*
lib/udev/rules.d/*.rules
etc/modprobe.d/*.conf

Wyświetl plik

@ -1 +0,0 @@
doc/man/st-*.1

3
debian/watch vendored
Wyświetl plik

@ -1,3 +0,0 @@
version=3
opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/<project>-$1\.tar\.gz/ \
https://github.com/stlink-org/stlink/tags .*/v?(\d\S+)\.tar\.gz

Wyświetl plik

@ -85,8 +85,9 @@ Install the following packages from your package repository:
* `git`
* `gcc` or `clang` or `mingw32-gcc` or `mingw64-gcc` (C-compiler; very likely gcc is already present)
* `build-essential` (on Debian based distros (debian, ubuntu))
* `build-essential` (on Debian based distros (Debian, Ubuntu))
* `cmake` (3.4.2 or later, use the latest version available from the repository)
* `rpm` (on Debian based distros (Debian, Ubuntu), needed for package build with `make package`)
* `pkg-config`
* `libusb-1.0`
* `libusb-1.0-0-dev` (development headers for building)

Wyświetl plik

@ -30,7 +30,7 @@ foreach (manpage ${MANPAGES})
endif ()
if (f AND NOT WIN32)
install(FILES ${f} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
install(FILES ${f} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/man/man1)
unset(f)
endif ()
endforeach ()

Wyświetl plik

@ -1,10 +1,11 @@
Release
=======
This document describes the steps it takes for developers to create a release
This document describes the necessary steps for developers to create a release:
1. Update `.version` with semantic version: `x.x.x`
2. Update `README.md` with semantic version `x.x.x` in commits badge
2. Create and push git tag and commits `git tag x.x.x`
3. Create source tarball/zipfile with `make dist`
4. Create binary package with `make package`
1. Update `CHANGELOG.md` and `cmake/packaging/deb/changelog`
2. Update `.version` with semantic version: `x.x.x`
3. Update `README.md` with semantic version `x.x.x` in commits badge
4. Create and push git tag and commits `git tag x.x.x`
5. Create binary packages (.rpm / .deb / .zip) with `make package && sh ./cmake/packaging/windows/generate_binaries.sh`
6. Upload packages to the [release page](https://github.com/stlink-org/stlink/releases) of this project

Wyświetl plik

@ -68,10 +68,10 @@ Thus no user interaction regarding libusb is necessary.
| Operating System | libusb<br />version | cmake<br />version | End of OS-Support | Notes |
| --- | --- | --- | --- | --- |
| CentOS 7 | 1.0.21 | **2.8.12.2** | | named `libusbx`, but `libusb`-codebase is used |
| CentOS 7 | 1.0.21 | **2.8.12.2** | | named `libusbx`, but<br />`libusb`-codebase is used |
| Debian 8 (Jessie) | 1.0.**19** | 3.**0.2** | Jun 2020 |
| Ubuntu 14.04 LTS (Trusty Tahr) | 1.0.**17** | **2.8.12.2** | Apr 2019 |
| CentOS 6 | 1.0.**9** | **2.8.12.2** | Dec 2020 | named `libusbx`, but `libusb`-codebase is used |
| CentOS 6 | 1.0.**9** | **2.8.12.2** | Dec 2020 | named `libusbx`, but<br />`libusb`-codebase is used |
| Slackware 14.1 | 1.0.**9** | **2.8.12** | |
| Slackware 14.0 | 1.0.**9** | **2.8.8** | |

Wyświetl plik

@ -1,9 +1,9 @@
@echo off
cd ..
@echo on
mkdir build-mingw
cd build-mingw
set PATH=C:\Program Files (x86)\CMake\bin;C:\Program Files\CMake\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-win32-sjlj-rt_v6-rev0\mingw64\bin;%PATH%
cmake -G "MinGW Makefiles" ..
mingw32-make
mingw32-make install DESTDIR=_install
mingw32-make install DESTDIR=install
mingw32-make package

Wyświetl plik

@ -2,40 +2,40 @@
# Build GUI
###
## GUI-Building requires the presence of a GTK3 toolset
if (NOT GTK3_FOUND)
message(STATUS "GTK3 not found!")
return() # no GTK3 present => no GUI build
else (GTK3_FOUND)
message(STATUS "Found GTK3: -I${GTK3_INCLUDE_DIRS}, ${GTK3_LIBRARIES}")
endif ()
include_directories(SYSTEM ${GTK3_INCLUDE_DIRS})
set(GUI_SOURCES gui.c gui.h)
## stlink-gui-local
add_executable(stlink-gui-local ${GUI_SOURCES})
set_target_properties(
stlink-gui-local PROPERTIES
COMPILE_DEFINITIONS STLINK_UI_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
# Note: ${CMAKE_CURRENT_SOURCE_DIR} is src/stlink-gui
)
target_link_libraries(stlink-gui-local ${STLINK_LIB_STATIC} ${GTK3_LDFLAGS} ${SSP_LIB})
## stlink-gui
add_executable(stlink-gui ${GUI_SOURCES})
set_target_properties(
stlink-gui PROPERTIES
COMPILE_DEFINITIONS STLINK_UI_DIR="${CMAKE_INSTALL_PREFIX}/bin"
# Note: ${CMAKE_INSTALL_PREFIX} defaults to /usr/local
)
target_link_libraries(stlink-gui ${STLINK_LIB_STATIC} ${GTK3_LDFLAGS} ${SSP_LIB})
install(TARGETS stlink-gui DESTINATION bin)
install(FILES stlink-gui.ui DESTINATION bin)
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(FILES stlink-gui.desktop DESTINATION share/applications) # Install desktop application entry
install(FILES icons/stlink-gui.svg DESTINATION share/icons/hicolor/scalable/apps) # Install icon
if (NOT WIN32)
## GUI-Building requires the presence of a GTK3 toolset
if (NOT GTK3_FOUND)
message(STATUS "GTK3 not found!")
return() # no GTK3 present => no GUI build
else (GTK3_FOUND)
message(STATUS "Found GTK3: -I${GTK3_INCLUDE_DIRS}, ${GTK3_LIBRARIES}")
include_directories(SYSTEM ${GTK3_INCLUDE_DIRS})
# Install desktop application entry
install(FILES stlink-gui.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/applications)
# Install icons
install(FILES icons/stlink-gui.svg
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/icons/hicolor/scalable/apps)
set(GUI_SOURCES gui.c gui.h)
## stlink-gui-local
add_executable(stlink-gui-local ${GUI_SOURCES})
file(COPY stlink-gui.ui DESTINATION ${CMAKE_BINARY_DIR}/bin)
set_target_properties(stlink-gui-local PROPERTIES
COMPILE_DEFINITIONS STLINK_UI_DIR="${CMAKE_BINARY_DIR}/bin")
target_link_libraries(stlink-gui-local ${STLINK_LIB_SHARED} ${SSP_LIB} ${GTK3_LDFLAGS})
## stlink-gui
add_executable(stlink-gui ${GUI_SOURCES})
install(FILES stlink-gui.ui DESTINATION ${CMAKE_INSTALL_BINDIR})
set_target_properties(stlink-gui PROPERTIES
COMPILE_DEFINITIONS STLINK_UI_DIR="${CMAKE_INSTALL_PREFIX}/bin")
target_link_libraries(stlink-gui ${STLINK_LIB_SHARED} ${SSP_LIB} ${GTK3_LDFLAGS})
install(TARGETS stlink-gui DESTINATION ${CMAKE_INSTALL_BINDIR})
endif ()
endif ()

Wyświetl plik

@ -781,8 +781,7 @@ static void stlink_gui_build_ui (STlinkGUI *gui) {
GtkListStore *filemem_store;
gchar *ui_file = STLINK_UI_DIR "/stlink-gui.ui";
if (!g_file_test (ui_file, G_FILE_TEST_EXISTS))
ui_file = "stlink-gui.ui";
if (!g_file_test (ui_file, G_FILE_TEST_EXISTS)) ui_file = "stlink-gui.ui";
builder = gtk_builder_new ();
if (!gtk_builder_add_from_file (builder, ui_file, NULL)) {
g_printerr ("Failed to load UI file: %s\n", ui_file);

Wyświetl plik

@ -6,11 +6,11 @@ set(TESTEXEC usb sg)
foreach (test ${TESTEXEC})
add_executable(test-${test} ${test}.c)
add_dependencies(test-${test} ${STLINK_LIB_STATIC})
target_link_libraries(test-${test} ${STLINK_LIB_STATIC} ${SSP_LIB})
add_dependencies(test-${test} ${STLINK_LIB_SHARED})
target_link_libraries(test-${test} ${STLINK_LIB_SHARED} ${SSP_LIB})
add_test(test-${test} ${CMAKE_BINARY_DIR}/bin/test-${test})
endforeach ()
add_executable(test-flash flash.c "${CMAKE_SOURCE_DIR}/src/tools/flash_opts.c")
target_link_libraries(test-flash ${STLINK_LIB_STATIC} ${SSP_LIB})
target_link_libraries(test-flash ${STLINK_LIB_SHARED} ${SSP_LIB})
add_test(test-flash ${CMAKE_BINARY_DIR}/bin/test-flash)