Skip to content

Commit 0254974

Browse files
authored
Merge pull request #52 from qualcomm/feature/arm64
Native ARM64 support & MCP Example
2 parents d839465 + 125070a commit 0254974

34 files changed

Lines changed: 2681 additions & 684 deletions

.github/workflows/build.yml

Lines changed: 62 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
14
name: CMake Build
25

36
on: [push, pull_request]
@@ -37,6 +40,23 @@ jobs:
3740
shell: pwsh
3841
run: curl --ssl-no-revoke "https://web.archive.org/web/20250820134143/https://ftdichip.com/wp-content/uploads/2023/09/CDM-v2.12.36.4-WHQL-Certified.zip" -o "third-party\CDM-v2.12.36.4-WHQL-Certified.zip"
3942

43+
fetch-ftdi-windows-arm64:
44+
runs-on: windows-11-arm
45+
steps:
46+
- uses: actions/checkout@v6
47+
48+
- name: Cache FTDI archive for ARM64
49+
id: cache-ftdi-windows-arm64
50+
uses: actions/cache@v5
51+
with:
52+
path: third-party\CDM-v2.12.36.20-for-ARM64-WHQL-Certified.zip
53+
key: ftdi-windows-arm64-2.12.36.20
54+
55+
- name: Download FTDI archive for ARM64
56+
if: steps.cache-ftdi-windows-arm64.outputs.cache-hit != 'true'
57+
shell: pwsh
58+
run: curl --ssl-no-revoke "https://web.archive.org/web/20250821211500/https://ftdichip.com/wp-content/uploads/2025/03/CDM-v2.12.36.20-for-ARM64-WHQL-Certified.zip" -o "third-party\CDM-v2.12.36.20-for-ARM64-WHQL-Certified.zip"
59+
4060
build-linux:
4161
needs: fetch-ftdi-linux
4262
runs-on: ${{ matrix.os }}
@@ -45,15 +65,14 @@ jobs:
4565
matrix:
4666
os: [ubuntu-22.04, ubuntu-latest]
4767
qt_version: ['6.9.2', '6.10.0']
48-
build_type: [Debug, Release]
4968

5069
steps:
5170
- uses: actions/checkout@v6
5271

5372
- name: Install dependencies
5473
run: |
5574
sudo apt-get update
56-
sudo apt-get install -y python3-pip wget libxkbcommon-x11-0 x11-common libxcb-xinerama0-dev build-essential libgl1-mesa-dev mesa-common-dev uuid-dev libpulse-dev
75+
sudo apt-get install -y python3-pip wget libxkbcommon-x11-0 x11-common libxcb-xinerama0-dev build-essential libgl1-mesa-dev mesa-common-dev uuid-dev libpulse-dev ninja-build
5776
5877
- name: Cache Qt installation on Linux
5978
uses: actions/cache@v5
@@ -66,29 +85,17 @@ jobs:
6685

6786
- name: Install Qt ${{ matrix.qt_version }} on ${{ matrix.os }}
6887
run: |
69-
aqt install-qt linux desktop ${{ matrix.qt_version }} linux_gcc_64
7088
aqt install-qt linux desktop ${{ matrix.qt_version }} linux_gcc_64 -m qtmultimedia qtserialport
71-
echo "QT_ROOT_DIR=$HOME/work/qcom-test-automation-controller/qcom-test-automation-controller/${{ matrix.qt_version }}/gcc_64" >> $GITHUB_ENV
72-
echo "$HOME/work/qcom-test-automation-controller/qcom-test-automation-controller/${{ matrix.qt_version }}/gcc_64/bin" >> $GITHUB_PATH
89+
echo "QTBIN=$HOME/work/qcom-test-automation-controller/qcom-test-automation-controller/${{ matrix.qt_version }}/gcc_64/bin" >> $GITHUB_ENV
7390
7491
- name: Restore FTDI archive on Linux
7592
uses: actions/cache/restore@v5
7693
with:
7794
path: third-party/libftd2xx-linux-x86_64-1.4.33.tgz
7895
key: ftdi-linux-1.4.33
7996

80-
- name: Extract FTDI library on Linux
81-
run: |
82-
mkdir -p __Builds/Linux/Debug/lib __Builds/Linux/Release/lib
83-
tar -xvf third-party/libftd2xx-linux-x86_64-1.4.33.tgz -C third-party/
84-
find third-party/ -name "libftd2xx-static.a" -exec cp {} __Builds/Linux/Debug/lib/libftd2xx.a \;
85-
cp __Builds/Linux/Debug/lib/libftd2xx.a __Builds/Linux/Release/lib/libftd2xx.a
86-
87-
- name: Configure CMake for ${{ matrix.build_type }}
88-
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_PREFIX_PATH="$QT_ROOT_DIR/lib/cmake"
89-
90-
- name: Build with ${{ matrix.build_type }}
91-
run: cmake --build build --config ${{ matrix.build_type }}
97+
- name: Build
98+
run: ./build.sh
9299

93100
build-windows:
94101
needs: fetch-ftdi-windows
@@ -97,7 +104,6 @@ jobs:
97104
fail-fast: false
98105
matrix:
99106
qt_version: ['6.9.2', '6.10.0']
100-
build_type: [Debug, Release]
101107

102108
steps:
103109
- uses: actions/checkout@v6
@@ -116,45 +122,51 @@ jobs:
116122
shell: pwsh
117123
run: |
118124
aqt install-qt windows desktop ${{ matrix.qt_version }} win64_msvc2022_64 --outputdir "C:\Qt" -m qtserialport qtmultimedia
119-
120-
$qtRoot = "C:\Qt\${{ matrix.qt_version }}\msvc2022_64"
121-
echo "QT_ROOT_DIR=$qtRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
122-
echo "$qtRoot\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
125+
echo "QTBIN=C:\Qt\${{ matrix.qt_version }}\msvc2022_64\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
123126
124127
- name: Restore FTDI archive on Windows
125128
uses: actions/cache/restore@v5
126129
with:
127130
path: third-party\CDM-v2.12.36.4-WHQL-Certified.zip
128131
key: ftdi-windows-2.12.36.4
129132

130-
- name: Extract FTDI library on Windows
131-
shell: pwsh
132-
run: |
133-
$debugLib = "__Builds\x64\Debug\lib"
134-
$releaseLib = "__Builds\x64\Release\lib"
135-
$debugBin = "__Builds\x64\Debug\bin"
136-
$releaseBin = "__Builds\x64\Release\bin"
137-
New-Item -ItemType Directory -Force -Path $debugLib, $releaseLib, $debugBin, $releaseBin | Out-Null
138-
139-
$tmp = "third-party\ftdi_extract"
140-
Expand-Archive -Path "third-party\CDM-v2.12.36.4-WHQL-Certified.zip" -DestinationPath $tmp -Force
141-
142-
$lib = Get-ChildItem -Path $tmp -Filter "ftd2xx.lib" -Recurse | Where-Object { $_.FullName -match "amd64" } | Select-Object -First 1
143-
if (-not $lib) { $lib = Get-ChildItem -Path $tmp -Filter "ftd2xx.lib" -Recurse | Select-Object -First 1 }
144-
Copy-Item $lib.FullName -Destination $debugLib
145-
Copy-Item $lib.FullName -Destination $releaseLib
146-
147-
$dll = Get-ChildItem -Path $tmp -Filter "FTD2XX64.dll" -Recurse | Select-Object -First 1
148-
if ($dll) {
149-
Copy-Item $dll.FullName -Destination "$debugBin\ftd2xx.dll"
150-
Copy-Item $dll.FullName -Destination "$releaseBin\ftd2xx.dll"
151-
}
152-
Remove-Item -Recurse -Force $tmp
153-
154-
- name: Configure CMake for ${{ matrix.build_type }}
133+
- name: Build
134+
shell: cmd
135+
run: build.bat x64
136+
137+
build-windows-arm64:
138+
needs: fetch-ftdi-windows-arm64
139+
runs-on: windows-11-arm
140+
strategy:
141+
fail-fast: false
142+
matrix:
143+
qt_version: ['6.9.2', '6.10.0']
144+
145+
steps:
146+
- uses: actions/checkout@v6
147+
148+
- name: Install Python dependencies
155149
shell: pwsh
156-
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_PREFIX_PATH="$env:QT_ROOT_DIR\lib\cmake"
150+
run: pip install aqtinstall
157151

158-
- name: Build with ${{ matrix.build_type }}
152+
- name: Cache Qt installation for ARM64
153+
uses: actions/cache@v5
154+
with:
155+
path: C:\Qt\${{ matrix.qt_version }}\msvc2022_arm64
156+
key: windows-arm64-qt-${{ matrix.qt_version }}
157+
158+
- name: Install Qt ${{ matrix.qt_version }} for MSVC ARM64
159159
shell: pwsh
160-
run: cmake --build build --config ${{ matrix.build_type }}
160+
run: |
161+
aqt install-qt windows_arm64 desktop ${{ matrix.qt_version }} win64_msvc2022_arm64 --outputdir "C:\Qt" --autodesktop -m qtserialport qtmultimedia
162+
echo "QTBIN=C:\Qt\${{ matrix.qt_version }}\msvc2022_arm64\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
163+
164+
- name: Restore FTDI archive for ARM64
165+
uses: actions/cache/restore@v5
166+
with:
167+
path: third-party\CDM-v2.12.36.20-for-ARM64-WHQL-Certified.zip
168+
key: ftdi-windows-arm64-2.12.36.20
169+
170+
- name: Build
171+
shell: cmd
172+
run: build.bat ARM64

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ ui_*
2323
**/*/dist
2424
__pycache__/
2525
.pytest_cache/
26+
*.egg-info/
27+
*.pyc
28+
*.pyo
29+
*.pyd
30+
31+
# MCP logs
32+
examples/MCP/**/*.log
2633

2734
# Qt build directory
2835
__Builds/

CMakeLists.txt

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,5 @@
1-
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2-
#
3-
# Redistribution and use in source and binary forms, with or without
4-
# modification, are permitted (subject to the limitations in the
5-
# disclaimer below) provided that the following conditions are met:
6-
#
7-
# * Redistributions of source code must retain the above copyright
8-
# notice, this list of conditions and the following disclaimer.
9-
#
10-
# * Redistributions in binary form must reproduce the above
11-
# copyright notice, this list of conditions and the following
12-
# disclaimer in the documentation and/or other materials provided
13-
# with the distribution.
14-
#
15-
# * Neither the name of Qualcomm Technologies, Inc. nor the names of its
16-
# contributors may be used to endorse or promote products derived
17-
# from this software without specific prior written permission.
18-
#
19-
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
20-
# GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
21-
# HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
22-
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23-
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25-
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26-
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
27-
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
29-
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30-
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
31-
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32-
33-
# Author: Biswajit Roy (biswroy@qti.qualcomm.com)
1+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2+
# SPDX-License-Identifier: BSD-3-Clause
343

354
cmake_minimum_required(VERSION 3.22)
365
project(QTAC-Workspace VERSION 1.0 LANGUAGES CXX)

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,26 @@ QTAC is a software suite that enables users to control Qualcomm devices remotely
5252
| **OS** | Windows / Debian | Windows 10+ / Ubuntu 22.04+ |
5353
| **Compiler** | [MSVC 2022](https://aka.ms/vs/17/release/vs_community.exe) / GCC | MSVC 2022 / GCC-11, G++-11, GLIBC-2.35 |
5454
| **Build System** | [CMake](https://cmake.org/download/) | 3.22+ |
55+
| **Build Tool** | [Ninja](https://ninja-build.org/) (via Qt installer, system package manager, or direct download) | 1.10+ |
5556
| **UI Framework** | [Qt Open-source](https://www.qt.io/download-qt-installer-oss) | 6.9.0+ |
5657

5758
> [!NOTE]
58-
> Review license terms for [Visual Studio](https://visualstudio.microsoft.com/license-terms/) and [Qt](https://www.qt.io/development/download-open-source). MSVC 2022 is linked as Qt doesn't support MSVC 2026 yet.
59+
> Review license terms for [Visual Studio](https://visualstudio.microsoft.com/license-terms/) and [Qt](https://www.qt.io/development/download-open-source). MSVC 2022 is linked as Qt does not yet support later MSVC versions.
5960
6061
### Drivers
6162

6263
- **[FTDI D2XX drivers](https://ftdichip.com/drivers/d2xx-drivers/)**: For debug board interaction.
6364
- **[Qualcomm USB Drivers](https://softwarecenter.qualcomm.com/catalog/item/Qualcomm_Userspace_Driver)**: To view device status.
6465

6566
> [!NOTE]
66-
> FTDI libraries are installed _automatically_ during the cmake configuration step when building from source.
67+
> FTDI libraries are downloaded _automatically_ during the cmake configuration step when building from source.
68+
> If the automatic download fails (e.g. due to network restrictions), download the archive manually and place it in the `third-party/` directory before re-running cmake:
69+
>
70+
> | Platform | Archive |
71+
> | :-- | :-- |
72+
> | **Windows x64** | [`CDM-v2.12.36.4-WHQL-Certified.zip`](https://web.archive.org/web/20250820134143/https://ftdichip.com/wp-content/uploads/2023/09/CDM-v2.12.36.4-WHQL-Certified.zip) |
73+
> | **Windows ARM64** | [`CDM-v2.12.36.20-for-ARM64-WHQL-Certified.zip`](https://web.archive.org/web/20250821211500/https://ftdichip.com/wp-content/uploads/2025/03/CDM-v2.12.36.20-for-ARM64-WHQL-Certified.zip) |
74+
> | **Linux x86_64** | [`libftd2xx-linux-x86_64-1.4.33.tgz`](https://web.archive.org/web/20250822044524/https://ftdichip.com/wp-content/uploads/2025/03/libftd2xx-linux-x86_64-1.4.33.tgz) |
6775
6876
### Optional Software
6977

@@ -84,29 +92,40 @@ git clone https://github.com/qualcomm/qcom-test-automation-controller.git
8492
1. **Visual Studio**: Install **Desktop development with C++** and **.NET desktop development**.
8593
![Desktop development with C++](./docs/resources/qtac-msvc-2022-requirements.png)
8694
2. **Qt**: Install Qt 6.9+ for **MSVC 2022 64-bit**, **Qt Serial Port** and **Qt Multimedia** components.
95+
For ARM64, also install the **MSVC 2022 ARM64** Qt component.
8796

8897
> [!NOTE]
8998
> Installation using Qt Online Installer will require users to create a Qt account.
9099
3. **Environment Variable**:
100+
101+
**x64**:
91102
```cmd
92103
setx QTBIN C:\Qt\<version>\msvc2022_64\bin
93104
```
105+
**ARM64**:
106+
```cmd
107+
setx QTBIN C:\Qt\<version>\msvc2022_arm64\bin
108+
```
94109

95110
### Build & Usage
96111

97112
Execute `build.bat` to generate executables:
98113

99114
```cmd
100-
build.bat
115+
build.bat (x64, default)
116+
build.bat ARM64 (ARM64)
101117
```
102118

103119
**Build output**:
104-
- Debug: `__Builds\x64\Debug`
105-
- Release: `__Builds\x64\Release`
120+
- x64 Debug: `__Builds\x64\Debug`
121+
- x64 Release: `__Builds\x64\Release`
122+
- ARM64 Debug: `__Builds\ARM64\Debug`
123+
- ARM64 Release: `__Builds\ARM64\Release`
106124

107125
**Usage**:
108126
```cmd
109127
__Builds\x64\Release\QTAC.exe
128+
__Builds\ARM64\Release\QTAC.exe
110129
```
111130

112131
## Linux Guide
@@ -132,7 +151,7 @@ __Builds\x64\Release\QTAC.exe
132151
sudo cp udev-rules/99-QTAC-USB.rules /etc/udev/rules.d/
133152
sudo udevadm control --reload
134153
```
135-
4. **Environment Variable**:
154+
3. **Environment Variable**:
136155
```bash
137156
export QTBIN=/path/to/Qt/directory/<version>/gcc_64/bin
138157
```
@@ -149,9 +168,6 @@ Execute `build.sh` to generate executables:
149168
- Debug: `__Builds/Linux/Debug`
150169
- Release: `__Builds/Linux/Release`
151170

152-
> [!NOTE]
153-
> Ensure that [make](https://www.gnu.org/software/make/) is available in your environment before building.
154-
155171
**Usage**:
156172
```bash
157173
./__Builds/Linux/Release/QTAC

0 commit comments

Comments
 (0)