Migration Guide for SimpleLink MSP432P4 SDK
Table of Contents
- 1. Introduction to SimpleLink™ MSP432™ SDK
- 2. Benefits of the SimpleLink MSP432 SDK
- 3. Migration Overview
- 4. SimpleLink MSP432 SDK Overview
- 5. Migration Considerations
- 5.1 Step-by-Step Migration Examples using CCS
- 5.2 Step-by-Step Migration Examples using IAR
- 5.3 Step-by-Step Migration Examples using Keil
- 6. TI RTOS Migration
- 7. Summary
1. Introduction to SimpleLink™ MSP432™ SDK
The SimpleLink™ MCU portfolio offers a single development environment that delivers flexible hardware, software and tool options for customers developing wired and wireless applications. With 100% code reuse across host MCUs, Wi-Fi™, Bluetooth® low energy, Sub-1GHz devices and more, you can choose the MCU or connectivity standard that fits your design. A one-time investment with the SimpleLink software development kit (SDK) allows you to reuse often, opening the door to create unlimited applications. For more information, visit www.ti.com/simplelink
The SimpleLink MSP432 Software Development Kit (SDK) is a set of software development tools that enable engineers to develop applications specifically on the MSP432 micro-controller family. This powerful software toolkit provides a cohesive and consistent software experience for MSP432 users by packaging essential software components such as TI RTOS, peripheral drivers and easy-to-use examples in one easy-to-use software package. Developing code with the MSP432 SDK ensures future-proofed portability and scalability.
The SimpleLink MSP432 SDK is the successor to MSP432Ware, and brings with it many advantages that are highlighted in Section 3.
2. Benefits of the SimpleLink MSP432 SDK
This SDK brings users into a software development framework that allows for a consistent look and feel among multiple TI embedded products spanning both connectivity and host MCUs. The following are key advantages of the SDK:
The SDK is a standalone product that can be built without any external dependencies.
Device Header files required for the software components are now included within the SDK. This keeps all dependencies for TI-provided embedded software in a single place. The components of the SDK do not rely on the IDE-provided copy of device header files.
The SDK delivers, via TI RTOS, easy-to-use peripheral drivers named “TI Drivers” that allow quick setup of functional use cases for most peripherals. TI Drivers supports multiple 32-bit products, thereby ensuring that developers can abstract hardware-level decisions that are required to implement peripheral functionality and can instead focus on application development.
Components that are used by multiple software tools are centralized. For example all TI-provided libraries such as Graphics library, DSPLib etc. use the same version of Driver Library, making it easier for customers to maintain and port software. All SDK software is well-tested together to ensure a better developer experience when using multiple TI-provided embedded software components in a single project.
3. Migration Overview
This document is intended for current MSP432 users that are using MSP432Ware v3.50.00.02 as a development platform for the MSP432P4x family of devices. It details migration considerations for users accustomed to software components delivered via MSP432Ware and is a helpful guide to locate these components in the context of the MSP432 SDK.
If the MSP432 SimpleLink SDK is your starting point, refer to the document SimpleLink MCU SDK User’s Guide and Quick Start Guide
This document does not apply to MSP430 users developing with the MSP430Ware ecosystem.
The SimpleLink SDK is made up of multiple components that offers differing layers of abstraction. This enables full control for the developer, allowing them the flexibility to turn the dial up and down between code portability and code optimization. While the SDK has changed the method of how TI components such as device header files are delivered, it does not change the actual contents of these components.
If you are an MSP432Ware user and your existing project:
- Only uses direct register access code, then no code changes are necessary. It is sufficient to simply point to the SDK version of the device header files. Detailed instructions are available in Section 5 of this document.
- Uses a combination of TI provided libraries and direct register access code, you will need to migrate to the SDK-provided libraries. Driver Library APIs are fully compatible to that used in MSP432Ware and no code changes are necessary. However project level changes are required as explained in Section 5 of this document.
- Uses TI RTOS, refer to Section 6 of this document, for detailed instructions on how to migrate
4. SimpleLink MSP432 SDK Overview
4.1 Minimum Requirements for using the SDK
IDE Requirements
When using the SimpleLink MSP432 SDK package, it is recommended to use Code Composer Studio. The SDK is also supported by IAR and KEIL. Version information is given below.
- Code Composer Studio, CCS 7.1 or later
- IAR for ARM 7.80.3 or later
- Keil uVision 5.22, TexasInstruments::MSP432P4xx_DFP pack, CMSIS-CORE in ARM::CMSIS Pack or later
Hardware Requirements
It is important to note that the MSP432P401x Revision C or newer is required to use the SDK. Older device revisions are not compatible with the SDK.
If you are using MSP432P401x Revision A/B or the MSP-EXP432P401R Black LaunchPad, please order new samples from http://www.ti.com/product/msp432p401R or the MSP-EXP432P401R Red LaunchPad from http://www.ti.com/tool/msp-exp432p401R prior to using the SDK.
You can also use XMS432P401R Revision C or MSP432P401R Revision C devices with the MSP-TS432PZ100 Target Socket Board or any custom board of your choice.
4.2 SDK Overview
This section serves as a quick introduction to the SDK file structure and key components. To understand the detail about the core components delivered by TI RTOS refer to the document SimpleLink MCU SDK User’s Guide
The SimpleLink MSP432 SDK is a single installer that delivers the following key components:
Examples: A wide range of examples are provided. Their purpose is to make it easy to start writing applications in the context of the SDK. The examples take advantage of the other components in the SDK to implement meaningful and representative functionality. Each example comes with its own documentation and project files for a selection of the supported IDEs and code generation tools.
TI Drivers API: This API layer exposes functionality of the hardware-specific drivers in the same way across all TI SimpleLink devices. For example, though the hardware implementation of the UART may be different on different devices, the TI Drivers API used to access its common functionality is the same. Note that TI Drivers are intended to be “full functional” drivers and include calls to the hardware abstraction layer (driver library), TI RTOS etc. An example of a TI Driver API to read the ADC:
ADC_convert(adc, &adcValue0);
MSP432 Driver Library: For the MSP432 product family, Driver Library is available in the device ROM. These are hardware-specific drivers that are primarily intended to serve as a hardware abstraction layer and configure bits at the register-level for the user. MSP432 driver library APIs handle interrupts, timing, memory management etc. MSP432 Driver Library is the abstraction layer below TI Drivers APIs. An example of an MSP432 Driver Library API to read the ADC:
uint_fast16_t ADC14_getResult(uint32_t memorySelect);
TI RTOS: The RTOS kernel offers services such as timing and scheduling of tasks. All TI SimpleLink SDKs come with the TI-RTOS kernel (SYS/BIOS). Some SDKs also offer examples that use alternative RTOS kernels (such as FreeRTOS) or examples that do not use an RTOS. Note that FreeRTOS requires a separate install from http://www.freertos.org/
Device Header Files: These are the .h files that map device-specific registers and bit fields to addresses in the CPU address map.
Understanding the SDK directory structure helps to easily locate the above components. The SDK directory structure is organized as follows:
Docs: This folder contains all the software documentation relevant to understanding and using the MSP432 SimpleLink SDK. This includes both Users and API Guides as well as release notes.
Source: This folder contains the source files, Device-specific header files,TI Drivers API, MSP432 Driver Library and other peripheral libraries such as grlib, iqmathlib etc.
OS: This folder contains the source for TI RTOS and components required to support FreeRTOS
Examples: The example folder is split in “OS” and “non-OS” sections. The “non-OS” section provides register-level (bare metal) code examples that are implemented without the framework of TI RTOS.
4.3 SDK FAQ
Is this update optional or mandatory?
For new or early MSP432 Users, it is strongly recommended to start your software development using the SDK and TI Drivers. This prevents the need for future software migration and ensures you can always receive the latest device header files, updated libraries etc. Leveraging TI Drivers when creating application code ensures portability across all MCUs in the SimpleLink family as well as lowers the complexity of software design.
For existing MSP432Ware users, the SDK update is currently not mandatory. TI will continue to make available as a stand-alone installer, MSP432Ware 3_50_00_02. However all future maintenance efforts will be directed towards the SDK and MSP432Ware will no longer be updated for bug fixes, patches or new device support.
I am not using MSP432/430Ware or any TI-provided software but instead developed my project with custom components. Am I impacted?
Even if you are not currently using MSP432Ware and/or TI-provided libraries, note that, device header files will not be deployed via the IDE in the future. Hence installing and using the SDK is crucial to keep your software projects updated and using the correct version of the device header files. As mentioned above you can continue to use your bare-metal or driver library code as long as it builds and functions in the SDK environment.
How do I install the SDK?
Remember to review the minimum requirements provided in Section 4.1 to ensure your system is setup. Installation instructions are available in the SimpleLink MSP432 Quick Start Guide
What is the impact to my code base when TI updates the SDK?
The primary advantage with the using the SDK if that as a developer you can chose to stay with a specific packaged instance of the SDK since it encompasses support for all the library source files you use and the device header files. Your code base will not be impacted by TI updates to the SDK. You can update to the SDK version of your choice as needed.
Do I need to update CCS to use an updated version of the SDK?
Yes. Every version of SDK is tested with a specific version of CCS. For example MSP432 SDK v1.20.00.45 has been tested to work only on CCS V7.1 or later. However you can always “freeze” an SDK release and use it across all updated CCS versions.This information will be available in the release notes of the SDK package.
What type of support is provided for FreeRTOS or other third party RTOS users?
Simplelink MSP432 SDK does not include FreeRTOS installation. The user must download and install FreeRTOS from www.freertos.org to build the examples.
The SDK provides TI Drivers examples that run on FreeRTOS. All FreeRTOS examples are based on POSIX layer. No Native FreeRTOS examples are provided. If you want to use the native FreeRTOS routines without the abstractions provided by the SDK, documentation is provided on the www.freertos.org website.
The release notes of TI Drivers specifies the version of FreeRTOS it was tested with.
I use MSP430 (16-bit) devices, can I take advantage of the SimpleLink MSP432 SDK?
MSP430 (16-bit) devices use a similar software framework known as MSP430Ware to deploy source libraries, examples and board-specific projects. Refer to the MSP430Ware Folder for more details.
5. Migration Considerations
This section only covers the non-OS aspects of migration. For TI RTOS users, refer to Section 6 of this document to understand how to migrate to the latest version of TI RTOS.
Also, as stated before the SDK supports MSP432P401x Revision C or later. If you are currently using XMS432P401x Revision A/B devices refer to this application report to understand the device-specific considerations when migrating to Revision C.
If you are an existing MSP432 user, before you begin migrating your project to the SDK framework, review the components in your code base.
Project Components Review
First, it is important to understand which TI-provided components are being used in your project. The sections below address how to migrate each of these components from the MSP432Ware to the SDK framework.
1. Device Header Files
Check and note down source files that use include paths in your project for files such as msp432.h or msp432p401r.h
If your project was built from the ground up using custom libraries or direct register access code, then your only dependency is the IDE-provided header file. In this case, the migration to the SDK is very simple. Follow the steps below to migrate your project to the SDK-based header file:
- Download and install SDK
- Ensure you are using the correct CCS version
- Open your project in CCS via Project –> Import CCS Projects
- Change the header file include path to point to the SDK-based header file. Directions on how to do this are provided in the step-by-step examples below.
- Build your project
2. MSP432P Driver Library
Your project may include driver library either as a source or link directly to the ROM-based driverlib.lib
In such cases, the recommendation is to delete the driver library source and link to the latest SDK-provided version. This ensures any changes or bug fixes to driver library are automatically utilized by your SDK-based project.
For detailed instructions on how to do this, refer to step 5 and step 6 in section 5.1.2.
3. Additional TI libraries
Check if your project includes either source or library components from any of the following TI-provided libraries:
- Graphics library (grlib)
- IQ Math Library (iqmathlib)
- board support files
Each of these libraries may require unique migration steps. Refer to the corresponding release notes for library-specific information.
5.1 Step-by-Step Migration Examples using CCS
As mentioned previously, this section only covers non-OS based projects. Many of the specific migration tasks such as using the SDK-based header files remain the same for OS-based projects. However the user needs to ensure that the RTOS-based components are migrated first (see section 6) before working on the MSP432-specific header files and libraries.
There are two ways to migrate your existing MSP432 project:
Option 1: Use a standard SDK template and copy source code and header files from any existing project into the SDK template project.
OR
Option 2: Keep your existing project as-is and only migrate the TI-provided header files and libraries to use the SDK-based versions instead of the MSP432Ware version.
We highly recommend Option 1 i.e. using the standard SDK template and copying over source files since the SDK-based components are pre-setup and it is the fastest and most efficient migration path especially if multiple TI libraries are being used.
Also, this document assumes the SDK package was installed in the default directory location of C:/TI. All file names and paths are referenced to C:/TI.
5.1.1 Migrating to a new project by using the standard SDK template
The easiest way to get started with migration is by using the standard SDK template project as a starting point and then copying over custom source and header files.
The SDK template project is available in your SDK install directory (default: C:/TI) under the Examples -> nortos folder.
To migrate your project using the standard SDK template:
Step 1: Open the empty project in your workspace
Step 2: Copy/add any of your existing project source and header files to this new empty project
Step 3: Do Not copy over any TI provided MSP432 software library sources previously obtained through MSP432Ware. All TI provided MSP432 software libraries are already accessible through the default compiler include flag in the template project’s setting.
Step 4: If the existing source files (.c or .h) that were copied to the template project had include paths for TI provided MSP432 software header files these need to be changed to reference the SDK based relative paths.
Change header file include paths as shown below:
`#include "driverlib.h"` =====> `#include <ti/devices/msp432p4xx/driverlib/driverlib.h>`
`#include "grlib.h"` =====> `#include <ti/grlib/grlib.h>`
- Step 5: Note that the start up file no longer sets up interrupts as “default ISR” instead each ISR is assigned a unique name. Depending on how your project was setup you may need to port the ISR name into the start up file.
Now, you have successfully migrated your existing project to use the SimpleLink SDK.
Important Note: the IDE’s ‘Create New Project’ options does NOT support the SDK template by default. So do not use this option to setup an SDK project.
5.1.2 Retaining existing project and migrating TI components only
This option is only useful if you prefer not to change the file or folder structure of your existing project code. In such cases, you can follow the steps below to modify an existing project and port it to use SDK resources such as libraries and headers.
Also, you can only use this approach if your existing project did not use an RTOS. For migrating TI RTOS based projects refer to Section 6.
The steps provided below are intended to teach you the process of migration by using an MSP432Ware example project as a starting point. Alternatively you can use any custom MSP432 project (direct register access or driver library based) as your starting point.
Step 1: Open an existing (non-SDK) MSP432 project
Open a non-SDK MSP432Ware project in the preferred CCS workspace. If you have MSP432Ware installed, you can find example projects under C:\ti\msp\MSP432Ware_3_50_00_02\driverlib\examples\MSP432P4xx
Note that this exercise uses an MSP432Ware project as a starting point. Alternatively you can use your custom project code base or other example projects from MSP432Ware.
Step 2: Setting up the environment variable
To setup the environment variable to point to the SDK Install path, right click on the Project name.
- Select Properties -> General -> Products (tab)
- Uncheck the “MSP432Ware” option and select the SimpleLink MSP432 SDK option as shown in the screen capture below.
If this step is executed correctly, you should be able to see the SDK install path in the environment variables tab as per below screen capture.
If no variables are seen, check the “show system variables” box in the screen capture below.
Step 3: Using SDK provided device header files
To migrate to the SDK-provided device header files,
In Project-> Properties -> Build -> MSP432 Compiler -> Include options: Remove
${CCS_BASE_ROOT}/arm/include/
Add${COM_TI_SIMPLELINK_MSP432_SDK_INSTALL_DIR}/source
In all project files, find all occurrences of
#include "msp.h"
Replace with#include <ti/devices/msp432p4xx/inc/msp.h>
Step 4: Using SDK provided CMSIS files
To migrate to the SDK-provided CMSIS files,
- In Project-> Properties -> Build -> MSP432 Compiler -> Include options:
Remove ${CCS_BASE_ROOT}/arm/include/CMSIS
Add ${COM_TI_SIMPLELINK_MSP432_SDK_INSTALL_DIR}/source/third_party/CMSIS/Include
The final setup from steps #3 and #4 should look like image below.
Step 5: Using SDK provided Startup and System files
To migrate to the SDK-provided startup/system files,
- Copy
startup_msp432p401r_ccs.c
andsystem_msp432p401r.c
from the SDK installation and replace the corresponding files in your existing project folder.
These files can be found in the following directories: ${COM_TI_SIMPLELINK_MSP432_SDK_INSTALL_DIR}/source/ti/devices/msp432p4xx/startup_system_files/ccs/startup_msp432p401r_ccs.c
${COM_TI_SIMPLELINK_MSP432_SDK_INSTALL_DIR}/source/ti/devices/msp432p4xx/startup_system_files/system_msp432p401r.c
Note that the start up file no longer sets up interrupts as “default ISR” instead each ISR is assigned a unique name. Depending on how your project was setup you may need to port the ISR name into the start up file.
Step 6: Using the SDK provided TI Libraries
The preferred method to use TI libraries is to link the pre-built library instead of copying the source into the project. Although copying library source into your project will produce working results, using a linked library makes it easier to port/maintain a project when updating to a newer SDK.
MSP432 Driver Library
To migrate to the SDK-provided Driver Library,
Delete any Driver Library source or linked .a files in an existing project.
- Remove existing Driver Library include paths
In Project-> Properties -> Build -> MSP432 Compiler -> Include options:
Under “Add dir to #include search path (–include_path, -I)”: If this path is included, then remove it "${PROJECT_ROOT}/driverlib/MSP432P4xx"
- Next, go to Project -> Properties -> Build -> MSP432 Linker -> File Search Path: Under “Include library file or command file as input (–library, -l)”, add the line below:
"${COM_TI_SIMPLELINK_MSP432_SDK_INSTALL_DIR}/source/ti/devices/msp432p4xx/driverlib/ccs/msp432p4xx_driverlib.lib"
Refer to the image below for how to link Driver Library:
After Driver Library is linked in your project, you will also need to change the Driver Library include path to point to the SDK-provided files.
- In all project files, find all occurrences of
#include "driverlib.h"
Replace with#include <ti/devices/msp432p4xx/driverlib/driverlib.h>
Graphics Library
Migrating Graphics Library from MSP432Ware to MSP432 SDK requires additional changes to LCD Drivers, Refer to Graphics Library Migration Guide for further instructions
IQMath Library
To migrate to the SDK-provided IQMath Library,
Delete any IQMath Library source or linked .a files in an existing project.
Remove existing IQMath Library include paths In Project-> Options… -> C/C++ Compiler -> Preprocessor -> Additional include directories: Remove
"${PROJECT_ROOT}\...\iqmathlib\include"
Next, go to Project -> Options… -> Linker Under “Additional Libraries”, add the line below:
${COM_TI_SIMPLELINK_MSP432_SDK_INSTALL_DIR}/source/ti/iqmathlib/iar/IQmathLib.lib
${COM_TI_SIMPLELINK_MSP432_SDK_INSTALL_DIR}/source/ti/iqmathlib/iar/QmathLib.lib
Refer to the image below for how to link IQMath Library:
Now all project components have been migrated to the SDK and you can build your project successfully!
5.2 Step-by-Step Migration Examples using IAR
As mentioned previously, this section only covers non-OS based projects. Many of the specific migration tasks such as using the SDK-based header files remain the same for OS-based projects. However the user needs to ensure that the RTOS-based components are migrated first (see section 6) before working on the MSP432-specific header files and libraries.
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. This is done using the following steps:
- Choos