Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / examples / platform / qpg6100 / README.md
1 # CHIP QPG6100 Example Application
2
3 An example application showing the use
4 [CHIP](https://github.com/project-chip/connectedhomeip) on the Qorvo QPG6100.
5
6 ---
7
8 -   [CHIP QPG6100 Example Application](#chip-qpg6100-example-application)
9     -   [Introduction](#introduction)
10     -   [Building](#building)
11     -   [Flashing the application](#flashing-the-application)
12     -   [Viewing Logging Output](#viewing-logging-output)
13
14 ---
15
16 ## Introduction
17
18 ![QPG6100 DK board](../../platform/qpg6100/doc/QPG6100_DK_Board.jpg)
19
20 Several example applications are provided to to demonstrate a CHIP  
21 device, with Thread connectivity, using BLE to perform CHIP provisioning  
22 on the Qorvo QPG6100 SDK. More information about each application can be  
23 found in the APPLICATION.md file found in the qpg6100 directory of the  
24 example application directory
25
26 Currently supported example applications
27
28 -   [~/examples/lighting-app/](../../../examples/lighting-app/qpg6100/APPLICATION.md)
29 -   [~/examples/lock-app/](../../../examples/lock-app/qpg6100/APPLICATION.md)
30
31 For more information on Qorvo and the platforms, please visit
32 [the Qorvo website](http://www.qorvo.com) or contact us on
33 LPW.support@qorvo.com.
34
35 ## Building
36
37 ### Preparation
38
39 -   Download and install a suitable ARM gcc tool chain:
40     [GNU Arm Embedded Toolchain 9-2019-q4-update](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)
41     (Direct download link:
42     [Linux](https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2)
43     [Mac OS X](https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2))
44
45 -   Install additional tools used by the CHIP build:
46
47 ```
48 # Linux
49 sudo apt-get install git make libtool ccache ninja-build
50 ```
51
52 ```
53 # Mac OS X
54 brew install libtool ccache ninja
55 ```
56
57 -   Clone the [CHIP](https://github.com/project-chip/connectedhomeip) repo into
58     a local directory
59
60 ```
61 cd ~
62 git clone https://github.com/project-chip/connectedhomeip.git
63 ```
64
65 -   The Qorvo CHIP SDK is added as a submodule in /third_party/qpg_sdk/repo. To
66     manually clone this repo you can clone it from
67     [CHIP SDK](https://github.com/Qorvo/qpg-connectedhomeip)
68
69 ```
70 cd ~
71 git clone https://github.com/Qorvo/qpg-connectedhomeip
72 ```
73
74 ### Compilation
75
76 -   Set the following environment variables before compilation:
77
78 ```
79 export ARM_GCC_INSTALL_ROOT=${HOME}/tools/gcc-arm-none-eabi-9-2019-q4-major/bin
80 export PATH=$PATH:$ARM_GCC_INSTALL_ROOT
81 ```
82
83 -   Optionally, to use a different version of the QPG6100 SDK from the one
84     bundled with CHIP:
85
86 ```
87 export QPG6100_SDK_ROOT=${HOME}/qpg-connectedhomeip
88 ```
89
90 -   All builds are GN/ninja based
91
92 ```
93 cd ~/connectedhomeip/examples/[lighting|lock]-app/qpg6100
94 source third_party/connectedhomeip/scripts/activate.sh
95 gn gen out/debug
96 ninja -C out/debug
97 ```
98
99 ## Flashing the application
100
101 The QPG6100 DK boards can be programmed using:
102
103 ### CMSIS-DAP Drag and Drop
104
105 Drag/copy the hex-file generated to the mBED drive that appears when plugging in
106 the DK board.
107
108 ### Segger JLink debugger
109
110 Connect the Segger J-Link to the programming header and use the Segger SW to
111 flash the .hex.
112
113 More detailed information to be included in SDK Documentation.
114
115 ## Viewing Logging Output
116
117 -   Launch a serial terminal with baudrate 115200.
118 -   At startup you will see:
119
120 ```
121 qvCHIP v0.0.0.0 (CL:155586) running
122 [P][-] Init CHIP Stack
123 [P][DL] BLEManagerImpl::Init() complete
124 [P][-] Starting Platform Manager Event Loop
125 [P][-] ==================================
126 [P][-] Qorvo [Application Name] Launching
127 [P][-] ==================================
128 [D][DL] CHIP task running
129 ```
130
131 -   Note! Logging is currently encapsulated by the Qorvo logging module.
132     Output  
133     will have additional header and footer bytes. This will be updated later  
134     into a raw stream for any serial terminal to parse.