Quick Start Guide for SimpleLink MSP432P4 SDK
Table of Contents
1. Introduction
This guide is intended to assist users in the initial setup and demonstration of running their first sample application. The guide explains how to install the SimpleLinkTM MSP432P4TM SDK and lists the various other tools required to get started with your first application.
2. Prerequisites
The user is expected to have the following:
- MSP-EXP432P401R Red LaunchPad - Rev2.0 OR MSP-EXP432P4111 LaunchPad
- A computer running a supported operating system listed in the Release Notes
- At least one of the following IDE supported by the SimpleLink MSP432P4 SDK:
- CCS 7.3.0
- IAR for ARM 8.11.2
- Keil uVision 5.23 or higher with the following packs installed:
- TexasInstruments.MSP432P4xx_DFP.3.1.0.pack
- ARM::CMSIS Pack 5.0.1
- GNU ARM Embedded Toolchain, gcc-arm-none-eabi-6-2017-q1-update
- FreeRTOSv9.0.0 (Optional) The SimpleLink MSP432P4 SDK does not deliver FreeRTOS sources. User is expected to download the same from www.freertos.org if they want to use FreeRTOS with the SDK.
3 SDK - Download and Installation
3.1 Using the SDK Online
A quick and easy way to start working with the SDK is to use TI Resource Explorer on dev.ti.com. This online tool lets you explore the contents of the SimpleLink MSP432P4 SDK. You can build the examples directly using the cloud version of Code Composer Studio. If you choose to use the SDK online, there is no need to download anything to your local computer or install any tools.
3.2 Installing the SDK
You can also download the SimpleLink MSP432P4 SDK from TI Resource Explorer or the software product page on TI’s website.
4. Quick Start for CCS IDE (CCS or GCC Projects)
This section is going to cover the required settings for a CCS installation and how to build and load examples
4.1 Download and Installation
During the installation, the following options are recommended:
- We recommend that you use the default installation folder
- Make sure that SimpleLink MSP432 low power + performance MCUs is selected. You can select additional processor support options as needed.
- To use a debug probe, select TI XDS Debug Probe Support and any other options you would like.The MSP-EXP432P401R/MSP-EXP432P4111 Launchpad uses TI XDS Debug Probe by default.
www.ti.com/lit/pdf/slau575 has more details about MSP432P4 device
4.1.1 Discovering the SDK in CCS
Install the SDK in the default location pointed to by the installer - C:\ti
and Re-start CCS. CCS will automatically detect the latest install.
4.2 Running Your First Example
This section will show how to import, build and load an example
4.2.1 TI Resource Explorer
A quick and easy way to start working with the SDK is to use the TI Resource Explorer on dev.ti.com/tirex. Step by step instructions are available here.
4.2.2 Import via CCS IDE
- Open CCS
- Choose Project → Import CCS Projects from the menu.
- Select the Browse button in the Import CCS Projects dialog and select the the directory
<SDK_INSTALL_DIR>/examples
The SDK provides no RTOS, TI-RTOS and FreeRTOS based examples. TI-RTOS and FreeRTOS examples have the word “tirtos” or “freertos” in the project name
CCS discovers both CCS and GCC based examples.
Importing TI-RTOS and FreeRTOS examples will bring import kernel projects in the same workspace. The kernel project is a dependent project and will be automatically built when the example is built. For more details and how change configurations look at the SimpleLink MSP432P4 SDK User’s Guide.
Select any Code Example you would like to use. In this example gpiointerrupt_MSP_EXP432P401R_tirtos_ccs is chosen
- Choose target configuration
You may have to expand the project in the Project Explorer window to view the target configuration. If you are using the Launchpad, double click on MSP432P401R.ccxml
- In order to use FreeRTOS within CCS, you must specify the location of the FreeRTOS installation
- Build and Download
Plug in your launchpad, Click the build and download icon in CCS. The RTOS build for the first time takes a couple of minutes.
- The XDS110 may require a firmware update. If a firmware update is requested click ok.
www.ti.com/lit/pdf/slau575 has more details about MSP432P4 device
- Every RTOS example has a README.html that details the Example Application Design Details and how each example works. This feature will soon be added to the No RTOS based examples
4.3 Create a new SDK based User Application
Do not use the New Project Creation Wizard
Start with one of the example projects or empty project template shipped inside the SDK. Each software component in the SDK comes with its own set of examples. If your project depends on multiple TI provided software libraries, start from the empty template then add the necessary components into your projects.
Import one of the empty project template shown below to your IDE and start your application from there. All the necessary include paths and SDK specific defines if any are already part of the Empty Project Template
4.3.1 Non-RTOS Based Empty Project Template
4.3.2 TIRTOS Based Empty Project Template
4.3.3 FreeRTOS Based Empty Project Template
4.4 Migrate an existing MSP432P4 Project to an SDK-based Project
The Migration Guide can walk you through the steps needed to migrate your existing MSP432P4 based project to an SDK-based project.
5. Quick Start for IAR IDE
This section is going to cover the required settings for a IAR installation and how to build and load examples.
5.1 Download and Installation
Download and install IAR Embedded Workbench for ARM. You can get IAR for ARM here.
- Make sure to select TI XDS as one of the debug probe drivers. You may also select other drivers. The driver will be installed towards the end of the installation of IAR.
5.1.1 Configuring Custom Argument Variables
Before starting to work with any of the projects in the SDK, you need to load a set of variables that will be set for your current workspace:
- Choose Tools -> Configure Custom Argument Variables
- Click Global -> Import
- Import the custom argvars from the SDK. The argvars are stored in a SIMPLELINK_MSP432P4_SDK.custom_argvars file, which is located in the tools directory of the SDK (
<SDK_INSTALL_PATH>/tools/iar/SIMPLELINK_MSP432P4_SDK.custom_argvars
)
- You can open (
<SDK_INSTALL_PATH>/tools/iar/SIMPLELINK_MSP432P4_SDK.custom_argvars
) in a text editor if you need to modify the default path argument variables.
- Restart IAR.
5.2 Running Your First Example / Importing Your First project
This section will show how to import, build and load an example
Directly accessing workspace from example folder All Code Examples that are shipped with the SDK come with an IAR workspace. Double-Clicking the specific workspace allows you to open the project on disk and build it.
Browse the example list
In the IAR-IDE go to the
Help
tab and click onInformation Center
In the new
IAR Information Center for ARM
window, click onIntegrated Solutions
Then, click on
Example projects
underTexas Instruments
Then, click on
example applications
linkThis
Examples
page contains information on how to create a new project, and links to import example projectsScroll through the page and click on the project you are interested in. In this example let us click on
- When prompted, click
Yes
to save a copy of the project workspace,No
otherwise If
Yes
, browse to the location where you want to save this workspace. ClickChoose
By default, the project Debug settings is configured for TI XDS110, but the user may change them as needed
- Choose Project > Make
Make/Build the Example Project Make [(Project->Make
) Shortcut F7
]. For RTOS based Projects - Note that the RTOS(kernel) build is a dependent project which is automatically pre-built before the example project builds.
The RTOS kernel(TI-RTOS or FreeRTOS build) project is linked to the workspace but the Example Project is copied into the workspace. SO the RTOS kernel needs to be built only once within the scope of the SDK but each workspace has its own copy of the example project.
For noRTOS Projects - There is not RTOS(kernel) build dependent project imported into the workspace
- Plug in the launchpad and download Click
Project
->Download and Debug
-Shortcut (Ctrl + D)
www.ti.com/lit/pdf/slau574 has more details on IDE specific of MSP432P4
- Every RTOS example has a README.html that details the Example Application Design Details and how each example works
5.3 Create a New SDK Based User Application
This section will show how to create a new SDK user application
In the IAR-IDE go to the
Help
tab and click onInformation Center
In the new
IAR Information Center for ARM
window, click onIntegrated Solutions
Then, click on
Example projects
underTexas Instruments
Then, click on
example applications
linkThis
Examples
page contains information on how to create a new project, and links to import example projectsScroll through the page and click on the empty project (os or non_os based) you are interested in.
- When prompted, click
Yes
to save a copy of the project workspace,No
otherwise If
Yes
, browse to the location where you want to save this workspace. ClickChoose
- Add user source/application files
By default, the project Debug settings is configured for TI XDS110, but the user may change them as needed
- Plug in your launchpad, make and download.
www.ti.com/lit/pdf/slau574 has more details on IDE specific of MSP432P4
- Choose Project > Make
Make/Build the Project Make [(Project->Make
) Shortcut F7
].
- Plug in the launchpad and download Click
Project
->Download and Debug
-Shortcut (Ctrl + D)
5.4 Using SysConfig with IAR Workbench
If you are using the IAR toolchain, you can use SysConfig as a standalone desktop tool to generate the configuration files to be compiled and linked with your application.
The steps that follow use the SysConfig v1.0.414 standalone installer and IAR-EWARM 8.32.1. The figures use the MSP432 SDK as an example, but other SimpleLink SDKs follow the same procedure. These steps assume the TI Code Generation Tools are installed in the default location.
Install SysConfig as a standalone tool (download here) within the default location (
C:\ti
).Open IAR and follow these steps to configure it to use the correct viewer for *.syscfg files:
a. Choose Tools > Configure Viewers from the menus, and then click New.
b. Type
.syscfg
in the File name extensions field.c. Type
$SYSCONFIG_ROOT$\nw\nw.exe $SYSCONFIG_ROOT$ $FILE_PATH$
with the Command line option selected.Follow these steps to import custom argument variables into IAR:
a. Choose Tools > Configure Custom Argument Variables from the menus.
b. Choose the Workspace or Global tab depending on how you want to apply the variables.
c. Click the Import button and browse to
\tools\iar
within your SDK installation. Select the*.custom_argvars
file provided there and click OK.d. Click the Add Variable button and add
SYSCONFIG_ROOT
as a variable with the valuec:/ti/sysconfig_1.0.414
(where the version matches the location of your SysConfig installation).If you have not done so already, create a new IAR workspace.
Follow these steps to add a project from one of the examples in the SDK’s
\examples\sysconfig_preview
folder.a. Choose Project > Add Existing Project from the menus.
b. Within your SDK installation, browse to
\examples\syscfg_preview\nortos\<board>\drivers\adcbufcontinuous\iar
c. Add the
adcbufcontinous.ewp
file.Rebuild the project to perform the custom build step, which uses SysConfig to generate additional files.
You can view the custom build configuration by choosing Project > Options from the menus and selecting the Custom Build category.
To open the SysConfig Standalone GUI, double-click on the adcbufcontinuous.syscfg
file in the IAR project wizard. (You may need to open the *.syscfg
file within the SysConfig GUI after it opens.)
5.5 Migrate an existing MSP432P4 Project to an SDK-based Project
The Migration Guide can walk you through the steps needed to migrate your existing MSP432P4 based project to an SDK-based project.
6 Quick Start for Keil
This section is going to cover the required settings for a Keil installation and how to build and load examples.
Keil support is available for some components of the SDK. The RTOS and Drivers components currently do not support Keil.
6.1 Download and Installation
- Download and Install Keil uVision 5.23
- Install the TexasInstruments::MSP432P4xx_DFP pack
- Install the ARM::CMSIS pack
6.2 Running Your First Example
This section will show how to import/build/load an example
Keil support is available for some components of the SDK
- Browse through the
<SDK_INSTALL_DIR>/examples/nortos
folder. Keil projects are available for many of the components Import one of the projects. In this example the
<SDK_INSTALL_DIR>/examples/nortos/MSP_EXP432P401R/driverlib/gpio_toggle_output/keil
project is shownBuild the selected project by clicking
Project->Build Target
(Shortcut F7
), plug in your launchpad and click downloadFlash->Download
(Shortcut F8
).
6.3 Create a New SDK Based User Application
Do not use the New Project Creation Wizard
Start with one of the example projects or empty project template shipped inside the SDK. Each software component in the SDK comes with its own set of examples. If your project depends on multiple TI provided software libraries, start from the empty template then add the necessary components into your projects.
Import one of the empty project template shown below to your IDE and start your application from there. All the necessary include paths and SDK specific defines if any are already part of the Empty Project Template
- Start your application code development from this template
- Build the selected project by clicking Project->Build Target( Shortcut F7), plug in your launchpad and click download Flash->Download ( Shortcut F8).
www.ti.com/lit/pdf/SLAU590 has more details about Keil for MSP432P4
6.4 Migrate an existing MSP432P4 Project to an SDK-based Project
The Migration Guide can walk you through the steps needed to migrate your existing MSP432P4 based project to an SDK-based project.
7. Quick Start for Makefile Users
The SDK examples and RTOS configuration projects ship Makefiles in addition to IDE specific projects.
7.1 Update imports.mak
Update the top level <SDK_INSTALL_DIR>/imports.mak
to point to actual install locations on the user’s machine
7.2 Build RTOS config
Skip this step if you are not using an RTOS.
If the code example in use is an RTOS based example, the RTOS config must be built first. The makefile for RTOS config are available in
<SDK_INSTALL_DIR>\kernel\<tirtos/freertos>\builds\MSP_EXP432P401R\<debug/release>\<ccs/gcc/iar>
For example: <SDK_INSTALL_DIR>\kernel\tirtos\builds\MSP_EXP432P401R\release\ccs\makefile
7.3 Build the makefile
- Identify the makefile for the project and build it.
Every RTOS example has a README.html that details the Example Application Design Details and how each example works. This feature will soon be added to the No RTOS based examples