Package Details: stm32cubeprog 2.18.0-1

Git Clone URL: https://aur.archlinux.org/stm32cubeprog.git (read-only, click to copy)
Package Base: stm32cubeprog
Description: An all-in-one multi-OS software tool for programming STM32 products.
Upstream URL: https://www.st.com/en/development-tools/stm32cubeprog.html
Keywords: programmer stm32
Licenses: custom:SLA0048
Provides: stm32cubeprogrammer
Submitter: yjun
Maintainer: taotieren (GPereira, akumaexs, CloverGit)
Last Packager: CloverGit
Votes: 8
Popularity: 0.004239
First Submitted: 2021-01-15 20:39 (UTC)
Last Updated: 2024-11-28 13:06 (UTC)

Dependencies (32)

Required by (0)

Sources (6)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 Next › Last »

yjun commented on 2021-12-08 08:09 (UTC)

@Seas0 Thanks! done.

Seas0 commented on 2021-12-08 03:35 (UTC) (edited on 2021-12-08 03:36 (UTC) by Seas0)

Just apply this patch(it updates stlink updater file name and checksum, and bumps its version to 3.9.3):

diff --git a/.SRCINFO b/.SRCINFO
index f23acbc..95ae791 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
 pkgbase = stm32cubeprog
    pkgdesc = An all-in-one multi-OS software tool for programming STM32 products.
    pkgver = 2.9.0
-   pkgrel = 3
+   pkgrel = 4
    url = https://www.st.com/en/development-tools/stm32cubeprog.html
    arch = x86_64
    license = custom:SLA0048
@@ -13,10 +13,10 @@ pkgbase = stm32cubeprog
    provides = stm32cubeprogrammer
    options = !strip
    source = en.stm32cubeprg-lin_v2-9-0.zip::https://www.st.com/content/ccc/resource/technical/software/utility/group0/af/f8/e3/60/56/b9/42/9d/stm32cubeprg-lin_v2-9-0/files/stm32cubeprg-lin_v2-9-0.zip/jcr:content/translations/en.stm32cubeprg-lin_v2-9-0.zip
-   source = en.stsw-link007_V2-38-27.zip::https://st.com/content/ccc/resource/technical/software/firmware/group1/4e/80/8d/29/e0/c7/4e/13/stsw-link007_V2-38-27/files/stsw-link007_V2-38-27.zip/jcr:content/translations/en.stsw-link007_V2-38-27.zip
+   source = en.stsw-link007-v3-9-3.zip::https://www.st.com/content/ccc/resource/technical/software/firmware/group1/16/ac/ae/04/0b/01/42/5a/stsw-link007-v3-9-3/files/stsw-link007-v3-9-3.zip/jcr:content/translations/en.stsw-link007-v3-9-3.zip
    source = stm32cubeprog.xdotool
    sha256sums = 53b3648bd0297330b4e82eaba80d69d9fa50ac8e57a41c32d00ac32ca77ccad9
-   sha256sums = bb0c1849aa26fac956618c07cb81e29c68676d28ae630ce7a2498968dcfef33e
+   sha256sums = 56666bd0985fa403008b0a88194266a92dcf346232fa0f4de8a9d072bee62318
    sha256sums = 3194268b73572c4e0fb69e51145f989e85c0415d1c2d932d115708b0c514b005

 pkgname = stm32cubeprog
diff --git a/PKGBUILD b/PKGBUILD
index 4d0c446..e5e1f6a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,8 +6,8 @@
 pkgname="stm32cubeprog"
 _pkgname="STM32CubeProgrammer"
 pkgver=2.9.0
-_stlink_updater_ver=2.38.27
-pkgrel=3
+_stlink_updater_ver=3.9.3
+pkgrel=4
 pkgdesc="An all-in-one multi-OS software tool for programming STM32 products."
 arch=('x86_64')
 url="https://www.st.com/en/development-tools/stm32cubeprog.html"
@@ -32,17 +32,18 @@ provides=("${pkgname}rammer")
 options=('!strip')
 _pkg_main_name="${pkgname//prog/prg}-lin_v${pkgver//./-}"
 _pkg_main_url_index="af/f8/e3/60/56/b9/42/9d"
-_stlink_updater_name="stsw-link007_V${_stlink_updater_ver//./-}"
-_stlink_url_index="4e/80/8d/29/e0/c7/4e/13"
+_stlink_updater_name="stsw-link007-v${_stlink_updater_ver//./-}"
+_stlink_url_index="16/ac/ae/04/0b/01/42/5a"
 # stm32cubeprog
 ## https://www.st.com/content/st_com_cx/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stm32cubeprog/_jcr_content/get-software/get-software-table-body.nocache.html/st-site-cx/components/containers/product/get-software-table-body.html
 # stsw-link007
 ## https://www.st.com/content/st_com_cx/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link007/_jcr_content/get-software/get-software-table-body.nocache.html/st-site-cx/components/containers/product/get-software-table-body.html
+
 source=("en.${_pkg_main_name}.zip::https://www.st.com/content/ccc/resource/technical/software/utility/group0/${_pkg_main_url_index}/${_pkg_main_name}/files/${_pkg_main_name}.zip/jcr:content/translations/en.${_pkg_main_name}.zip"
-        "en.${_stlink_updater_name}.zip::https://st.com/content/ccc/resource/technical/software/firmware/group1/${_stlink_url_index}/${_stlink_updater_name}/files/${_stlink_updater_name}.zip/jcr:content/translations/en.${_stlink_updater_name}.zip"
+        "en.${_stlink_updater_name}.zip::https://www.st.com/content/ccc/resource/technical/software/firmware/group1/${_stlink_url_index}/${_stlink_updater_name}/files/${_stlink_updater_name}.zip/jcr:content/translations/en.${_stlink_updater_name}.zip"
         "${pkgname}.xdotool")
 sha256sums=('53b3648bd0297330b4e82eaba80d69d9fa50ac8e57a41c32d00ac32ca77ccad9'
-            'bb0c1849aa26fac956618c07cb81e29c68676d28ae630ce7a2498968dcfef33e'
+            '56666bd0985fa403008b0a88194266a92dcf346232fa0f4de8a9d072bee62318'
             '3194268b73572c4e0fb69e51145f989e85c0415d1c2d932d115708b0c514b005')

 prepare() {

apaulsen commented on 2021-12-07 23:28 (UTC)

Strange, I definitely had a different hash earlier, and then you got a different one, and now it's back to the original. It's passing the check now anyway.

yjun commented on 2021-12-07 15:52 (UTC) (edited on 2021-12-07 15:53 (UTC) by yjun)

@apaulsen hi, that's interesting. I redownloaded en.stsw-link007_V2-38-27.zip and checked the sha256sum, the checksum is same as the old one, so I reverted last commit, maybe you could try to redownload new zip file to slove the error.

# https://st.com/content/ccc/resource/technical/software/firmware/group1/4e/80/8d/29/e0/c7/4e/13/stsw-link007_V2-38-27/files/stsw-link007_V2-38-27.zip/jcr:content/translations/en.stsw-link007_V2-38-27.zip

bb0c1849aa26fac956618c07cb81e29c68676d28ae630ce7a2498968dcfef33e en.stsw-link007_V2-38-27.zip

apaulsen commented on 2021-12-03 15:59 (UTC)

It's still failing for me. I'm seeing a different sha256sum than the old one and the new one that you changed to.

yjun commented on 2021-12-03 08:02 (UTC)

@apaulsen ok, fixed.

apaulsen commented on 2021-12-02 15:31 (UTC)

They may have re-rolled en.stsw-link007_V2-38-27.zip because that's failing the checksum test.

sl1pkn07 commented on 2021-10-28 23:00 (UTC) (edited on 2021-10-28 23:58 (UTC) by sl1pkn07)

there is my approach for this package.

-- Use system jdk17 (yes, no need jdk8), and unbundled java.
-- Use system Qt5.
-- Uses custom "installer" made by bash and use 'expect' program. using the original installer method. not need run any xorg method . all automagic.
-- And use fakeuser-git for make a fakeHOME as garbage collector :P.`
pkgname=stm32cubeprogrammer
pkgver=2.8.0
_pkg_file_name=en.stm32cubeprg-lin_v${pkgver//./-}_v${pkgver}.zip
pkgrel=1
pkgdesc='All-in-one multi-OS software tool for programming STM32 products.'
arch=("x86_64")
makedepends=('setconf'
             'chrpath'
             'expect'
             'fakeuser-git'
             )
depends=('java-runtime'
         'java-openjfx'
         'pcsclite'
         'openssl-1.0'
         'qt5-serialport'
         )
url='https://www.st.com/en/development-tools/stm32cubeprog.html'
license=('custom:ST')
options=(!strip)

_DOWNLOADS_DIR=`xdg-user-dir DOWNLOAD`
if [ ! -f ${PWD}/${_pkg_file_name} ]; then
  if [ -f $_DOWNLOADS_DIR/${_pkg_file_name} ]; then
    ln -sfn $_DOWNLOADS_DIR/${_pkg_file_name} ${PWD}
  else
    msg2 ""
    msg2 "The package can be downloaded here: "
    msg2 "Please remember to put a downloaded package ${_pkg_file_name} into the build directory ${PWD} or $_DOWNLOADS_DIR"
    msg2 ""
  fi
fi

source=("local://${_pkg_file_name}"
        'installer'
        )
sha256sums=('c896a9e2cd6c43c9d98a7271c52934eb7151c22117afdf6e8175e7c6a83fdc40'
            'SKIP'
            )
# noextract=("${_pkg_file_name}")

prepare(){
  cd "${srcdir}"
  export _FAKEUSER_DIR_="${srcdir}/garbage_collector"
  fakeadd -U -n garbage_collector -u 1000 -g 1000 -d "${srcdir}/garbage_collector"
}

build() {
  cd "${srcdir}"
  fakeuser ./installer "${srcdir}/SetupSTM32CubeProgrammer-${pkgver}.linux" "-console"
}

package() {
  cd "${srcdir}"
  eval "_files=($(find opt -type f -printf '"%h/%f" '))"
  for i in "${_files[@]}"; do install -Dm644 "${i}" "${pkgdir}/${i}"; done
  for i in $(find ${pkgdir}/opt/stm32cubeprogrammer/bin -maxdepth 1 -type f); do chmod 755 "${i}"; done
  for i in $(find ${pkgdir}/opt/stm32cubeprogrammer/lib -maxdepth 1 -name *.so -type f); do chmod 755 "${i}"; done

  # set system jre-17
  sed 's|\$DIR/jre/bin/java|/usr/lib/jvm/java-17-openjdk/bin/java \\\n --module-path /usr/lib/jvm/java-17-openjdk/lib/javafx.controls.jar:/usr/lib/jvm/java-17-openjdk/lib/javafx.fxml.jar:/usr/lib/jvm/java-17-openjdk/lib/javafx.web.jar:/usr/lib/jvm/java-17-openjdk/lib/javafx.graphics.jar:/usr/lib/jvm/java-17-openjdk/lib/javafx.base.jar:/usr/lib/jvm/java-17-openjdk/lib/javafx.media.jar \\\n --add-modules javafx.controls,javafx.fxml,javafx.web \\\n --add-exports javafx.graphics/com.sun.javafx.text=ALL-UNNAMED \\\n --add-exports javafx.graphics/com.sun.javafx.scene.text=ALL-UNNAMED \\\n --add-opens javafx.graphics/javafx.scene.text=ALL-UNNAMED \\\n --add-opens javafx.graphics/com.sun.javafx.text=ALL-UNNAMED \\\n|g' \
    -i "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32CubeProgrammer"

  cp "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32_Programmer.sh" "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32MP_SigningTool_CLI.sh"
  cp "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32_Programmer.sh" "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32MP_KeyGen_CLI.sh"
  cp "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32_Programmer.sh" "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32TrustedPackageCreator_CLI.sh"
  cp "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32_Programmer.sh" "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32TrustedPackageCreator.sh"
  mv "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32_Programmer.sh" "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32_Programmer_CLI.sh"
  mv "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32CubeProgrammer" "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32CubeProgrammer.sh"
  mv "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32CubeProgrammerLauncher" "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32CubeProgrammer"

  _sh=('STM32_Programmer_CLI.sh'
       'STM32CubeProgrammer.sh'
       'STM32MP_SigningTool_CLI.sh'
       'STM32MP_KeyGen_CLI.sh'
       'STM32TrustedPackageCreator.sh'
       'STM32TrustedPackageCreator_CLI.sh'
       )
  for i in ${_sh[@]}; do
    case ${i} in
      STM32CubeProgrammer.sh)
        sed 's|DIR|MYROOTDIR|g' -i "${pkgdir}/opt/stm32cubeprogrammer/bin/${i}"
        setconf "${pkgdir}/opt/stm32cubeprogrammer/bin/${i}" MYROOTDIR=/opt/stm32cubeprogrammer
        ;;
      *)
        setconf "${pkgdir}/opt/stm32cubeprogrammer/bin/${i}" MYROOTDIR=/opt/stm32cubeprogrammer
        ;;
    esac
    sed 's|\.\./||g' -i "${pkgdir}/opt/stm32cubeprogrammer/bin/${i}"
  done

  sed 's|STM32_Programmer|bin/STM32_Programmer|g' -i "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32_Programmer_CLI.sh"
  sed 's|STM32CubeProgrammerLauncher|bin/STM32CubeProgrammer|g' -i "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32CubeProgrammer.sh"
  sed 's|STM32_Programmer|bin/STM32MP_SigningTool|g' -i "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32MP_SigningTool_CLI.sh"
  sed 's|STM32_Programmer|bin/STM32MP_KeyGen|g' -i "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32MP_KeyGen_CLI.sh"
  sed 's|STM32_Programmer|bin/STM32TrustedPackageCreator|g' -i "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32TrustedPackageCreator_CLI.sh"
  sed 's|STM32_Programmer_CLI|bin/STM32TrustedPackageCreator|g' -i "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32TrustedPackageCreator.sh"

  install -d "${pkgdir}/usr/bin"
  ln -s /opt/stm32cubeprogrammer/bin/STM32_Programmer_CLI.sh "${pkgdir}/usr/bin/STM32_Programmer_CLI"
  ln -s /opt/stm32cubeprogrammer/bin/STM32CubeProgrammer.sh "${pkgdir}/usr/bin/STM32CubeProgrammer"
  ln -s /opt/stm32cubeprogrammer/bin/STM32MP_KeyGen_CLI.sh "${pkgdir}/usr/bin/STM32MP_KeyGen_CLI"
  ln -s /opt/stm32cubeprogrammer/bin/STM32MP_SigningTool_CLI.sh "${pkgdir}/usr/bin/STM32MP_SigningTool_CLI"
  ln -s /opt/stm32cubeprogrammer/bin/STM32TrustedPackageCreator.sh "${pkgdir}/usr/bin/STM32TrustedPackageCreator"
  ln -s /opt/stm32cubeprogrammer/bin/STM32TrustedPackageCreator_CLI.sh "${pkgdir}/usr/bin/STM32TrustedPackageCreator_CLI"

  install -d "${pkgdir}/usr/share/applications"
  cp "${srcdir}/garbage_collector/.local/share/applications/STM32CubeProgrammer.desktop" "${pkgdir}/usr/share/applications/STM32CubeProgrammer.desktop"
  cp "${srcdir}/garbage_collector/.local/share/applications/STM32TrustedPackageCreator.desktop" "${pkgdir}/usr/share/applications/STM32TrustedPackageCreator.desktop"
  sed -e "s|${srcdir}||g" \
      -e '/Encoding/d' \
      -e '/ServiceTypes/d' \
      -e '/SwallowExec/d' \
      -e '/SwallowTitle/d' \
      -e '/TerminalOptions/d' \
      -i "${pkgdir}/usr/share/applications/"*.desktop
  setconf "${pkgdir}/usr/share/applications/STM32CubeProgrammer.desktop" Terminal=false
  setconf "${pkgdir}/usr/share/applications/STM32CubeProgrammer.desktop" Categories=Development
  sed 's|bin/STM32CubeProgrammer|&.sh|g' -i "${pkgdir}/usr/share/applications/STM32CubeProgrammer.desktop"
  setconf "${pkgdir}/usr/share/applications/STM32TrustedPackageCreator.desktop" Terminal=false
  setconf "${pkgdir}/usr/share/applications/STM32TrustedPackageCreator.desktop" Categories=Development
  sed 's|bin/STM32TrustedPackageCreator|&.sh|g' -i "${pkgdir}/usr/share/applications/STM32TrustedPackageCreator.desktop"

  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/bin/jre"
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/doc/CLI_TREE.txt"
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/util/populateApi.bat"
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/util/"rights*.sh
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/util/copy_jre_linux.sh"
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/uninstaller"
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/.installationinformation"
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/IzPackLocaleEnabledXdgDesktopIconScript.sh"

  for i in lib bin; do
    setconf "${pkgdir}/opt/stm32cubeprogrammer/${i}/libstp11_SAM.so.conf" OutputFolder=/opt/stm32cubeprogrammer/bin/HSM/data/
    setconf "${pkgdir}/opt/stm32cubeprogrammer/${i}/libstp11_SAM.so.conf" InputFolder=/opt/stm32cubeprogrammer/bin/HSM/data/
  done

  chrpath -d "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32_Programmer_CLI"
  chrpath -d "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32MP_KeyGen_CLI"
  chrpath -d "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32MP_SigningTool_CLI"
  chrpath -d "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32TrustedPackageCreator"
  chrpath -d "${pkgdir}/opt/stm32cubeprogrammer/bin/STM32TrustedPackageCreator_CLI"

  chrpath -d "${pkgdir}/opt/stm32cubeprogrammer/lib/libPreparation.so.1"
  chrpath -d "${pkgdir}/opt/stm32cubeprogrammer/lib/libCubeProgrammer_API.so"
  chrpath -d "${pkgdir}/opt/stm32cubeprogrammer/lib/libCubeProgrammer_API.so.1"
  chrpath -d "${pkgdir}/opt/stm32cubeprogrammer/lib/libFileManager.so.1"

  chrpath -d "${pkgdir}/opt/stm32cubeprogrammer/updater/STM32CubePrgUpd"

  #unbundle Qt5
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/lib/"libQt5*
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/lib/"libicu*
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/"{bin,lib}/libcrypto.so*
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/bin/libssl.so"
  rm -fr "${pkgdir}/opt/stm32cubeprogrammer/bin/platforms"

  install -d "${pkgdir}/usr/share/licenses/stm32cubeprogrammer"
  ln -s /opt/stm32cubeprogrammer/doc/license.txt "${pkgdir}/usr/share/licenses/stm32cubeprogrammer/licence.txt"

}

installer

#!/usr/bin/expect -f
set APP [lindex $argv 0]
set OPT [lindex $argv 1]

set timeout 4
spawn $APP $OPT
  expect "Press 1" {
    send "1\n"
    exp_continue
  }
  expect "Select the installation path" {
    send "opt/stm32cubeprogrammer\n"
    exp_continue
  }
  expect {
    "Enter O" { send -- "O\n" ;  exp_continue }
    "Enter Y" { send -- "Y\n" ;  exp_continue }
  }
  expect "Press 1" {
    send "1\n"
    exp_continue
  }
  expect "Enter Y for" {
    send "Y\n"
    exp_continue
  }
  expect "Press 1" {
    send "1\n"
    exp_continue
  }
  expect "1/4" {
    set timeout 6
    exp_continue
  }
  expect "2/4" {
    exp_continue
  }
  expect "3/4" {
    exp_continue
  }
  expect "4/4" {
    exp_continue
  }
  expect "Create shortcuts" {
    send "Y\n"
    exp_continue
  }
  expect "Create additional shortcuts" {
    send "N\n"
    exp_continue
  }

greetings

yjun commented on 2021-09-01 17:19 (UTC)

@H0lmEd thanks! fixed.

H0lmEd commented on 2021-09-01 15:53 (UTC)

Crashing under wayland on KDE Plasma 5.22.5

Fixed by changing /usr/share/applications/stm32cubeprog.desktop:11

Exec=env GDK_BACKEND=x11 /opt/stm32cubeprog/bin/STM32CubeProgrammer