Package Details: lpcscrypt 2.1.1.15-0

Git Clone URL: https://aur.archlinux.org/lpcscrypt.git (read-only, click to copy)
Package Base: lpcscrypt
Description: Programming tool for LPC1800 and LPC4000 series microcontrollers
Upstream URL: https://www.nxp.com/design/microcontrollers-developer-resources/lpc-microcontroller-utilities/lpcscrypt-v2-1-1:LPCSCRYPT
Licenses: proprietary
Submitter: codyps
Maintainer: codyps (potatoe, rhssk)
Last Packager: codyps
Votes: 1
Popularity: 0.000001
First Submitted: 2018-08-25 03:21
Last Updated: 2020-08-18 17:42

Latest Comments

jaskij commented on 2021-04-12 18:07

The script dfu_boot included in the package fails with dfu-util 0.10.

There is a bug in checking dfu-util version. What, presumably, was a check for version 0.1, checks only the first three characters. Depending on this check, different VID:PID formatting is (in this case incorrectly) used. This makes the script fail at find the correct device in the output of dfu-util -l.

Most likely this check can be dealt away with in it's entirety, since version 0.5 is dated at 2012. As seen here 0.1 did indeed use different formatting.

Below is a quick patch (which works for me) removing that test and the used variable entirely. Meanwhile, I'll post this also on NXP's forums.

My version of dfu-util is the current Manjaro community package. Can re-test on Arch if necessary.

--- dfu_boot.bak    2021-04-12 19:44:12.055974951 +0200
+++ dfu_boot    2021-04-12 20:00:45.602209668 +0200
@@ -128,11 +128,6 @@
 }
 $LOGGING && echo "Using dfu-util version $dfu_ver at `which $DFU_UTIL`"

-# establish what kind of prefix VID:PIDs have when listed in -l
-vp_hex=
-[ "${dfu_ver::3}" = "0.1" ] && vp_hex="0x"
-# echo "DFU version $dfu_ver means we should use hex prefix '$vp_hex'"
-
 if [ "_$DEVICE_VID_PID" != "_${DEVICE_VID_PID/:}" ]; then
     # we have specified VID and PID in this argument
     DEVICE_PID="${DEVICE_VID_PID//*:}"
@@ -164,7 +159,7 @@
 fi
 DEVICE_VID="${DEVICE_VID/0x}"
 DEVICE_PID="${DEVICE_PID/0x}"
-DEVICE_VID_PID="${vp_hex}$DEVICE_VID:${vp_hex}$DEVICE_PID"
+DEVICE_VID_PID="$DEVICE_VID:$DEVICE_PID"
 #DEVICE_VID_PID="\(0x\|\)$DEVICE_VID:\(0x\|\)$DEVICE_PID"

 echo "Looking for DFU devices with VID $DEVICE_VID PID $DEVICE_PID ..."