Processor SDK RTOS Getting Started Guide
|RTOS Software Developer Guide||→||Getting Started Guide|
Last updated: 10/04/2017
- 1 Overview
- 2 Introduction to Processor SDK RTOS
- 3 Basic examples
- 4 Advanced examples
- 5 Application development
- 6 Download and install software
- 7 Setup EVM hardware
- 8 Setting up CCS for EVM and Processor-SDK RTOS
- 9 Useful links
- 10 Archived
The Processor Software Development Kit (Processor-SDK) provides the core foundation and building blocks that facilitate application software development on TI's embedded processors. This Getting Started Guide focuses on the Real-Time Operating System (RTOS) and provides information on acquiring the software and running basic examples/demonstrations bundled in the SDK.
For anyone that is new to Processor-SDK RTOS, traversing through all the resources we provide in the right order is important. Here is a sequence to follow that introduces the SDK structure and gets you started with writing applications using the SDK.
Introduction to Processor SDK RTOS
First, start with watching introductory Processor SDK training videos that are relevant to RTOS:
|1.2|| Introduction to Processor SDK RTOS Part 1
|This module is the first installment of a two-part overview of the Processor SDK from the TI-RTOS perspective. It introduces the functional elements that may be included in the installation for an SoC, and then looks at these elements in more detail: TI-RTOS kernel, Inter-Processor Communication (IPC), Network Developer's Kit (NDK), algorithm libraries, and diagnostic software.|
|1.3|| Introduction to Processor SDK RTOS Part 2
|This module is the second installment of a two-part overview of the Processor SDK from the TI-RTOS perspective. It examines the functional elements that may be included in the installation for an SoC: Low-level Drivers (LLD), Chip Support Library (CSL), OS Abstraction Layer (OSAL), board library, Secondary Boot Loader (SBL), and board diagnostics.|
After going through these videos, you will have a good understanding of
- how the software is organized for portability across platforms
- software API hierarchy within a platform, from chip support to low-level driver to middleware
- where to customize software for different use cases
Next, it is beneficial to start with executing simple examples.
Since we want to do this on the actual hardware target, you will need Code Composer Studio (CCS) and an Evaluation Module (EVM). See sections below for information to configure CCS and EVM for development. This is a top-level starting point, but you may need to go to your specific EVM hardware setup guide for some steps (e.g., connecting external JTAG). A cross reference to all hardware users guide can be found on the Support Platforms page.
“Hello World” example with no operating system
The simplest example that you can write is a “Hello World” example that runs in bare metal or no operating system. CCS comes with templates of a semi-hosted program for the different device and core. Using this template allows standard output to be displayed on the host PC using the debugger. This is a good way to start learning basic configurations such as the memory map of your device. Specific instructions for each platform bundled in the Processor SDK RTOS can be found at http://processors.wiki.ti.com/index.php/Processor_SDK_Bare_Metal_Examples
Simple examples with an operating system
The next level of complexity is the take that same “Hello World” example and run it over the TI-RTOS kernel. Besides a template for the simple four-line “Hello World” example, CCS comes with templates for other features of the kernel such as clock, error, event, log, SWI, and task. You will also learn how to configure the TI-RTOS kernel for such things as enabling semi-host support. Specific instructions for each platform bundled in the Processor SDK RTOS can be found at http://processors.wiki.ti.com/index.php/Processor_SDK_RTOS_Examples
Next, you can get familiar with peripheral drivers.
Peripheral driver example
The next level of complexity is to start using peripherals of your device. There are low-level driver examples that are provided in the Processor SDK RTOS package. These are CCS projects that can be used to test an individual peripheral. Some of the examples use multiple low level drivers; for example, the GPIO example will use I2C driver for reading EVM board ID to auto configure the software and UART driver to display status messages.
For simplicity and flexibility, the CCS project information are captured in configuration files that you can use to generate CCS projects for your platform, EVM, endian, and core. Once CCS projects are created, they are loaded and run on the EVM via JTAG. Instructions to create and run the CCS projects can be found at http://processors.wiki.ti.com/index.php/Rebuilding_The_PDK
We now take the leap to put together parts of the SDK and create a more complex application.
Demonstrations in Processor SDK RTOS
Start with running the demonstrations that are part of Processor SDK RTOS package. These demonstrations can be run “out of box” since pre-build binaries are provided, but also contain source to that you can set breakpoints and step through the code. The demonstrations contain a richer set of software and perform more complex features such as audio and graphics.
Not all demonstrations are applicable to all platforms. The following page has a list of all demonstrations and supported platform: http://processors.wiki.ti.com/index.php/Processor_SDK_RTOS_Examples_and_Demonstrations
Next, watch the following training video on guidelines to write a custom application using the SDK.
|1.4|| Application Development Using Processor SDK RTOS
(1 hr 40 min)
|This presentation provides a detailed overview of the application development process using the Processor SDK RTOS release. It walks through each step of the a typical development flow, including setup of the evaluation module (EVM), getting started with the EVM, running out-of-box examples, developing application code, porting applications to custom hardware, and customization of application software.|
This video has a lot of content, as you can see from the duration. It is broken down into the following sections:
- Setup development environment including download software, configure target EVM
- Start with basic software examples and basic connectivity of EVM
- Run demo applications provided in SDK
- Develop application using drivers in SDK
- Port software to custom hardware by changing the board support package
- Customize application for certain use cases
If you have custom hardware, the SDK software is organized to ease porting to a new hardware. All EVM-specific software is kept in the board support package, Board Library. Functions include unlocking MMR registers, initializing PLL, configuring clock, configuring PinMux, initialing DDR, and creating a UART instance for console output. Individual examples, unit tests, and demonstrations call the Board Library so that each of these applications can be migrated to a custom hardware by modifying the Board Library. You may want to also port the EVM diagnostics to your custom hardware and ensure the test suite passes.
The customize module provides information to create a new application. This includes configuring TI-RTOS kernel to link required driver libraries, memory map, RTSC platform definition, and task creation.
Download and install software
There are three software packages that make up the Processor SDK RTOS development ecosystem:
- Code Composer Studio (if using JTAG, IDE)
- Latest CCS Emulation package (for connecting to target using JTAG)
- Processor-SDK RTOS software
See the Release Notes for information on minimum requirements for host PC.
The size of the installer is large since we want to provide one bundle for all the components. The bad side of this is that if you are manually downloading the Processor-SDK installer, you may run into issues such as download stall or slow download. One simple solution is to run a download manager/accelerator such as http://www.freedownloadmanager.org/.
Code Composer Studio
The Processor-SDK RTOS uses Code Composer Studio as the host integrated development environment for development and debug. All compilers are packaged with the SDK installer. This allows compilation of software without needing to install CCS. You only need CCS if you are using CCS projects, using JTAG to communicate with target, or need an Integrated Development Environment (IDE) for development and debug.
To download CCS, use the installer specified on the Processor-SDK download page for your platform (see links in below section).
When installing CCS, you can choose to control what is installed for processor architecture.
The minimum required for the SDK are the following items
- Sitara AMx Processors for AM335x, AM437x, AM57x
- 66AK2x multicore DSP + ARM Processors & C66x KeyStone multicore DSP for K2E, K2G, K2H, K2K, K2L, C665x, C667x
- OMAP-L1x DSP + ARM9 Processor for OMAP-L1x
- C6000 Power-Optimized DSP for C674x
The support for connecting a JTAG to the EVM to debug software is included in the CCS package. In some cases, additional modifications to configuration GEL files are provided separately. To get the latest version, perform a CCS Check for Updates.
The relevant update will be named
- Sitara Device Support for AM335x, AM437x, AM57x
- Keystone2 Device Support for K2E, K2G, K2H, K2K, K2L
- Keystone1 Device Support for C665x, C667x
- OMAPL/Integra Device Support for OMAP-L1x
- C6000 Device Support for C674x
For example, an update for Sitara devices will look like:
Processor-SDK for RTOS
The final step is to download and install the Processor-SDK RTOS. See the software product page for your device to get the latest version of this software:
- Processor SDK for AM335x
- Processor SDK for AM437x
- Processor SDK for AM57xx
- Processor SDK for AMIC110
- Processor SDK RTOS for C665x
- Processor SDK RTOS for C667x
- Processor SDK RTOS for C6747/OMAP-L17
- Processor SDK RTOS for C6748/OMAP-L138
- Processor SDK RTOS for K2E
- Processor SDK RTOS for K2G
- Processor SDK RTOS for K2H/K2K
- Processor SDK RTOS for K2L
From the appropriate software product page, go to the download page by clicking "Get Software" for the RTOS package.
Setup EVM hardware
The EVM provides the ability to utilize a variety of capabilities of the SoC. Follow instructions in the included EVM Quick Start Guide for information on hardware configuration and other pertinent information. This guide is included in the EVM kit and also available for download from the software download page for your particular device. The list of supported EVMs are provided in the Release Notes.
If you connect to the EVM UART, use the following host configuration:
- Baud Rate: 115200
- Data Bits: 8
- Parity: None
- Flow Control: Off
For more information beyond what is covered in the EVM Quick Start Guide, see EVM Hardware User Guides.
Setting up CCS for EVM and Processor-SDK RTOS
After the Processor SDK is installed, launch Code Composer Studio and make sure that the components inside Processor SDK are discovered by the CCS eclipse environment. If you installed the SDK in the same directory as CCS, this is as simple as starting CCS and it will auto-detect the newly installed components.
The next step is to make a connection between CCS and your EVM (or target). If you need help with this step, see the Setup CCS How To page explaining this further.
At this point, you should be able to connect to target using CCS and start development!
Getting Started Guide
Landing Page to All Processor SDK RTOS Packages
Examples and Demonstrations