Tool/software:
When I follow the instructions in the TI Compiler manual for ARM 20.2.7.LTS to build a custom library for Hercules RM48L952 chip, the process fails.
--> It seems the that the TI tool "mklib" cannot find the compiler tools, even though the directory is listed in the path. The error message says that "armcl: not found", even though the tools seem to be in the correct directory and the directory is listed in $PATH environment variable:
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin$ echo $PATH | grep "ti-cgt-arm_20.2.7.LTS/bin"
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_2.1.5.0_x64__8wekyb3d8bbwe:/mnt/c/SynaptiCAD/bin/win32:/mnt/c/Program Files/Python312/Scripts/:/mnt/c/Program Files/Python312/:/mnt/c/Program Files/VanDyke Software/Clients/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/010 Editor:/mnt/c/Program Files/Graphviz/bin:/mnt/c/Program Files/WinMerge:/mnt/c/Program Files/dotnet/:/mnt/c/SynaptiCAD/bin:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Strawberry/c/bin:/mnt/c/Strawberry/perl/site/bin:/mnt/c/Strawberry/perl/bin:/mnt/c/Program Files (x86)/HP/Common/HPDestPlgIn/:/mnt/c/Program Files/PuTTY/:/mnt/c/Users/Kip_Leitner/AppData/Local/Programs/Python/Python311/Scripts/:/mnt/c/Users/Kip_Leitner/AppData/Local/Programs/Python/Python311/:/mnt/c/Users/Kip_Leitner/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files (x86)/Nmap:/mnt/c/Users/Kip_Leitner/AppData/Local/Programs/MiKTeX/miktex/bin/x64/:/mnt/c/Users/Kip_Leitner/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/Kip_Leitner/Documents/Software/Arm_Compiler/w64-i686/arm-gnu-toolchain-12.3.rel1-mingw-w64-i686-arm-none-eabi/bin:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib:/mnt/c/ti/ccs1240/ccs/utils/cygwin:/mnt/c/ti/ccs1240/ccs/utils/bin:/mnt/c/Users/Kip_Leitner/Documents/_cmds:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin:/mnt/c/Program Files/ArmCompilerforEmbeddedFuSa6.16.2/bin:/mnt/c/Program Files (x86)/HP/Common/HPDestPlgIn/:/snap/bin
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin$ ll
total 71160
drwxrwxrwx 1 kleitner kleitner 4096 Jun 11 16:10 ./
drwxrwxrwx 1 kleitner kleitner 4096 Jun 4 16:59 ../
-rwxrwxrwx 1 kleitner kleitner 1086584 Aug 7 2022 armabs.exe*
-rwxrwxrwx 1 kleitner kleitner 5353584 Aug 7 2022 armacpia.exe*
-rwxrwxrwx 1 kleitner kleitner 1883760 Aug 7 2022 armadv.exe*
-rwxrwxrwx 1 kleitner kleitner 1036408 Aug 7 2022 armar.exe*
-rwxrwxrwx 1 kleitner kleitner 2187888 Aug 7 2022 armasm.exe*
-rwxrwxrwx 1 kleitner kleitner 7891568 Aug 7 2022 armcg.exe*
-rwxrwxrwx 1 kleitner kleitner 2589808 Aug 7 2022 armcl.exe*
-rwxrwxrwx 1 kleitner kleitner 344696 Aug 7 2022 armclist.exe*
-rwxrwxrwx 1 kleitner kleitner 505968 Aug 7 2022 armdem.exe*
-rwxrwxrwx 1 kleitner kleitner 1230448 Aug 7 2022 armdis.exe*
-rwxrwxrwx 1 kleitner kleitner 1281648 Aug 7 2022 armembed.exe*
-rwxrwxrwx 1 kleitner kleitner 1624688 Aug 7 2022 armhex.exe*
-rwxrwxrwx 1 kleitner kleitner 2796144 Aug 7 2022 armilk.exe*
-rwxrwxrwx 1 kleitner kleitner 1418872 Aug 7 2022 armlibinfo.exe*
-rwxrwxrwx 1 kleitner kleitner 4849264 Aug 7 2022 armlnk.exe*
-rwxrwxrwx 1 kleitner kleitner 1126000 Aug 7 2022 armnm.exe*
-rwxrwxrwx 1 kleitner kleitner 3650160 Aug 7 2022 armobjcopy.exe*
-rwxrwxrwx 1 kleitner kleitner 6099568 Aug 7 2022 armobjdump.exe*
-rwxrwxrwx 1 kleitner kleitner 1609840 Aug 7 2022 armofd.exe*
-rwxrwxrwx 1 kleitner kleitner 10645624 Aug 7 2022 armopt.exe*
-rwxrwxrwx 1 kleitner kleitner 1270904 Aug 7 2022 armpdd.exe*
-rwxrwxrwx 1 kleitner kleitner 1252976 Aug 7 2022 armpprof.exe*
-rwxrwxrwx 1 kleitner kleitner 5690480 Aug 7 2022 armreadelf.exe*
-rwxrwxrwx 1 kleitner kleitner 3163768 Aug 7 2022 armsize.exe*
-rwxrwxrwx 1 kleitner kleitner 1082488 Aug 7 2022 armstrip.exe*
-rwxrwxrwx 1 kleitner kleitner 1132664 Aug 7 2022 armxref.exe*
The process we are supposed to follow used TI CCS VERSION 5, which is many years old. There are mistakes in the Compiler manual.
The process is described in section 7.4 of TI document spnu151w.pdf
Here is the history of what I did, including error message at the end. I am using Ubuntu 22.04 LTS installed as type 2 Windows System Linux ("WSL"), Windows 10.
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS$ ll
total 468
drwxrwxrwx 1 kleitner kleitner 4096 Jun 4 16:59 ./
drwxrwxrwx 1 kleitner kleitner 4096 Jan 19 17:48 ../
-rwxrwxrwx 1 kleitner kleitner 73350 Aug 7 2022 ARM_RTS_20.2.7.LTS_manifest.html*
-rwxrwxrwx 1 kleitner kleitner 294487 Aug 7 2022 ARM_RTS_20_2_0_LTS_398fd574-6305-440f-a001-432098e8e134.spdx*
-rwxrwxrwx 1 kleitner kleitner 74788 Aug 7 2022 README.html*
drwxrwxrwx 1 kleitner kleitner 4096 Jun 11 16:10 bin/
drwxrwxrwx 1 kleitner kleitner 4096 Aug 25 2023 include/
drwxrwxrwx 1 kleitner kleitner 4096 Jun 11 16:18 lib/
drwxrwxrwx 1 kleitner kleitner 4096 Aug 25 2023 man/
-rwxrwxrwx 1 kleitner kleitner 31334 Aug 7 2022 misra.txt*
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib$ which sh
/usr/bin/sh
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib$ which bash
/usr/bin/bash
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib$ which make
/usr/bin/make
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib$ which gmake
/usr/bin/gmake
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib$ make -v
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib$ gmake -v
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib$ cat mklib_Islander.sh
#!/bin/bash
PATTERN="--pattern=rtsv7R4_A_le_v3D16_eabi.lib"
EXTRA_OPTIONS="--extra_options=\"g\""
COMPILER_BIN_DIR="--compiler_bin_dir=/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin"
INDEX="--index=/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib/lib" #note the "lib/lib" kludge
NAME="--name=rtsv7R4_A_le_v3D16_eabi_debug.lib"
INSTALL_TO="--install_to /mnt/c/Users/Kip_Leitner/workspace_v12/Config_01_POC/Debug"
VERBOSE="--verbose"
mklib $PATTERN $EXTRA_OPTIONS $COMPILER_BIN_DIR $INDEX $NAME $INSTALL_TO $VERBOSE
exit 0
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib$ ./mklib_Islander.sh
Building /mnt/c/Users/Kip_Leitner/workspace_v12/Config_01_POC/Debug/rtsv7R4_A_le_v3D16_eabi_debug.lib from pattern rtsv7R4_A_le_v3D16_eabi.lib
Work directory : /tmp/TI_MKLIBo2VAxr
mkdir /tmp/TI_MKLIBo2VAxr
mkdir /tmp/TI_MKLIBo2VAxr/OBJ
mkdir /tmp/TI_MKLIBo2VAxr/OBJ/AUTOSAR31
mkdir /tmp/TI_MKLIBo2VAxr/OBJ/libcxx
mkdir /tmp/TI_MKLIBo2VAxr/OBJ/libcxx/ext
mkdir /tmp/TI_MKLIBo2VAxr/OBJ/libcxx/include
mkdir /tmp/TI_MKLIBo2VAxr/OBJ/libcxx/support/runtime
mkdir /tmp/TI_MKLIBo2VAxr/OBJ/libcxx/support/ti
mkdir /tmp/TI_MKLIBo2VAxr/OBJ/machine
mkdir /tmp/TI_MKLIBo2VAxr/OBJ/stlport
mkdir /tmp/TI_MKLIBo2VAxr/OBJ/sys
mkdir /tmp/TI_MKLIBo2VAxr/OBJ/xlocale
cd /mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib/src
/usr/bin/gmake -r -j 1 library CMD_FILE="/tmp/TI_MKLIBo2VAxr/_Makefile.cmd"
armcl dtor_list.c "g" --fp_mode=strict --no_visible_enums --gen_func_subsections=on -mv7R4 --abi=eabi --float_support=vfpv3d16 -D_TI_USING_LIBCXX -me -c --ti_lib --keep_unneeded_types=false --diag_warning=225 --quiet -O4 --rtti -fg --building_runtime -DCHECKING=0 -I/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib/src -fe /tmp/TI_MKLIBo2VAxr/OBJ/dtor_list.c.obj -fs /tmp/TI_MKLIBo2VAxr/OBJ -ft /tmp/TI_MKLIBo2VAxr/OBJ -ppa -ppd=/tmp/TI_MKLIBo2VAxr/OBJ/dtor_list.c.pp
/usr/bin/sh: 1: armcl: not found
gmake: *** [Makefile:1931: /tmp/TI_MKLIBo2VAxr/OBJ/dtor_list.c.obj] Error 127
>> ERROR: mklib: gmake error during rtsv7R4_A_le_v3D16_eabi_debug.lib build
kleitner@xDER-kleitner-2:/mnt/c/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib$