summaryrefslogtreecommitdiff
path: root/development/STM32CubeIDE
diff options
context:
space:
mode:
Diffstat (limited to 'development/STM32CubeIDE')
-rw-r--r--development/STM32CubeIDE/README27
-rw-r--r--development/STM32CubeIDE/STM32CubeIDE.SlackBuild95
-rw-r--r--development/STM32CubeIDE/STM32CubeIDE.info10
-rw-r--r--development/STM32CubeIDE/doinst.sh28
-rw-r--r--development/STM32CubeIDE/slack-desc19
-rw-r--r--development/STM32CubeIDE/st-stm32cubeide.desktop11
6 files changed, 190 insertions, 0 deletions
diff --git a/development/STM32CubeIDE/README b/development/STM32CubeIDE/README
new file mode 100644
index 0000000000..92dab7c0a3
--- /dev/null
+++ b/development/STM32CubeIDE/README
@@ -0,0 +1,27 @@
+STM32CubeIDE is an advanced C/C++ development platform with peripheral
+configuration, code generation, code compilation, and debug features
+for STM32 microcontrollers and microprocessors. It is based on
+the ECLIPSE/CDT framework and GCC toolchain for the development,
+and GDB for the debugging.
+
+STM32CubeIDE integrates all STM32CubeMX functionalities to offer
+all-in-one tool experience.
+
+STM32CubeIDE includes build and stack analyzers that provide the user
+with useful information about project status and memory requirements.
+
+STM32CubeIDE also includes standard and advanced debugging features
+including views of CPU core registers, memories, and peripheral
+registers, as well as live variable watch, Serial Wire Viewer
+interface, or fault analyzer.
+
+NOTES:
+1. This SlackBuild repackages the official binary installer.
+2. Direct link to download the source tarball is not available.
+ You need to go to the website and download the tarball manually.
+3. (TODO). I haven't paid attention to J-Link udev rules and
+ ST-Link Server. These have to wait for better days.
+4. Remember to reload udev rules after installing/upgrading
+ the package, so that you can access your debugger:
+
+ $ /etc/rc.d/rc.udev reload
diff --git a/development/STM32CubeIDE/STM32CubeIDE.SlackBuild b/development/STM32CubeIDE/STM32CubeIDE.SlackBuild
new file mode 100644
index 0000000000..3a4a4d7b8c
--- /dev/null
+++ b/development/STM32CubeIDE/STM32CubeIDE.SlackBuild
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+# Slackware build script for STM32CubeIDE
+
+# Copyright 2019 Andrzej Telszewski, Szczecin
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "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 AUTHOR 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.
+
+PRGNAM=STM32CubeIDE
+VERSION=${VERSION:-1.1.0_4551_20191014_1140}
+ST_LINK_UDEV_RULES_VERSION=${ST_LINK_UDEV_RULES_VERSION:-1.0.2-2}
+SRCNAM=st-stm32cubeide_${VERSION}_amd64
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+# Only x86_64 is supported.
+ARCH=x86_64
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir -p $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+unzip $CWD/en.en.${SRCNAM}.sh.zip
+
+chmod +x ${SRCNAM}.sh
+$(pwd)/${SRCNAM}.sh \
+ --noexec --nox11 --nochown --target $(pwd)
+
+# Unpack and install STM32CubeIDE.
+mkdir -p $PKG/opt/st/stm32cubeide
+tar zvxf st-stm32cubeide_${VERSION}_amd64.tar.gz -C $PKG/opt/st/stm32cubeide
+( cd $PKG
+ chown -R root:root .
+ chmod -R a-st,u+rwX,go-w+rX .
+)
+
+# Unpack ST-Link Udev rules.
+chmod +x st-stlink-udev-rules-$ST_LINK_UDEV_RULES_VERSION-linux-noarch.sh
+$(pwd)/st-stlink-udev-rules-$ST_LINK_UDEV_RULES_VERSION-linux-noarch.sh \
+ --noexec --nox11 --nochown --target st-stlink-udev-rules
+tar zvxf st-stlink-udev-rules/st-stlink-udev-rules-$ST_LINK_UDEV_RULES_VERSION-linux-all.tar.gz \
+ -C st-stlink-udev-rules
+tar zvxf st-stlink-udev-rules/st-stlink-udev-rules.sw \
+ -C st-stlink-udev-rules
+
+# Install ST-Link Udev rules.
+mkdir -p $PKG/etc/udev/rules.d
+( cd st-stlink-udev-rules/etc/udev/rules.d
+ for rule in 49-stlinkv1.rules 49-stlinkv2-1.rules 49-stlinkv2.rules 49-stlinkv3.rules; do
+ cat $rule > $PKG/etc/udev/rules.d/$rule.new
+ done
+)
+
+# Strip binaries and libraries.
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Install desktop shortcut.
+mkdir -p $PKG/usr/share/applications
+cat $CWD/st-stm32cubeide.desktop > $PKG/usr/share/applications/st-stm32cubeide.desktop
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/STM32CubeIDE/STM32CubeIDE.info b/development/STM32CubeIDE/STM32CubeIDE.info
new file mode 100644
index 0000000000..bb96dec466
--- /dev/null
+++ b/development/STM32CubeIDE/STM32CubeIDE.info
@@ -0,0 +1,10 @@
+PRGNAM="STM32CubeIDE"
+VERSION="1.1.0"
+HOMEPAGE="https://www.st.com/en/development-tools/stm32cubeide.html"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://www.st.com/en/development-tools/stm32cubeide.html#get-software"
+MD5SUM_x86_64="8494576f824fd6fa0491413067be02dd"
+REQUIRES=""
+MAINTAINER="Andrzej Telszewski"
+EMAIL="atelszewski@gmail.com"
diff --git a/development/STM32CubeIDE/doinst.sh b/development/STM32CubeIDE/doinst.sh
new file mode 100644
index 0000000000..f9fb4daf41
--- /dev/null
+++ b/development/STM32CubeIDE/doinst.sh
@@ -0,0 +1,28 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
+config etc/udev/rules.d/49-stlinkv1.rules.new
+config etc/udev/rules.d/49-stlinkv2-1.rules.new
+config etc/udev/rules.d/49-stlinkv2.rules.new
+config etc/udev/rules.d/49-stlinkv3.rules.new
diff --git a/development/STM32CubeIDE/slack-desc b/development/STM32CubeIDE/slack-desc
new file mode 100644
index 0000000000..394ef26d1e
--- /dev/null
+++ b/development/STM32CubeIDE/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+STM32CubeIDE: STM32CubeIDE (C/C++ development platform for STM32 microcontrollers)
+STM32CubeIDE:
+STM32CubeIDE: STM32CubeIDE is an advanced C/C++ development platform with
+STM32CubeIDE: peripheral configuration, code generation, code compilation,
+STM32CubeIDE: and debug features for STM32 microcontrollers and microprocessors.
+STM32CubeIDE: It is based on the ECLIPSE/CDT framework and GCC toolchain
+STM32CubeIDE: for the development, and GDB for the debugging.
+STM32CubeIDE:
+STM32CubeIDE: Homepage: https://www.st.com/en/development-tools/stm32cubeide.html
+STM32CubeIDE:
+STM32CubeIDE:
diff --git a/development/STM32CubeIDE/st-stm32cubeide.desktop b/development/STM32CubeIDE/st-stm32cubeide.desktop
new file mode 100644
index 0000000000..efa694fcd2
--- /dev/null
+++ b/development/STM32CubeIDE/st-stm32cubeide.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=STMicroelectronics STM32CubeIDE
+Comment=STMicroelectronics STM32CubeIDE
+GenericName=STM32CubeIDE
+Exec=/opt/st/stm32cubeide/stm32cubeide %F
+Icon=/opt/st/stm32cubeide/icon.xpm
+Path=/opt/st/stm32cubeide/
+Terminal=false
+StartupNotify=true
+Type=Application
+Categories=Development