aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--development/stm32cubeprog/README23
-rw-r--r--development/stm32cubeprog/doinst.sh13
-rw-r--r--development/stm32cubeprog/patches/AnalyticsPanelsConsoleHelper.java27
-rw-r--r--development/stm32cubeprog/patches/CheckedHelloPorgrammerPanelConsoleHelper.java28
-rw-r--r--development/stm32cubeprog/patches/FinishProgrammerPanelConsoleHelper.java27
-rw-r--r--development/stm32cubeprog/patches/TargetProgrammerPanelConsoleHelper.java27
-rw-r--r--development/stm32cubeprog/slack-desc19
-rw-r--r--development/stm32cubeprog/stm32cubeprog-trustedpackagecreator.desktop10
-rw-r--r--development/stm32cubeprog/stm32cubeprog.SlackBuild136
-rw-r--r--development/stm32cubeprog/stm32cubeprog.desktop10
-rw-r--r--development/stm32cubeprog/stm32cubeprog.hint1
-rw-r--r--development/stm32cubeprog/stm32cubeprog.info10
12 files changed, 331 insertions, 0 deletions
diff --git a/development/stm32cubeprog/README b/development/stm32cubeprog/README
new file mode 100644
index 0000000000..beadd453d7
--- /dev/null
+++ b/development/stm32cubeprog/README
@@ -0,0 +1,23 @@
+STM32CubeProgrammer (STM32CubeProg) is an all-in-one multi-OS software
+tool for programming STM32 products.
+
+It provides an easy-to-use and efficient environment for reading,
+writing, and verifying device memory through both the debug interface
+(JTAG and SWD) and the bootloader interface (UART and USB DFU, I2C, SPI,
+and CAN).
+
+STM32CubeProgrammer offers a wide range of features to program STM32
+internal memories (such as flash, RAM, and OTP) as well as external
+memories.
+
+STM32CubeProgrammer also allows option programming and upload,
+programming content verification, and programming automation through
+scripting.
+
+NOTE:
+
+- The source tarball has to be downloaded manually from the website.
+ Choose STM32CubePrg-Lin package.
+- 7zip and zulu-openjdk* are only used for repackaging the upstream
+ tarball and are not used during the run-time. Different version
+ of JDK _might_ work as well (not tested.)
diff --git a/development/stm32cubeprog/doinst.sh b/development/stm32cubeprog/doinst.sh
new file mode 100644
index 0000000000..aea0f894eb
--- /dev/null
+++ b/development/stm32cubeprog/doinst.sh
@@ -0,0 +1,13 @@
+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
diff --git a/development/stm32cubeprog/patches/AnalyticsPanelsConsoleHelper.java b/development/stm32cubeprog/patches/AnalyticsPanelsConsoleHelper.java
new file mode 100644
index 0000000000..678084a35b
--- /dev/null
+++ b/development/stm32cubeprog/patches/AnalyticsPanelsConsoleHelper.java
@@ -0,0 +1,27 @@
+package com.st.CustomPanels;
+
+import java.util.Properties;
+
+import com.izforge.izpack.api.data.InstallData;
+import com.izforge.izpack.installer.console.AbstractConsolePanel;
+import com.izforge.izpack.util.Console;
+
+
+public class AnalyticsPanelsConsoleHelper extends AbstractConsolePanel {
+ public AnalyticsPanelsConsoleHelper()
+ {
+ super(null);
+ }
+
+ @Override
+ public boolean run(InstallData installData, Properties properties)
+ {
+ return true;
+ }
+
+ @Override
+ public boolean run(InstallData installData, Console console)
+ {
+ return true;
+ }
+}
diff --git a/development/stm32cubeprog/patches/CheckedHelloPorgrammerPanelConsoleHelper.java b/development/stm32cubeprog/patches/CheckedHelloPorgrammerPanelConsoleHelper.java
new file mode 100644
index 0000000000..b413067084
--- /dev/null
+++ b/development/stm32cubeprog/patches/CheckedHelloPorgrammerPanelConsoleHelper.java
@@ -0,0 +1,28 @@
+package com.st.CustomPanels;
+
+import java.util.Properties;
+
+import com.izforge.izpack.api.data.InstallData;
+import com.izforge.izpack.installer.console.AbstractConsolePanel;
+import com.izforge.izpack.util.Console;
+
+
+public class CheckedHelloPorgrammerPanelConsoleHelper extends AbstractConsolePanel {
+ public CheckedHelloPorgrammerPanelConsoleHelper()
+ {
+ super(null);
+ }
+
+ @Override
+ public boolean run(InstallData installData, Properties properties)
+ {
+ return true;
+ }
+
+ @Override
+ public boolean run(InstallData installData, Console console)
+ {
+ return true;
+ }
+}
+
diff --git a/development/stm32cubeprog/patches/FinishProgrammerPanelConsoleHelper.java b/development/stm32cubeprog/patches/FinishProgrammerPanelConsoleHelper.java
new file mode 100644
index 0000000000..842393a998
--- /dev/null
+++ b/development/stm32cubeprog/patches/FinishProgrammerPanelConsoleHelper.java
@@ -0,0 +1,27 @@
+package com.st.CustomPanels;
+
+import java.util.Properties;
+
+import com.izforge.izpack.api.data.InstallData;
+import com.izforge.izpack.installer.console.AbstractConsolePanel;
+import com.izforge.izpack.util.Console;
+
+
+public class FinishProgrammerPanelConsoleHelper extends AbstractConsolePanel {
+ public FinishProgrammerPanelConsoleHelper()
+ {
+ super(null);
+ }
+
+ @Override
+ public boolean run(InstallData installData, Properties properties)
+ {
+ return true;
+ }
+
+ @Override
+ public boolean run(InstallData installData, Console console)
+ {
+ return true;
+ }
+}
diff --git a/development/stm32cubeprog/patches/TargetProgrammerPanelConsoleHelper.java b/development/stm32cubeprog/patches/TargetProgrammerPanelConsoleHelper.java
new file mode 100644
index 0000000000..9782071541
--- /dev/null
+++ b/development/stm32cubeprog/patches/TargetProgrammerPanelConsoleHelper.java
@@ -0,0 +1,27 @@
+package com.st.CustomPanels;
+
+import java.util.Properties;
+
+import com.izforge.izpack.api.data.InstallData;
+import com.izforge.izpack.installer.console.AbstractConsolePanel;
+import com.izforge.izpack.util.Console;
+
+
+public class TargetProgrammerPanelConsoleHelper extends AbstractConsolePanel {
+ public TargetProgrammerPanelConsoleHelper()
+ {
+ super(null);
+ }
+
+ @Override
+ public boolean run(InstallData installData, Properties properties)
+ {
+ return true;
+ }
+
+ @Override
+ public boolean run(InstallData installData, Console console)
+ {
+ return true;
+ }
+}
diff --git a/development/stm32cubeprog/slack-desc b/development/stm32cubeprog/slack-desc
new file mode 100644
index 0000000000..fa614a93b7
--- /dev/null
+++ b/development/stm32cubeprog/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------------------------------------------------------|
+stm32cubeprog: STM32CubeProg (all-in-one tool for programming STM32 products)
+stm32cubeprog:
+stm32cubeprog: STM32CubeProg provides an easy-to-use and efficient environment for
+stm32cubeprog: reading, writing, and verifying device memory through both the debug
+stm32cubeprog: interface (JTAG and SWD) and the bootloader interface (UART and USB
+stm32cubeprog: DFU, I2C, SPI, and CAN).
+stm32cubeprog:
+stm32cubeprog: Homepage: https://www.st.com/en/development-tools/stm32cubeprog.html
+stm32cubeprog:
+stm32cubeprog:
+stm32cubeprog:
diff --git a/development/stm32cubeprog/stm32cubeprog-trustedpackagecreator.desktop b/development/stm32cubeprog/stm32cubeprog-trustedpackagecreator.desktop
new file mode 100644
index 0000000000..1ff031c1ac
--- /dev/null
+++ b/development/stm32cubeprog/stm32cubeprog-trustedpackagecreator.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=STM32 Trusted Package Creator
+GenericName=STM32 Trusted Package Creator
+Exec=/opt/stm32cubeprog/bin/STM32TrustedPackageCreator
+Icon=stm32cubeprog-trustedpackagecreator
+Path=/opt/stm32cubeprog/bin
+Terminal=false
+StartupNotify=true
+Type=Application
+Categories=Development
diff --git a/development/stm32cubeprog/stm32cubeprog.SlackBuild b/development/stm32cubeprog/stm32cubeprog.SlackBuild
new file mode 100644
index 0000000000..3c6b32ce3a
--- /dev/null
+++ b/development/stm32cubeprog/stm32cubeprog.SlackBuild
@@ -0,0 +1,136 @@
+#!/bin/bash
+
+# Slackware build script for STM32CubeProgrammer (STM32CubeProg)
+
+# Copyright 2024 Andrzej Telszewski, Koszalin
+# 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=stm32cubeprog
+VERSION=${VERSION:-2.18.0}
+SRCNAM=en.stm32cubeprg-lin-v$(echo $VERSION | tr . -).zip
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -eu
+
+if [ "${ARCH}" != x86_64 ]; then
+ echo "error: Only x86_64 is supported, exiting."
+ exit 1
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+
+# NOTE:
+# Heavily based on https://aur.archlinux.org/packages/stm32cubeprog
+
+rm -rf $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+
+unzip $CWD/$SRCNAM
+
+javac --release 8 -cp SetupSTM32CubeProgrammer-${VERSION}.exe -d . \
+ $CWD/patches/AnalyticsPanelsConsoleHelper.java \
+ $CWD/patches/CheckedHelloPorgrammerPanelConsoleHelper.java \
+ $CWD/patches/TargetProgrammerPanelConsoleHelper.java \
+ $CWD/patches/FinishProgrammerPanelConsoleHelper.java
+
+7z a SetupSTM32CubeProgrammer-${VERSION}.exe \
+ com/st/CustomPanels/AnalyticsPanelsConsoleHelper.class \
+ com/st/CustomPanels/CheckedHelloPorgrammerPanelConsoleHelper.class \
+ com/st/CustomPanels/TargetProgrammerPanelConsoleHelper.class \
+ com/st/CustomPanels/FinishProgrammerPanelConsoleHelper.class
+
+mkdir -p $PKG/opt/$PRGNAM
+
+java -DINSTALL_PATH=$PKG/opt/$PRGNAM \
+ -jar ./SetupSTM32CubeProgrammer-${VERSION}.exe -options-system
+
+rm -rf $PKG/opt/$PRGNAM/uninstaller
+
+chown -R root:root $PKG/opt/$PRGNAM
+chmod -R a-st,u+rwX,go-w+rX $PKG/opt/$PRGNAM
+
+# NOTE:
+#
+# Do _not_ strip binaries/libraries. Some break because of stripping,
+# and some are for STM32 ARM architecture.
+
+mkdir -p $PKG/usr/bin
+
+for _cmd in STM32_Programmer_CLI \
+ STM32_Programmer.sh \
+ STM32MP_KeyGen_CLI \
+ STM32MP_SigningTool_CLI \
+ STM32TrustedPackageCreator_CLI; do
+ ln -sf /opt/$PRGNAM/bin/$_cmd $PKG/usr/bin/$_cmd
+done
+
+magick $PKG/opt/stm32cubeprog/util/Programmer.ico -set filename:mysize \
+ "%wx%h" "stm32cubeprog-%[filename:mysize].png"
+magick $PKG/opt/stm32cubeprog/util/STM32TrustedPackageCreator.ico -set filename:mysize \
+ "%wx%h" "stm32cubeprog-trustedpackagecreator-%[filename:mysize].png"
+
+for size in 256 128 64 48 32 24 16; do
+ mkdir -p $PKG/usr/share/icons/hicolor/${size}x${size}/apps
+ mv stm32cubeprog-${size}x${size}.png \
+ $PKG/usr/share/icons/hicolor/${size}x${size}/apps/stm32cubeprog.png
+ mv stm32cubeprog-trustedpackagecreator-${size}x${size}.png \
+ $PKG/usr/share/icons/hicolor/${size}x${size}/apps/stm32cubeprog-trustedpackagecreator.png
+done
+
+mkdir -p $PKG/usr/share/applications
+cat $CWD/stm32cubeprog.desktop > \
+ $PKG/usr/share/applications/stm32cubeprog.desktop
+cat $CWD/stm32cubeprog-trustedpackagecreator.desktop > \
+ $PKG/usr/share/applications/stm32cubeprog-trustedpackagecreator.desktop
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp $PKG/opt/$PRGNAM/doc/{Readme,license}.txt $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
diff --git a/development/stm32cubeprog/stm32cubeprog.desktop b/development/stm32cubeprog/stm32cubeprog.desktop
new file mode 100644
index 0000000000..bad6fa6a6b
--- /dev/null
+++ b/development/stm32cubeprog/stm32cubeprog.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=STM32CubeProgrammer
+GenericName=STM32CubeProgrammer
+Exec=/opt/stm32cubeprog/bin/STM32CubeProgrammer
+Icon=stm32cubeprog
+Path=/opt/stm32cubeprog/bin
+Terminal=false
+StartupNotify=true
+Type=Application
+Categories=Development
diff --git a/development/stm32cubeprog/stm32cubeprog.hint b/development/stm32cubeprog/stm32cubeprog.hint
new file mode 100644
index 0000000000..76a97c7243
--- /dev/null
+++ b/development/stm32cubeprog/stm32cubeprog.hint
@@ -0,0 +1 @@
+DOWNLOAD="no"
diff --git a/development/stm32cubeprog/stm32cubeprog.info b/development/stm32cubeprog/stm32cubeprog.info
new file mode 100644
index 0000000000..f554fea156
--- /dev/null
+++ b/development/stm32cubeprog/stm32cubeprog.info
@@ -0,0 +1,10 @@
+PRGNAM="stm32cubeprog"
+VERSION="2.18.0"
+HOMEPAGE="https://www.st.com/en/development-tools/stm32cubeprog.html"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://www.st.com/en/development-tools/stm32cubeprog.html"
+MD5SUM_x86_64="eee410dc8e2c0c7405ae56325b5bc0f2"
+REQUIRES="7zip zulu-openjdk17"
+MAINTAINER="Andrzej Telszewski"
+EMAIL="andrzej@telszewski.com"