Getting Started with the DA16200 FreeRTOS SDK

Pages
Contributors: santaimpersonator
Favorited Favorite 0

Build an Example Project

Each of the example project directories contain a folder structure, which includes a project folder with the DA16200 (or DA16600) target folder(s).


Directory in the Eclipse Project Explorer. (Click to enlarge)
To illustrate, the GPIO example application contains both the DA16200 and DA16600 target folders in the example's projects folder:
  • /apps/common/examples/Peripheral/GPIO/projects/da16200
  • /apps/common/examples/Peripheral/GPIO/projects/da16600

Import a Project

To build an example application (or project), users must import them into the Eclipse Project Explorer. Navigate to the specific example project directory, right-click on the DA16200 folder in the project directory, and then select Import as Project.

import project
Importing the target MCU (i.e. DA16200) folder of the example's projects folder. (Click to enlarge)

Build a Project

Once the target project is imported, it will appear in the Eclipse Project Explorer. To build the project, right-click on the imported project folder and select Build Project.

build a project
Building the imported, target project of an example application. (Click to enlarge)

Initial Build

The first time a build process is performed in the SDK, a Generate Configuration window will be displayed automatically to select the flash memory type. Users will need to select the flash memory type and press the Generate button to create the appropriate flash configuration file required to build the firmware.

  • If the pop-up window is closed without selecting and generating a configuration file, a warning pop-up is displayed.
  • A flash configuration file is required to build the firmware, so the step cannot be skipped.

Generate Configuration window pop-up
The Generate Configuration window to select the flash memory type of the project's target MCU. (Click to enlarge)

For the DA16200MOD, users will need to select:

  • Flash Memory Type: W25Q32JV
  • Size of the Flash Memory: 4MB
  • Partition Size: 4MB

selected flash memory
The Generate Configuration window to select the flash memory type of the project's target MCU. (Click to enlarge)

Project - Firmware Images

While the project builds, the following output is displayed in the Eclipse IDE's Console window:

build process
Build process for a project. (Click to enlarge)

Once complete, there are two firmware images that are generated:

  • FBOOT - DA16200_FBOOT-GEN01-01-XXXXXXXXX_W25Q32JW.img
  • FRTOS - DA16200_FRTOS-GEN01-01-XXXXXXXXX-XXXXXX.img

The files are stored in the <sdk_root_directory>/<project_path>/img/ directory.

  • FBOOT is the bootloader image which is used to initialize the DA16200 and launch the main firmware.
    • The bootloader image must be the first thing loaded into flash for a new device.
    • Since the bootloader image contains SFDP (flash specific) information, the bootloader must be loaded into flash before other images are loaded.
    • When the SDK is updated, always load the bootloader image first.
  • FRTOS is the main firmware image which includes the RTOS and user applications.

Configure the WiFi Connection

To configure the settings of the WiFi connection, users will need to modify the sample_preconfig.c file of the SDK from the apps > common > examples > common_config directory.

WiFi configuration file
The sample_preconfig.c WiFi configuration file for the DA16200 FreeRTOS SDK. (Click to enlarge)

Users will need to modify the following lines in the file to configure and enable the WiFi connection of the board:

  • Line 41 - #define SAMPLE_AP_SSID "sparkfun-guest"
  • Line 42 - #define SAMPLE_AP_PSK "sparkfun6333"
  • Line 63 - #if 1 // Example ...

file modifications
Configuring and enabling the WiFi connection for the SDK examples. (Click to enlarge)

Modify the Build Version

To configure the settings of the build version, users can modify the 2nd_major_number.c file of the SDK from the tools > version directory.

build version files
Modifying the version number of the SDK example builds. (Click to enlarge)