JTAG Flasher User Guide
Table of Contents
Overview of JTAG Flasher tool
JTAG Flasher tool flashes application binary file (MetaImage) to device’s sFlash over JTAG (Joint Test Action Group). This tool uses CCS (Code Composer Studio) debug server script to connect and load to the device. To use this tool, the device/board should have a JTAG interface. Uniflash which is a software tool for programming on-board flash uses UART interface. The purpose of this tool is to flash the MetaImage via JTAG when there is no UART interface.
EVM Compatibility
This tool only supports 1st generation mmWave EVMs available currently. Below are the currently supported devices -
| Device | Supported EVM’s |
|---|---|
| AWR1843 | AWR1843BOOST |
| AWR1642 | AWR1642BOOST |
| AWR2944 | AWR2944EVM |
| AWRL6432 | AWRL6432BOOST |
Requirements
Hardware
| Item | Details |
|---|---|
| Device | AWR1843BOOST, AWR1642BOOST, IWR6843AOP, AWRL6432BOOST,AWR2944EVM |
| MMWAVEICBOOST EVM(for IWR6843AOP) | Link to ICBOOST |
| Computer | PC with Windows 7 or 10. If a laptop is used, please use the ‘High Performance’ power plan in Windows |
| Micro USB Cable | Micro USB cable for mmwave sensor |
| Power Supply | 5V, >3.0A with 2.1-mm barrel jack (center positive) |
Software
| Tool | Version | Download Link |
|---|---|---|
| TI mmWave SDK | 3.6.0.x (16xx/18xx/68xx) | MMWAVE-SDK |
| TI mmWave mcuplus SDK | 4.6.1.2 (awr294x) | MMWAVEMCUPLUS-SDK |
| TI MMWAVE-L-SDK | 5.5.3.0 (6432) | MMWAVE-L-SDK |
| Code Composer Studio | 12.4 | CCS |
| TI Radar Toolbox | Latest | Radar toolbox should be downloaded to access binaries and source code. Download Instructions in the readme file. |
Quick Start
The quickstart guide will cover setting up the EVM and how to flash metaimage to the device’s SFLASH using this tool.
1. Setup the EVM for Functional Mode
Connect the EVM to the PC via a micro USB cable. Now, set the device into functional mode by adjusting the SOP switches and/or jumpers. Refer to the EVM Operational Setup guide for more information.
After this, power cycle the device by pressing the NRESET button on the EVM.
2. Flashing using the tool
To flash MetaImage using JTAG Flasher, follow the steps given below:
Navigate to
<RTB_DIR>/tools/JTAG_Flasher/tool/xwr16xxOpen a command prompt at this location and enter the following command -
"C:/ti/ccs1240/ccs/ccs_base/scripting/bin/dss.bat" jtagFlasher.jsChange the CCS path according to the version installed in the PC.
jtagflasher.js is a CCS Debug Server Script and it connects to the target, loads and run the program. In this case, it loads the following pre-built binaries.
| Platform | BIN Name | Location |
|---|---|---|
| AWR1642 | xwr16xx_qspiflash_mss.xer4f | <RTB_DIR>/tools/JTAG_Flasher/prebuilt_binaries/ |
| AWR1843 | xwr18xx_qspiflash_mss.xer4f | <RTB_DIR>/tools/JTAG_Flasher/prebuilt_binaries/ |
| IWR6843 | xwr68xx_jtagflasher.xer4f | <RTB_DIR>/tools/JTAG_Flasher/prebuilt_binaries/ |
| IWRL6432 | jtag_flasher_xwrL64xx-aop_m4fss0-0_freertos_ti-arm-clang.out | <RTB_DIR>/tools/JTAG_Flasher/prebuilt_binaries/ |
- Running jtagflasher.js will flash the MetaImage present in the same folder i.e xwr16xx_mmw_demo.bin (for AWR1642)
- Once the image is flashed successfully you can see the following log in the terminal.
- Now power cycle the device to run the newly flashed MetaImage.
3. Flashing using the tool for AWR294x
To flash MetaImage using JTAG Flasher, follow the steps given below:
Configrue the device to SOP 4 (funcitonal mode)
Navigate to
<RTB_DIR>/tools/JTAG_Flasher/tool/awr2944Open a command prompt at this location and enter the following command -
"C:/ti/ccs1250/ccs/ccs_base/scripting/bin/dss.bat" jtagFlasher_awr294x.jsChange the CCS path according to the version installed in the PC.
jtagflasher_awr294x.js is a CCS Debug Server Script and it connects to the target, loads and run the program. In this case, it loads the following pre-built binaries.
| Platform | BIN Name | Location |
|---|---|---|
| AWR2944 | sbl_jtag_uniflash.release.out | <RTB_DIR>/tools/JTAG_Flasher/prebuilt_binaries/ |
- Open the file jtagflasher_awr294x.js, modify line 64 to the path where your gel file is in the similarly programmed fashion
- Default offset and file sizes according to the images present have been provided. If you want to modify size please convert the bytes of the program into hexadecimal and provide it
- Running jtagflasher_awr294x.js will flash the MetaImage present in the same folder i.e sbl_qspi.release.tiimage (for awr2944) and awr2944_ccsdebug.appimage (for awr2944)
- After you run this the applciation will be successfully flashed
- Now power cycle the device to run the newly flashed MetaImage.
Developers guide
1. CCS Debug Server Script
JTAG flasher uses jtagFlasher.js file as CCS Debug Server Script. CCS Debug Server Script does the following
- Gets the debug server and configure the debugger for the desired target board by passing the target configuration *.ccxml file to the debug server.
- Opens a debug session for Cortex R4F processor and connects to the target.
- After connecting to the target, it loads the program (e.g. xwr16xx_qspiflash_mss.xer4f) into the memory and issue a command to the target to run the loaded program.
2. Flow chart
Here is a flowchart which depicts how the tool is implemented.
Here is the flowchart for AWR294x specific tool
3. Rebuild the program
Rebuilding for 16xx/18xx/68xx
To rebuild the program, open the command prompt and run the following commands
- Set the environment variables
cd <SDK_DIR>/packages/scripts/windows
setenv.bat
Rebuild the program which is loaded by jtagFlasher.js to flash the MetaImage.
Note: Use the same terminal where the environment variables are set. Do not use a new terminal.
cd <RTB_DIR>/tools/JTAG_Flasher/src
gmake clean
gmake all
Rebuilding for 6432
To rebuild the program, import the project into CCS and rebuild after making the desired changes
Rebuilding for AWR2944
To rebuild the program, download the SDK 4.6.1.2, and replace the main.c file in the path: C:\ti\mmwave_mcuplus_sdk_04_06_01_02\mcu_plus_sdk_awr294x_09_02_00_15\examples\drivers\boot\sbl_jtag_uniflash\awr294x-evm\r5fss0-0_nortos Then follow the SDK userguide to rebuild the application using the command: gmake -s -C examples/drivers/boot/sbl_jtag_uniflash/awr294x-evm/r5fss0-0_nortos/ti-arm-clang clean all Once rebuilt you can replace in the path: \prebuilt_binaries
4. Update the program to be loaded
To use the updated program, modify mssImage with the correct path.
var mssImage = currentDir + "\\..\\..\\src\\xwr6xx\\xwr16xx_qspiflash_mss.xer4f";To flash image of user’s choice, update path of the image to be flashed i.e ImageToFlash.
5. Port this tool with other IDE or JTAG emulator
To use this tool with other IDE (different than CCS) or JTAG emulator (different than XDS110), you mainly need to modify this Javascript file (if with CCS but different JTAG emulator) OR write a script with similar logical flow which supports required IDE. As this .js uses .gel and .ccxml files to read/write memory and device connection respectively, so while writing another IDE based equivalent .js, you need to port these components as well. There should not be any impact to device side application during this porting, you can use same *.xer4f file.
Need More Help?
Search for your issue or post a new question on TI’s E2E forum