\`
`labs\vital_signs\68xx_vital_signs\prebuilt_binaries`
## 3. Setup the EVM for Functional Mode
* For MMWAVEICBOOST + IWR6843ISK/ODS/AOP setup: Follow the instructions for [Hardware Setup of MMWAVEICBOOST + Antenna Module for Functional Mode](../../../common/docs/hardware_setup/hw_setup_mmwaveicboost_mode_functional.html)
At this point, the EVM should be powered, connected to the PC, flashed with the demo, and put in functional mode. The hardware setup is now complete.
## 4. Run the Lab
-----------
To run the lab, launch and configure the visualizer which displays the detection and tracked object data received via UART.
[[y! Note:
The visualizer can only run with the following:
[Industrial mmWave Carrier Board](http://www.ti.com/tool/MMWAVEICBOOST) +
[IWR6843ISK Antenna Module](http://www.ti.com/tool/IWR6843ISK)
OR
+
[IWR6843ISK-ODS Antenna Module](http://www.ti.com/tool/IWR6843ISK-ODS)
OR
+
[IWR6843AOPEVM](http://www.ti.com/tool/IWR6843AOPEVM).]]
### Launch the visualizer:
* Navigate to folder `\labs\vital_signs\68xx_vital_signs\gui\gui_exe`
* Run `VitalSignsRadar_Demo.exe`
* Two windows should open i.e. a Display prompt window and a GUI window. If the EVM is connected to the PC, then the display prompt window should successfully open the COM ports (to double check, make sure they match with the port numbers on the Device Manager).
* In the GUI window, the **User UART COM Port** and **Data COM Port** fields should automatically be filled with the correct port numbers (Make sure that no other EVM is connected to the USB ports of the PC)
* If the GUI does not open you might need the vc runtime which can be [downloaded here](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)
* Press the **Start** Push button in the GUI. In the Display Prompt window you should see the configuration settings being read from the configuration text file and sent through the UART to the EVM
* As soon as the **sensorStart** command is sent, the GUI should start displaying the data
### Sensor Placement:
* For **Sensor in Front** the EVM shuld be mounted upright while subject should sit facing in a chair about .3-.8m in front.
* For initial measurement subject should stay still for 10-15 seconds to allow the application to calibrate. For subsequent measurements the subject must stay still for 5-10 seconds.
* For **Sensor in Back**, the EVM can be placed in the back of a car seat or in a seat cushion. This can be done by placing the EVM in an enclosure as shown below.
Developer's Guide
===========
Build the Firmware from Source Code
-----------
### 1. Software Requirements
Tool | Version |Download Link
----------------------------|---------------|--------
mmWave Industrial Toolbox | Latest | [mmWave Industrial Toolbox](http://dev.ti.com/tirex/explore/node?node=AJoMGA2ID9pCPWEKPi16wg__VLyFKFf__LATEST)
TI mmWave SDK | 3.5.x.x | [TI mmWave SDK 3.5](http://software-dl.ti.com/ra-processors/esd/MMWAVE-SDK/03_04_00_03/index_FDS.html) and all the related tools are required to be installed as specified in the [mmWave SDK release notes](http://software-dl.ti.com/ra-processors/esd/MMWAVE-SDK/latest/exports/mmwave_sdk_release_notes.pdf)
Code Composer Studio | 8.3.1 | [Code Composer Studio v8.3.1](http://processors.wiki.ti.com/index.php/Download_CCS#Code_Composer_Studio_Version_8_Downloads)
### 2. Import Lab Project
For the Vital Signs 68xx Lab, there are two projects, the DSS for the C674x DSP core and the MSS project for the R4F core, that need to be imported to CCS and compiled to generate firmware for the xWR6843.
* Start CCS and setup workspace as desired.
* Import the projects below to CCS using either TI Resource Explorer in CCS or CCS Import Projectspecs method:
* **vital_signs_68xx_dss.projectspec**
* **vital_signs_68xx_mss.projectspec**
[[+d Expand for details on importing via TI Resource Explorer in CCS
* In the top toolbar, navigate to **View → Resource Explorer**
* In the **Resource Explorer** side panel (not the main panel with "Welcome to.."), navigate to **Software → mmWave Sensors → Industrial Toolbox → Labs → Vital Signs - 68xx**
* Under the expanded **Vital Signs - 68xx** folder, there should be two CCS projects, **CCS Project - DSS** and **CCS Project - MSS**.
* For each of the two projects: Click on the project, which should open the project in the right main panel, and then click on the Import to IDE button .
+]]
[[+d Expand for details on importing via CCS Import Projectspecs
* In the top toolbar, navigate to **Project > Import CCS Projects...**
* With the **Select search-directory** option enabled, click **Browse...**, navigate to the **lab0026_vital_signs_68xx** folder at `\labs\vital_signs\68xx_vital_signs`, and then click **OK**.
* Under **Discovered projects**, select **vital_signs_68xx_dss** and **vital_signs_68xx_mss** (ignore any other projects), then click **Finish**.
+]]
[[g! Successful Import to IDE
After using either method, both project should be visible in **CCS Project Explorer**
]]
[[b! Project Workspace
When importing projects to a workspace, a copy is created in the workspace. All modifications will only be implemented for the workspace copy. The original project downloaded in mmWave Industrial Toolbox is not touched.
]]
### 3. Build the Lab
#### **Build DSS Project**
The DSS project must be built before the MSS project.
With the **vital_signs_68xx_dss** project selected in **Project Explorer**, right click on the project and select **Rebuild Project**. Selecting **Rebuild** instead of **Build** ensures that the project is always re-compiled. This is especially important in case the previous build failed with errors.
[[g! Successful DSS Project Build
In the **Project Explorer** panel, navigate to and expand **vital_signs_68xx_dss → Debug** directory. The project has been successfully built if the following files appear in the **Debug** folder:
* vital_signs_68xx_dss.bin
* vital_signs_68xx_dss.xe674
]]
#### **Build MSS Project**
After the DSS project is successfully built, select **vital_signs_68xx_mss** in **Project Explorer**, right click on the project and select **Rebuild Project**.
[[g! Successful MSS Project Build
In the **Project Explorer** panel, navigate to and expand **vital_signs_68xx_mss → Debug** directory. The project has been successfully built if the following files appear in the **Debug** folder:
* vital_signs_68xx_mss.xer4f
* vital_signs_demo_68xx.bin
]]
[[r! Build Fails with Errors
If the build fails with errors, please ensure that all the prerequisites are installed as mentioned in [Software Requirements](#software_requirements).
]]
### 4. Execute the Lab
There are two ways to execute the compiled code on the EVM:
* Deployment mode: the EVM boots autonomously from flash and starts running the bin image
* Using Uniflash, flash the **vital_signs_demo_68xx_mss.bin** found at `\vital_signs_68xx_mss\Debug\vital_signs_demo_68xx_mss.bin`
* The procedure to flash the EVM is the same as detailed in the [Flash the EVM](#flash_the_evm) section.
* Debug mode: enables connection with CCS while lab is running; useful during development and debugging
[[+d Expand for help with Debug mode:
The CCS debug firmware (provided with the mmWave SDK) needs to be flashed once on the EVM.
* CCS Debug method is enabled by flashing the CCS Debug Firmware (provided with the mmWave SDK) using the methods covered in the Quickstart section.
* Use the following image instead
Image | Location | Comment
----------------|--------------|------------------------
Meta Image 1 | `C:\ti\mmwave_sdk_\packages\ti\utils\ccsdebug\xwr68xx_ccsdebug.bin` | Provided with the mmWave SDK
After the CCS debug firmware has been flashed, connect the EVM to CCS
* Create a target configuration (skip to "Open the target..." if config already created previously in another lab for xwr68xx)
* Go to **File → New → New Target Configuration File**
* Specify an appropriate file name (ex: IWR68xx.ccxml) and check "**Use shared location**". Click **Finish**.
* In the configuration editor window:
* Select **Texas Instruments XDS110 USB Debug Probe** for Connection
* Select **IWR6843** device in the Board or Device text box.
* Press the **Save** button to save the target configuration.
* [Optional]: Press the **Test Connection** button to check the connection with the board.
* Open the target configuration window by going to **View → Target Configurations**.
* Under **User Defined** configurations the target configuration previously created should appear.
* Right click on the target configuration and select **Launch Select Configuration**. The target configuration will launch in the **Debug Window**.
* Group cores and connect
* Select both the **Texas Instruments XDS110 USB Debug probe/C674X_0** and **Texas Instruments XDS110 USB Debug probe/Cortex_R4_0** and then right click and select **Group core(s)**
* Select **Group 1** and then right click and select **Connect Target**
* Load the binary
* Once both targets are connected, click on the C674X_0 target and then click **Load** button in the toolbar.
* In the **Load Program** dialog, press the **Browse Project** button .
* Select **vital_signs_demo_68xx_dss.xe674** found at `\vital_signs_demo_68xx_dss\Debug\vital_signs_demo_68xx_dss.xe674` and press **Ok**.
* Press **Ok** again in the **Load Program** dialog.
* Repeat the above Load the Binary process for the Cortex_R4_0 target, selecting instead **vital_signs_demo_68xx_mss.xer4f** found at `\vital_signs_demo_68xx_dss\Debug\vital_signs_demo_68xx_dss.xer4f`
* Run the binary
* Select **Group 1**, press the **Run/Resume** button
* The program should start executing and generate console output.
+]]
To run the lab, launch and configure the visualizer which displays the detection and tracked object data received via UART.
[[y! Note:
The visualizer can only run with the following:
[Industrial mmWave Carrier Board](http://www.ti.com/tool/MMWAVEICBOOST) +
[IWR6843ISK Antenna Module](http://www.ti.com/tool/IWR6843ISK)
OR
+
[IWR6843ISK-ODS Antenna Module](http://www.ti.com/tool/IWR6843ISK-ODS)
OR
+
[IWR6843AOPEVM](http://www.ti.com/tool/IWR6843AOPEVM).]]
#### **Launch the visualizer**
* Navigate to folder `\labs\vital_signs\68xx_vital_signs\gui\gui_exe`
* Run `VitalSignsRadar_Demo.exe`
* Two windows should open i.e. a Display prompt window and a GUI window. If the EVM is connected to the PC, then the display prompt window should successfully open the COM ports (to double check, make sure they match with the port numbers on the Device Manager).
* In the GUI window, the **User UART COM Port** and **Data COM Port** fields should automatically be filled with the correct port numbers (Make sure that no other EVM is connected to the USB ports of the PC)
* If the GUI does not open you might need the vc runtime which can be [downloaded here](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)
* Press the **Start** Push button in the GUI. In the Display Prompt window you should see the configuration settings being read from the configuration text file and sent through the UART to the EVM
* As soon as the **sensorStart** command is sent, the GUI should start displaying the data
#### **Configuring the GUI**
* The mmWave sensor device and algorithm configurations are set through the configuration text file. These files are located
in `\labs\vital_signs\68xx_vital_signs\gui\profiles`
* Configuration commands relevant to the vital signs algorithm are **vitalSignsCfg** and **motionDetection**
* **vitalSignsCfg**
* **motionDetection** The purpose of this block is to discard the data segments that might be corrupted by large amplitude movements. The heart waveform is divided into segment of L samples. If the energy within this data segment exceeds a user-defined threshold ETh then all the samples are discarded from the time-domain heart waveform.
#### **Output Packet**
The format of the UART Data Stream is below:
#### **Sensor Placement**
* For **Sensor in Front** the EVM shuld be mounted upright while subject should sit facing in a chair about .3-.8m in front.
* For initial measurement subject should stay still for 10-15 seconds to allow the application to calibrate. For subsequent measurements the subject must stay still for 5-10 seconds.
* For **Sensor in Back**, the EVM can be placed in the back of a car seat or in a seat cushion. This can be done by placing the EVM in an enclosure as shown below.
#### **Visualizer Source Code**
Source files are located at `\labs\vital_signs\68xx_vital_signs\gui\gui_source`.
Need More Help?
===========
* Search for your issue or post a new question on the mmWave E2E forum