5. Running The Demonstration Example

This section describes the steps required to prepare the Pro DevKit and other tools to successfully run the example code. A serial terminal, the SmartSnippets Toolbox and the Command Line Interface (CLI) programmer are required for testing and verifying the code. If you are not familiar with the recommended process on how to clone a project or configure a serial terminal, read the Starting a Project tutorial.

There are two main methods to verify the correct behavior of the demonstrated code and inspect the contents of the QSPI FLASH memory. The first method is to use the SmartSnippets Toolbox and the second is to use the CLI programmer provided by the SDK. To facilitate the developer a third method, using a serial terminal, is also provided.

5.1. Verifying with a Serial Terminal

  1. Establish a connection between the target device and your PC through the USB1 port of the motherboard. This port is used both for powering and communicating with the DA1469x SoC. For this tutorial, a Pro DevKit is used.

  2. Import and then make a copy of the freertos_retarget sample code found in the SDK of the DA1469x family of devices.


It is essential to import the folder named python_scripts to perform various operations (including building, debugging, downloading).

  1. Make sure the compiler does not generate errors instead of warnings. To do this, select Project > Properties > C/C++ Build > Settings > Tool Settings > Warnings and deselect the corresponding tick box. Finally, click OK.

'Configure Compiler's Warnings'

Figure 11 Configure Compiler’s Warnings

  1. In the newly created project, add/modify the required code blocks as illustrated in the Code Overview section.


It is possible for the defined macros not to be taken into consideration instantly. Hence, resulting in errors during compile time. If this is the case, the easiest way to proceed with is to: right-click on the application folder, select Index > Rebuild and then Index > Freshen All Files.

  1. Build the project in either Debug_QSPI or Release_QSPI mode and burn the generated image to the chip.

  2. Press the RESET button on Pro DevKit to start the chip executing its firmware.

  3. Open a serial terminal (115200, 8-N-1) and press the K1 button on Pro DevKit. A debugging message is displayed on the console indicating both the status of the current NVMS operation and the contents of the current position in the NVMS_LOG_PART partition entry.

'Debugging messages for NVMS Operations'

Figure 12 Debugging messages for NVMS Operations

5.2. Verifying with the SmartSnippets Toolbox

  1. With the system up and running, open the SmartSnippets Toolbox and execute the following steps:

    1. Select New to create a new project (1). In the New Project window, enter a name for the project (2). This step is optional if a project has already been created.

    2. Choose the newly created or an available project (4).

    3. Choose a communication interface (3) and a port (5).

    4. Select the family of devices to use (in our use case this should be the DA1469x-00 option) (6).

    5. Open the selected project (7).

'Opening SmartSnippets Toolbox'

Figure 13 Opening a Project in the SmartSnippets Toolbox

  1. Inspect the contents of the FLASH memory.

    1. Switch to the QSPI Partition Table window (1).

'SmartSnippets Toolbox -  Display the Partition Table Area'

Figure 14 SmartSnippets Toolbox - Display the Partition Table Area

  1. In the Partition Table area, click Connect (2). A rotating cursor is displayed waiting for the connected device to reset.

  2. Press button RESET on the Pro DevKit to reset the device.

  3. Wait for the cursor to stop rotating and click Read (3). All the partition entries are displayed.

'SmartSnippets Toolbox, Partition Table Area'

Figure 15 SmartSnippets Toolbox, Partition Table Area

  1. In the Partition Tasks area, select the NVMS_LOG_PART partition entry (4).

  2. Press Read (5) and, after a while, the contents of the selected partition entry should be displayed.

'SmartSnippets Toolbox, Partition Tasks Area'

Figure 16 SmartSnippets Toolbox, Partition Tasks Area

5.3. Verifying with the Command Line Interface (CLI) Programmer

The CLI programmer is a command line tool for reading/writing the FLASH/OTP/RAM memories. The tool communicates with the target device over a UART port or JTAG interface. This section demonstrates the JTAG interface. For more information on using the CLI programmer, please read the UM-B-044 User Manual: DA1468x Software Platform Reference (Appendix B).

  1. With the system up and running, start the gdbserver (J-link GDB Sever) using the configuration shown in Figure 17.

'Configuring the GDB Server'

Figure 17 Configuration of the GDB Server

  1. Open a command prompt window (cmd) under the path where the CLI programmer is located. By default this is the <sdk_root_directory>/binaries folder of the SDK.

  2. Enter the command to read the FLASH memory over JTAG. The general form of this command is:

    cli_programmer gdbserver read_qspi <address_in_flash> -- <number of bytes to read>

    For example, to read the first 64 bytes from the NVMS_LOG_PART partition entry enter:

    cli_programmer gdbserver read_qspi 0x200000 -- 64


The starting address of a partition entry depends on the Flash model used. In this example, the 4M Flash model for a non-SUOTA application is used and thus, all addresses/sizes of the target partition table are declared in sdk/config/4M/partition_table.h file.

'Reading Flash contents with the help of the CLI programmer'

Figure 18 Reading Flash Contents with the CLI Programmer