文章目录

  • NXP 提供的 LPCScrypt 工具
    • 我 Arch 用户或其他 Linux 发行版用户想使用怎么办?
      • 1. 注册 NXP 官网下载相应的 Linux 版本文件
      • 2. 用文本编辑器打开看了下里面的内容
      • 3. 开始 lpcscrypt-2.1.2_57.x86_64.deb.bin 解密
      • 4. 解压 `deb` 包
      • 5. 解压 `data.tar.gz`
      • 6. 这下就能进行 AUR 打包处理了
      • 7. 编译 `PKGBUILD` 并安装验证
      • 8. 上传到 AUR 仓库

NXP 提供的 LPCScrypt 工具

支持 Linux macOS 和 Windows
https://www.nxp.com/design/microcontrollers-developer-resources/lpcscrypt-v2-1-2:LPCSCRYPT

官网给的 Linux 版本的 lpcscrypt-2.1.2_57.x86_64.deb.bin 工具看名称是 Debian/Ubuntu 衍生版才能安装使用。

我 Arch 用户或其他 Linux 发行版用户想使用怎么办?

1. 注册 NXP 官网下载相应的 Linux 版本文件

2. 用文本编辑器打开看了下里面的内容

#!/bin/sh
# This script was generated using Makeself 2.2.0umask 077CRCsum="4237188651"
MD5="6c85e5870f1db1e3c66128409ecc8cb5"
TMPROOT=${TMPDIR:=/tmp}label="lpcscrypt installer"
script="./install.sh"
scriptargs=""
licensetxt=""
targetdir="installer"
filesizes="1736969"
keep="n"
quiet="n"print_cmd_arg=""
if type printf > /dev/null; thenprint_cmd="printf"
elif test -x /usr/ucb/echo; thenprint_cmd="/usr/ucb/echo"
elseprint_cmd="echo"
fiunset CDPATHMS_Printf()
{$print_cmd $print_cmd_arg "$1"
}MS_PrintLicense()
{if test x"$licensetxt" != x; thenecho $licensetxtwhile truedoMS_Printf "Please type y to accept, n otherwise: "read ynif test x"$yn" = xn; thenkeep=neval $finish; exit 1        break;    elif test x"$yn" = xy; thenbreak;fidonefi
}MS_diskspace()
{(if test -d /usr/xpg4/bin; thenPATH=/usr/xpg4/bin:$PATHfidf -kP "$1" | tail -1 | awk '{ if ($4 ~ /%/) {print $3} else {print $4} }')
}MS_dd()
{blocks=`expr $3 / 1024`bytes=`expr $3 % 1024`dd if="$1" ibs=$2 skip=1 obs=1024 conv=sync 2> /dev/null | \{ test $blocks -gt 0 && dd ibs=1024 obs=1024 count=$blocks ; \test $bytes  -gt 0 && dd ibs=1 obs=1024 count=$bytes ; } 2> /dev/null
}MS_dd_Progress()
{if test "$noprogress" = "y"; thenMS_dd $@return $?fifile="$1"offset=$2length=$3pos=0bsize=4194304while test $bsize -gt $length; dobsize=`expr $bsize / 4`doneblocks=`expr $length / $bsize`bytes=`expr $length % $bsize`(dd bs=$offset count=0 skip=1 2>/dev/nullpos=`expr $pos \+ $bsize`MS_Printf "     0%% " 1>&2if test $blocks -gt 0; thenwhile test $pos -le $length; dodd bs=$bsize count=1 2>/dev/nullpcent=`expr $length / 100`pcent=`expr $pos / $pcent`if test $pcent -lt 100; thenMS_Printf "\b\b\b\b\b\b\b" 1>&2if test $pcent -lt 10; thenMS_Printf "    $pcent%% " 1>&2elseMS_Printf "   $pcent%% " 1>&2fifipos=`expr $pos \+ $bsize`donefiif test $bytes -gt 0; thendd bs=$bytes count=1 2>/dev/nullfiMS_Printf "\b\b\b\b\b\b\b" 1>&2MS_Printf " 100%%  " 1>&2) < "$file"
}MS_Help()
{cat << EOH >&2
Makeself version 2.2.01) Getting help or info about $0 :$0 --help   Print this message$0 --info   Print embedded info : title, default target directory, embedded script ...$0 --lsm    Print embedded lsm entry (or no LSM)$0 --list   Print the list of files in the archive$0 --check  Checks integrity of the archive2) Running $0 :$0 [options] [--] [additional arguments to embedded script]with following options (in that order)--confirm             Ask before running embedded script--quiet     Do not print anything except error messages--noexec              Do not run embedded script--keep                Do not erase target directory after runningthe embedded script--noprogress          Do not show the progress during the decompression--nox11               Do not spawn an xterm--nochown             Do not give the extracted files to the current user--target dir          Extract directly to a target directorydirectory path can be either absolute or relative--tar arg1 [arg2 ...] Access the contents of the archive through the tar command--                    Following arguments will be passed to the embedded script
EOH
}MS_Check()
{OLD_PATH="$PATH"PATH=${GUESS_MD5_PATH:-"$OLD_PATH:/bin:/usr/bin:/sbin:/usr/local/ssl/bin:/usr/local/bin:/opt/openssl/bin"}MD5_ARG=""MD5_PATH=`exec <&- 2>&-; which md5sum || type md5sum`test -x "$MD5_PATH" || MD5_PATH=`exec <&- 2>&-; which md5 || type md5`test -x "$MD5_PATH" || MD5_PATH=`exec <&- 2>&-; which digest || type digest`PATH="$OLD_PATH"if test "$quiet" = "n";thenMS_Printf "Verifying archive integrity..."fioffset=`head -n 498 "$1" | wc -c | tr -d " "`verb=$2i=1for s in $filesizesdocrc=`echo $CRCsum | cut -d" " -f$i`if test -x "$MD5_PATH"; thenif test `basename $MD5_PATH` = digest; thenMD5_ARG="-a md5"fimd5=`echo $MD5 | cut -d" " -f$i`if test $md5 = "00000000000000000000000000000000"; thentest x$verb = xy && echo " $1 does not contain an embedded MD5 checksum." >&2elsemd5sum=`MS_dd "$1" $offset $s | eval "$MD5_PATH $MD5_ARG" | cut -b-32`;if test "$md5sum" != "$md5"; thenecho "Error in MD5 checksums: $md5sum is different from $md5" >&2exit 2elsetest x$verb = xy && MS_Printf " MD5 checksums are OK." >&2ficrc="0000000000"; verb=nfifiif test $crc = "0000000000"; thentest x$verb = xy && echo " $1 does not contain a CRC checksum." >&2elsesum1=`MS_dd "$1" $offset $s | CMD_ENV=xpg4 cksum | awk '{print $1}'`if test "$sum1" = "$crc"; thentest x$verb = xy && MS_Printf " CRC checksums are OK." >&2elseecho "Error in checksums: $sum1 is different from $crc" >&2exit 2;fifii=`expr $i + 1`offset=`expr $offset + $s`doneif test "$quiet" = "n";thenecho " All good."fi
}UnTAR()
{if test "$quiet" = "n"; thentar $1vf - 2>&1 || { echo Extraction failed. > /dev/tty; kill -15 $$; }elsetar $1f - 2>&1 || { echo Extraction failed. > /dev/tty; kill -15 $$; }fi
}finish=true
xterm_loop=
noprogress=n
nox11=n
copy=none
ownership=y
verbose=ninitargs="$@"while true
docase "$1" in-h | --help)MS_Helpexit 0;;-q | --quiet)quiet=ynoprogress=yshift;;--info)echo Identification: "$label"echo Target directory: "$targetdir"echo Uncompressed size: 3916 KBecho Compression: gzipecho Date of packaging: Wed Nov 25 13:12:38 CET 2020echo Built with Makeself version 2.2.0 on echo Build command was: "/usr/bin/makeself \\\"./installer\" \\\"./lpcscrypt-2.1.2_57.x86_64.deb.bin\" \\\"lpcscrypt installer\" \\\"./install.sh\""if test x$script != x; thenecho Script run after extraction:echo "    " $script $scriptargsfiif test x"" = xcopy; thenecho "Archive will copy itself to a temporary location"fiif test x"n" = xy; thenecho "directory $targetdir is permanent"elseecho "$targetdir will be removed after extraction"fiexit 0;;--dumpconf)echo LABEL=\"$label\"echo SCRIPT=\"$script\"echo SCRIPTARGS=\"$scriptargs\"echo archdirname=\"installer\"echo KEEP=necho COMPRESS=gzipecho filesizes=\"$filesizes\"echo CRCsum=\"$CRCsum\"echo MD5sum=\"$MD5\"echo OLDUSIZE=3916echo OLDSKIP=499exit 0;;--lsm)
cat << EOLSM
No LSM.
EOLSMexit 0;;--list)echo Target directory: $targetdiroffset=`head -n 498 "$0" | wc -c | tr -d " "`for s in $filesizesdoMS_dd "$0" $offset $s | eval "gzip -cd" | UnTAR toffset=`expr $offset + $s`doneexit 0;;--tar)offset=`head -n 498 "$0" | wc -c | tr -d " "`arg1="$2"if ! shift 2; then MS_Help; exit 1; fifor s in $filesizesdoMS_dd "$0" $offset $s | eval "gzip -cd" | tar "$arg1" - $*offset=`expr $offset + $s`doneexit 0;;--check)MS_Check "$0" yexit 0;;--confirm)verbose=yshift;;--noexec)script=""shift;;--keep)keep=yshift;;--target)keep=ytargetdir=${2:-.}if ! shift 2; then MS_Help; exit 1; fi;;--noprogress)noprogress=yshift;;--nox11)nox11=yshift;;--nochown)ownership=nshift;;--xwin)finish="echo Press Return to close this window...; read junk"xterm_loop=1shift;;--phase2)copy=phase2shift;;--)shiftbreak ;;-*)echo Unrecognized flag : "$1" >&2MS_Helpexit 1;;*)break ;;esac
doneif test "$quiet" = "y" -a "$verbose" = "y";thenecho Cannot be verbose and quiet at the same time. >&2exit 1
fiMS_PrintLicensecase "$copy" in
copy)tmpdir=$TMPROOT/makeself.$RANDOM.`date +"%y%m%d%H%M%S"`.$$mkdir "$tmpdir" || {echo "Could not create temporary directory $tmpdir" >&2exit 1}SCRIPT_COPY="$tmpdir/makeself"echo "Copying to a temporary location..." >&2cp "$0" "$SCRIPT_COPY"chmod +x "$SCRIPT_COPY"cd "$TMPROOT"exec "$SCRIPT_COPY" --phase2 -- $initargs;;
phase2)finish="$finish ; rm -rf `dirname $0`";;
esacif test "$nox11" = "n"; thenif tty -s; then                 # Do we have a terminal?:elseif test x"$DISPLAY" != x -a x"$xterm_loop" = x; then  # No, but do we have X?if xset q > /dev/null 2>&1; then # Check for valid DISPLAY variableGUESS_XTERMS="xterm rxvt dtterm eterm Eterm kvt konsole aterm"for a in $GUESS_XTERMS; doif type $a >/dev/null 2>&1; thenXTERM=$abreakfidonechmod a+x $0 || echo Please add execution rights on $0if test `echo "$0" | cut -c1` = "/"; then # Spawn a terminal!exec $XTERM -title "$label" -e "$0" --xwin "$initargs"elseexec $XTERM -title "$label" -e "./$0" --xwin "$initargs"fifififi
fiif test "$targetdir" = "."; thentmpdir="."
elseif test "$keep" = y; thenif test "$quiet" = "n";thenecho "Creating directory $targetdir" >&2fitmpdir="$targetdir"dashp="-p"elsetmpdir="$TMPROOT/selfgz$$$RANDOM"dashp=""fimkdir $dashp $tmpdir || {echo 'Cannot create target directory' $tmpdir >&2echo 'You should try option --target dir' >&2eval $finishexit 1}
filocation="`pwd`"
if test x$SETUP_NOCHECK != x1; thenMS_Check "$0"
fi
offset=`head -n 498 "$0" | wc -c | tr -d " "`if test x"$verbose" = xy; thenMS_Printf "About to extract 3916 KB in $tmpdir ... Proceed ? [Y/n] "read ynif test x"$yn" = xn; theneval $finish; exit 1fi
fiif test "$quiet" = "n";thenMS_Printf "Uncompressing $label"
fi
res=3
if test "$keep" = n; thentrap 'echo Signal caught, cleaning up >&2; cd $TMPROOT; /bin/rm -rf $tmpdir; eval $finish; exit 15' 1 2 3 15
fileftspace=`MS_diskspace $tmpdir`
if test -n "$leftspace"; thenif test "$leftspace" -lt 3916; thenechoecho "Not enough space left in "`dirname $tmpdir`" ($leftspace KB) to decompress $0 (3916 KB)" >&2if test "$keep" = n; thenecho "Consider setting TMPDIR to a directory with more free space."fieval $finish; exit 1fi
fifor s in $filesizes
doif MS_dd_Progress "$0" $offset $s | eval "gzip -cd" | ( cd "$tmpdir"; UnTAR x ) 1>/dev/null; thenif test x"$ownership" = xy; then(PATH=/usr/xpg4/bin:$PATH; cd "$tmpdir"; chown -R `id -u` .;  chgrp -R `id -g` .)fielseecho >&2echo "Unable to decompress $0" >&2eval $finish; exit 1fioffset=`expr $offset + $s`
done
if test "$quiet" = "n";thenecho
ficd "$tmpdir"
res=0
if test x"$script" != x; thenif test x"$verbose" = xy; thenMS_Printf "OK to execute: $script $scriptargs $* ? [Y/n] "read ynif test x"$yn" = x -o x"$yn" = xy -o x"$yn" = xY; theneval $script $scriptargs $*; res=$?;fielseeval $script $scriptargs $*; res=$?fiif test $res -ne 0; thentest x"$verbose" = xy && echo "The program '$script' returned an error code ($res)" >&2fi
fi
if test "$keep" = n; thencd $TMPROOT/bin/rm -rf $tmpdir
fi
eval $finish; exit $res
��6J綺燧\曽炶夯E噒ww�wI   逸澮!妸€倀wùt)J妧历击9g遱嫖湙�}蛙遺褛 箈啧y�.n�/<�.聜偪=�潲雜_�/堪牥€€ 彁///� L峥囹浪勐Cp磓urp斛7唢遻��鳢o售沦櫵塔翼�+烂/n~^~庚!�0衠[:竢[Zx賑1纞=苫果{:刭{螟xxEaZF:拷肆fT辑狜鉻祦窭頲羆搛6�0+{7綆硩厳
腆�+搪骈骀MG�=l�急l~�钷�0NNoog絾儠嶋�摰蟠眖眖觜踬9齧糪}FFV+o槑�+锟�#椃�7�纟鯙^V瀗挝�6縙u龙�开�0N;镞鴂��鹵押璱�#�'扇瘥]沖W岱o嫍F'    '斫~#f踣访�sp+`0N{X喁痡o沆析椬{7皐饌/拲'熳碟鮹L6^0W7o樂厯
搪�鎛醝醔鉳汩E晴/忖紤濏_抉/_鸲珦珱鷦t0%7O豲W鲟渍E/讛霟}n�涫豿YXE/{[镞_秜s爹趼o凤弋氷_\砀竳抑頝v0N嘷灼滞邮営谄萜遮骒n�蔬輿搹嫍嬒LP標OD萀H€粟乞浊Y鼁嫕�7層�o禭6蝆6|%房浸窙纩桝侚�=€賉兰輅繊誳/��5嬁挖�齯�緋q記挲�+黭狍    瘕孆/(((�艆N侣邮^
胱m韅崾纠掠�鰇q线齏H@圜�颊嫃�耸驼*纡吷e例飤�熜O弫 犞f唨�5缶�4I悦痜瑡��;idb�7TF�冉Xo鳫-^髫E褚癄F�!"1遀C,賭I3)y�'铻k�%躍U�kc_淓  fB堠p┭: �4仜,雸�5_Wx噭
�-\)z5耠�.�:jKa~)熶'Wv`轜圄^晪�'洫:蚙偵儆�WW挊莵騝壚E€�9丟7I畨C虸>E�-7
Q綗�>h碦�t靸塡斶8~
拰_V1鸃(||崎桴壟泳◣vf

前半部分是 shell 脚本从 499 行开始就是乱码了
437 行有这个提示:

offset=`head -n 498 "$0" | wc -c | tr -d " "`

推测 NXP 是使用 gzexe 进行了压缩和简单的加密处理

3. 开始 lpcscrypt-2.1.2_57.x86_64.deb.bin 解密

tail -n +499 lpcscrypt-2.1.2_57.x86_64.deb.bin > lpcscrypt-2.1.2_57.x86_64.deb

得到一个 deb 包(不知道是不是正常的 deb 包,进行下一步验证)

4. 解压 deb

bsdtar -xf lpcscrypt-2.1.2_57.x86_64.deb

解压成功(狗头保命

5. 解压 data.tar.gz

mkdir -p build
tar -xf data.tar.gz -C build

得到 NXP 的编译后的二进制文件

tree build
build
├── lib
│   └── udev
│       └── rules.d
│           └── 99-lpcscrypt.rules
└── usr└── local└── lpcscrypt-2.1.2_57├── bin│   ├── LPCScrypt_240.bin.hdr│   ├── image_manager│   └── lpcscrypt├── docs│   ├── Debug_Probe_Firmware_Programming.pdf│   └── LPCScrypt_User_Guide.pdf├── eula│   ├── SoftwareContentRegister.txt│   ├── licenses│   │   ├── Apache-2.0.txt│   │   ├── BSD-3-clause.txt│   │   ├── BSD-4-clause.txt│   │   ├── GPLV2.txt│   │   ├── LGPLV2.1.txt│   │   └── Zlib.txt│   ├── lpcscrypt_eula.docx│   ├── lpcscrypt_eula.rtf│   └── lpcscrypt_eula.txt├── images│   ├── Link2_Fill_SPIFI.bin│   ├── Link2_Medium_SPIFI.bin│   ├── Link2_Small_SPIFI.bin│   ├── MCB1800_FillBlinky_BankA.bin│   ├── MCB1800_FillBlinky_BankB.bin│   ├── MCB1800_FillBlinky_SPIFI.bin│   ├── MCB1800_LargeBlinky_BankA.bin│   ├── MCB1800_LargeBlinky_BankB.bin│   ├── MCB1800_LargeBlinky_RAM.bin│   ├── MCB1800_LargeBlinky_SPIFI.bin│   ├── MCB1800_blinky_BankA.bin│   ├── MCB1800_blinky_BankB.bin│   ├── MCB1800_blinky_RAM.bin│   └── MCB1800_blinky_SPIFI.bin├── probe_firmware│   ├── LPCLink2│   │   ├── Firmware_JLink_LPC-Link2_20190404.bin│   │   ├── LPC432x_CMSIS_DAP_NB_V5_224.bin.hdr│   │   ├── LPC432x_CMSIS_DAP_NB_V5_361.bin.hdr│   │   ├── LPC432x_CMSIS_DAP_SER_V5_224.bin.hdr│   │   ├── LPC432x_CMSIS_DAP_SER_V5_361.bin.hdr│   │   ├── LPC432x_CMSIS_DAP_V5_224.bin.hdr│   │   └── LPC432x_CMSIS_DAP_V5_361.bin.hdr│   └── LPCXpressoV2│       ├── Firmware_JLink_LPCXpressoV2_20190404.bin│       ├── LPC432x_IAP_CMSIS_DAP_NB_V5_224.bin│       ├── LPC432x_IAP_CMSIS_DAP_NB_V5_361.bin│       ├── LPC432x_IAP_CMSIS_DAP_SER_V5_224.bin│       ├── LPC432x_IAP_CMSIS_DAP_SER_V5_361.bin│       ├── LPC432x_IAP_CMSIS_DAP_V5_224.bin│       └── LPC432x_IAP_CMSIS_DAP_V5_361.bin└── scripts├── 99-lpcscrypt.rules├── LPCScrypt_CLI├── aeskey├── boot_lpcscrypt├── dfu_boot├── encrypt_and_program├── encrypt_and_program.scy├── install_udev_rules├── program_CMSIS└── program_JLINK15 directories, 54 files

6. 这下就能进行 AUR 打包处理了

按 Arch 的打包规范进行编写 PKGBUILD 打包脚本
根据 NXP 的介绍需要依赖最新版 jlink 软件包 (Arch 下是 jlink-software-and-documentation 其他 Linux 可能在软件商店有,也可能没有,那就需要自行去 Segger 官网下载 Jlink 的软件包了)

# Maintainer: taotieren <admin@taotieren.com>
# Contributor:pkgname="lpcscrypt-bin"
pkgver=2.1.2
pkgrel=1
pkgdesc="LPCScrypt is the recommended tool for programming the latest versions of CMSIS-DAP and J-Link firmware onto boards with Link2/LPC-Link2 debug probes."
arch=("x86_64")
makedepends=('imagemagick')
depends=('jlink-software-and-documentation')
optdepends=()
conflicts=()
url="https://www.nxp.com/design/microcontrollers-developer-resources/lpcscrypt-v2-1-2:LPCSCRYPT"
license=('Commercial' 'Apache-2.0' 'BSD-4-clause' 'BSD-3-clause' 'LGPLV2.1' 'GPLV2' 'Zlib')
options=(!strip)
_pkgver_ext=${pkgver}_57
_pkg_file_name=${pkgname%-bin}-${_pkgver_ext}.${arch}.deb.bin
_deb_file_name=${pkgname%-bin}-${_pkgver_ext}.${arch}.deb
_DOWNLOADS_DIR=`xdg-user-dir DOWNLOAD`
if [ ! -f ${PWD}/${_pkg_file_name} ]; thenif [ -f $_DOWNLOADS_DIR/${_pkg_file_name} ]; thenln -sfn $_DOWNLOADS_DIR/${_pkg_file_name} ${PWD}elsemsg2 ""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
fisource=("local://${_pkg_file_name}")
sha256sums=('379c63b788a72e64571af870d760ad6b3be32e4c863d29ca58276f750e416750')
noextract=(${_pkg_file_name})prepare(){cd "$srcdir"tail -n +499 ${_pkg_file_name} > ${_deb_file_name}mkdir -p buildbsdtar xf ${_deb_file_name} -C buildbsdtar xf build/${_deb_file_name} -C build
}
package() {cd "$srcdir"msg2 'Installing LPCScrypt'tar xf "build/data.tar.gz" -C "${pkgdir}/"mv "${pkgdir}/lib" "${pkgdir}/usr"msg2 'Instalation of binary file'install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-bin}" <<END
#!/bin/sh
/usr/local/lpcscrypt-2.1.2_57/bin/lpcscrypt "\$@"
ENDmsg2 'Instalation of license file'install -dm0755 "${pkgdir}/usr/share/licenses/${pkgname%-bin}/"cp -rv  "${pkgdir}/usr/local/lpcscrypt-2.1.2_57/eula" "${pkgdir}/usr/share/licenses/${pkgname%-bin}/"
}#
# makepkg --printsrcinfo > .SRCINFO
## vim: set ts=8 sw=8 tw=0 noet:

7. 编译 PKGBUILD 并安装验证

如果需要更新 PKGBUILDsha256sums 校验值

updpkgsums

创建 .SRCINFO 文件

makepkg --printsrcinfo > .SRCINFO

编译 PKGBUILD

makepkg -sf
==> 正在创建软件包:lpcscrypt-bin 2.1.2-1 (2021年07月04日 星期日 14时04分10秒)
==> 正在检查运行时依赖关系...
==> 正在检查编译时依赖关系
==> 获取源代码...-> 找到 lpcscrypt-2.1.2_57.x86_64.deb.bin
==> 正在验证 source 文件,使用sha256sums...lpcscrypt-2.1.2_57.x86_64.deb.bin ... 通过
==> 正在释放源码...
==> 正在开始 prepare()...
==> 正在删除现存的 $pkgdir/ 目录...
==> 正在进入 fakeroot 环境...
==> 正在开始 package()...-> Installing LPCScrypt-> Instalation of binary file-> Instalation of license file
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/lpcscrypt_eula.txt' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/lpcscrypt_eula.txt'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/lpcscrypt_eula.docx' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/lpcscrypt_eula.docx'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/lpcscrypt_eula.rtf' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/lpcscrypt_eula.rtf'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/licenses' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/licenses'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/licenses/Zlib.txt' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/licenses/Zlib.txt'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/licenses/Apache-2.0.txt' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/licenses/Apache-2.0.txt'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/licenses/GPLV2.txt' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/licenses/GPLV2.txt'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/licenses/BSD-3-clause.txt' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/licenses/BSD-3-clause.txt'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/licenses/BSD-4-clause.txt' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/licenses/BSD-4-clause.txt'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/licenses/LGPLV2.1.txt' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/licenses/LGPLV2.1.txt'
'/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/local/lpcscrypt-2.1.2_57/eula/SoftwareContentRegister.txt' -> '/home/taotieren/git_clone/aur/lpcscrypt-bin/pkg/lpcscrypt-bin/usr/share/licenses/lpcscrypt/eula/SoftwareContentRegister.txt'
==> 正在清理安装...-> 正在删除 libtool 文件...-> 正在清除不打算要的文件...-> 正在移除静态库文件...-> 正在压缩 man 及 info 文档...
==> 正在检查打包问题...
==> 正在构建软件包"lpcscrypt-bin"...-> 正在生成 .PKGINFO 文件...-> 正在生成 .BUILDINFO 文件...-> 正在生成 .MTREE 文件...-> 正在压缩软件包...
==> 正在离开 fakeroot 环境。
==> 完成创建:lpcscrypt-bin 2.1.2-1 (2021年07月04日 星期日 14时04分12秒)

安装 lpcscrypt-bin 2.1.2-1.pkg.tar.zst

sudo pacman -U lpcscrypt-bin 2.1.2-1.pkg.tar.zst
# 或
yay -U lpcscrypt-bin 2.1.2-1.pkg.tar.zst
正在加载软件包...
正在解析依赖关系...
正在查找软件包冲突...软件包 (1) lpcscrypt-bin-2.1.2-1全部安装大小:  9.34 MiB:: 进行安装吗? [Y/n]
(1/1) 正在检查密钥环里的密钥                       [##########################] 100%
(1/1) 正在检查软件包完整性                         [##########################] 100%
(1/1) 正在加载软件包文件                           [##########################] 100%
(1/1) 正在检查文件冲突                             [##########################] 100%
(1/1) 正在检查可用存储空间                         [##########################] 100%
:: 正在处理软件包的变化...
(1/1) 正在安装 lpcscrypt-bin                       [##########################] 100%
:: 正在运行事务后钩子函数...
(1/3) Reloading device manager configuration...
(2/3) Arming ConditionNeedsUpdate...
(3/3) Refreshing PackageKit...

运行并验证 lpcscrypt

lpcscrypt
lpcscrypt: NXP LPC Scripting tool. v2.1.2 (Build 44) (Nov 25 2020 13:01:49)
usage: lpcscrypt [-d serial_port] [-e dnqst] [-g usec] [-hp] [-v var=value]
[-s script]|[-t]|[[-x] command]
where:-h             display this help message-d serial_port use 'serial_port' (device) as targetuse ? to list available ports-s script      read script from file-t             read script from terminal (stdin)-x command     execute 'command' onlythe -s, -t and -x options and/or immediate commandsare mutually exclusive-v name=value  assign variable 'name' the value 'value'Use [name] to reference the variable in the scriptSimple text replacement is performed on each script line-p             pause before each script command-e denqst      set command echo options:q - quiet  - echo nothing [default]d - debug  - echo additional debug informationn - noisy  - echo everythings - script - echo script commandst - target - echo target commandsb - buffer - dump raw target buffere - exit   - display message on exitSupported high-level commands (implemented by this tool) are:program     program [+c|+wN] (<file>|<fill_value>) <baseAddress>[<fill_length>].where: +c==calculate checksum+wN==width of fill_value, where N is 1, 2 or 4program file or value into flash at baseAddressverify      verify [+c|+i|+wN] (<file>|<fill_value>) <baseAddress>[<fill_length>].where: +c==calculate checksum, +i==ignore checksum+wN==width of fill_value, where N is 1, 2 or 4verify that flash contents matches the file or valueerase       erase <baseAddress>erase flash contentsblankCheck  blankCheck <baseAddress>blankchecksetBoot     setBoot [BankA|BankB|0|1]set the active boot flash banksetVidPid   setVidPid <vid> <pid>program the OTP VID and PIDecho        echo <parameters>*echo all parameters to the output streamdelay       delay <microseconds>delay for number of microsecondspause       pause [on|off] | messageif on or off, switch autoPause on,else display message and wait for <ENTER>.(Not possible if script is from stdin)timer       timer <start|stop|print>start/stop a timervar         var name=valuecreate a local variable<other>     Any command supported by the target
Multiple serial ports found:
/dev/ttyACM1
/dev/ttyUSB0
/dev/ttyACM0

8. 上传到 AUR 仓库

从 AUR 上创建一个空仓库:

git clone ssh://aur@aur.archlinux.org/lpcscrypt-bin.git

添加刚才的 PKGBUILD .SRCINFO 文件到仓库中

git add PKGBUILD
git add .SRCINFO
cat > .gitignore << EOF
*
*.*
EOF
git add .gitignore -f
git commit -am "Update lpcscrypt-bin"
git push

https://aur.archlinux.org/packages/lpcscrypt-bin/

Arch Linux/其他 Linux 下给 Link2/LPC-Link2 调试器刷 CMSIS-DAP 和 J-Link 固件相关推荐

  1. linux的qt下wsadata,Qtcpserver仅在调试器下返回listen函数的未知错误

    当我尝试用QTcpServer监听任何端口,并在调试器下运行app时,我总是得到"未知错误".当我在没有调试器的情况下运行这个程序时 - 一切都很好. #include #incl ...

  2. Linux(Ubuntu)下C语言编译与调试

    Linux(Ubuntu)下C语言编译与调试 编译流程 gcc安装命令 sudo apt install build-essential vim/touch 创建源文件 vim打开编辑源文件(.c结尾 ...

  3. LINUX下的GNU调试工具,GNU调试器 GDB 8.3 发布及安装更新,支持RISC-V与IPv6连接等

    Joel Brobecker刚刚宣布了大型GDB 8.3功能版本. GNU调试器的这一更新带来了许多改进和新功能,可以帮助开发人员. GNU Debugger 8.3版本为RISC-V GNU / L ...

  4. Linux下gcc/g++编译器gdb调试器和makefile的使用

    文章目录 一.gcc的使用 gcc选项 二.gdb的使用 三.Linux项目自动化构建工具-make/Makefile 3.1 概念 3.2 使用 3.3 原理 一.gcc的使用 首先我们知道一个C/ ...

  5. Linux接口驱动03 - SWIM(脱离ST烧录器,单线完美升级STM8的固件,附带总结经验和源代码)

    一.需求概述 如何摆脱ST官方烧录器的束缚,编写一个Linux驱动,完成ARM-A9 Soc对STM8固件的升级烧录? 二.目标步骤: 1.准备好一个编译好的固件(bin格式文件): 2.平台Soc激 ...

  6. mac pro下安装gdb和delve调试器

    2019独角兽企业重金招聘Python工程师标准>>> 我用liteide进行go环境的配置,最近升级以后发现两个调试器都不能debug代码 了,主要原因有两个.一个是软件签名问题和 ...

  7. Linux(Ubuntu14.04)下安装Anaconda和Spyder

    Linux(Ubuntu14.04)下安装Anaconda是为了安装python所需要的各种库以及他们的环境配置. Spyder是使用python的IDE 安装python和pip 一般linux系统 ...

  8. Linux源码下Makefile详解(参照Documentation\kbuild\makefiles.txt和资料)-转

    1.Makefile的作用 (1)决定编译哪些文件 (2)怎样编译这些文件 (3)怎样连接这些文件,最重要的是它们的顺序如何 2.Linux内核Makefile分类 ***************** ...

  9. Linux(Centos6.5)下安装Vertica9.2.1数据库教程

    Linux(Centos6.5)下安装Vertica9.2.1数据库教程 一. 安装Vertica 1. 安装依赖或环境 [root@localhost ~]# yum install gdb –y ...

最新文章

  1. java messagebox 关闭_wince/WinForm下实现一个自动关闭的MessageBox
  2. linux关闭开发者模式的命今,CentOS防火墙用命令行方式关闭的方式
  3. TVM:使用 Schedule 模板和 AutoTVM 来优化算子
  4. SpringBoot 优雅的参数效验!
  5. Qt文档阅读笔记-OpenGL Window Example的解析笔记
  6. Apache POI导出Excel
  7. [裴礼文数学分析中的典型问题与方法习题参考解答]4.3.14
  8. Java 基础系列:不变性
  9. C++ Qt学习笔记(4)绘图
  10. python selenium框架_python+selenium之框架设计
  11. 手机号中间四位星号显示
  12. QYResearch回顾:2017年中国汽车语音识别系统产量为1413万
  13. android dns 测试工具,DNS Test测速工具
  14. mysql 版本号_详解MySQL并发控制及事务原理
  15. OSS实现多文件多线程的断点下载(java)
  16. 数据治理之元数据管理
  17. 高通芯片校准中的RGI、ICQ是什么意思,校准的特征化是什么意思?(转)
  18. 微信小程序appid的修改方法
  19. 【链环科技】微信公众号商城开发优势
  20. NYOJ 33 蛇形填数——————思维

热门文章

  1. 为校园超市系统增加购物车与订单功能
  2. Oracle函数——比较函数
  3. 城南花未开,老程已不在;
  4. 许多大学生喜欢玩计算机游戏英语作文,2016年12月大学英语四级作文范文:大学生玩游戏...
  5. win10麦克风说话没声音_电脑录屏,真的没那么麻烦
  6. SK海力士量产业界最高容量的移动端DRAM
  7. JDK17的安装教程
  8. 帆软初级证书 第三部分 FineBI 答案
  9. android 闹钟运行原理,简单 闹钟 实现 原理
  10. 3D语音天气球(源码分享)本文出自大苞米的博客(http://blog.csdn.net/a396901990)