new file: .devcontainer/devcontainer.json

new file:   CubeClt/Dockerfile
	new file:   CubeClt/Resources/CubeCLT/install.sh
	new file:   CubeClt/Resources/Scripts/reinstall-cmake.sh
	new file:   CubeClt/build_and_publish.sh
	new file:   CubeMx/Dockerfile
	new file:   CubeMx/Resources/CubeMX/install-cubemx.sh
	new file:   CubeMx/build_and_publish.sh
	modified:   README.md
This commit is contained in:
2025-03-12 23:45:57 +01:00
parent a33d02941c
commit e2627bcd52
9 changed files with 219 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Set the script to fail if any command fails.
set -e
echo "Installing CubeCLT..."
# Extract zip file
unzip -q /tmp/CubeCLT/en.st-stm32cubeclt_1.17* -d /tmp/cubeclt
cd /tmp/cubeclt && chmod +x *.sh
export LICENSE_ALREADY_ACCEPTED=1
/tmp/cubeclt/*.sh --target . --noexec
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y /tmp/cubeclt/st-stlink-udev-rules*.deb
apt-get install -y /tmp/cubeclt/st-stlink-server*.deb
apt-get install -y /tmp/cubeclt/st-stm32cubeclt*.deb
rm -rf /tmp/cubeclt

View File

@@ -0,0 +1,59 @@
#!/usr/bin/env bash
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
#
set -e
CMAKE_VERSION=${1:-"none"}
if [ "${CMAKE_VERSION}" = "none" ]; then
echo "No CMake version specified, skipping CMake reinstallation"
exit 0
fi
# Cleanup temporary directory and associated files when exiting the script.
cleanup() {
EXIT_CODE=$?
set +e
if [[ -n "${TMP_DIR}" ]]; then
echo "Executing cleanup of tmp files"
rm -Rf "${TMP_DIR}"
fi
exit $EXIT_CODE
}
trap cleanup EXIT
echo "Installing CMake..."
apt-get -y purge --auto-remove cmake
mkdir -p /opt/cmake
architecture=$(dpkg --print-architecture)
case "${architecture}" in
arm64)
ARCH=aarch64 ;;
amd64)
ARCH=x86_64 ;;
*)
echo "Unsupported architecture ${architecture}."
exit 1
;;
esac
CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh"
CMAKE_CHECKSUM_NAME="cmake-${CMAKE_VERSION}-SHA-256.txt"
TMP_DIR=$(mktemp -d -t cmake-XXXXXXXXXX)
echo "${TMP_DIR}"
cd "${TMP_DIR}"
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_BINARY_NAME}" -O
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_CHECKSUM_NAME}" -O
sha256sum -c --ignore-missing "${CMAKE_CHECKSUM_NAME}"
sh "${TMP_DIR}/${CMAKE_BINARY_NAME}" --prefix=/opt/cmake --skip-license
ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest