Tiva™ C Series Development and Evaluation

Tiva™ C Series Development and Evaluation
Quick Start Guide
SPMU354 – July 2013
Tiva™ for C Series Development and Evaluation Kits for
IAR Embedded Workbench®
The Tiva for C Series Development and Evaluation Kits provide a low-cost way to start designing with Tiva
C Series microcontrollers using IAR System’s Embedded Workbench tools. The boards can function as
either a complete evaluation target, or with minor modifications as a debugger interface to any external
Tiva C Series device.
1
Requirements
•
•
•
2
PC with a USB interface, running Microsoft Windows® 2000, Windows XP, Windows 7, or Windows 8
operating systems (OSs).
Tiva C Series Development Kit Software USB flash drive or the downloaded and extracted kit software
(found on www.ti.com/tool/sw-<kit_name>)
ICDI drivers installed following the instructions in Stellaris® In-Circuit Debug Interface (ICDI) and Virtual
COM Port (SPMU287).
IAR Embedded Workbench
This quick start guide shows how to install the KickStart™ version of the IAR Systems Embedded
Workbench tools, and then how to use it to build and run an example application on your Tiva C Series
Evaluation or Development Board.
2.1
Installation
2.1.1
Install Embedded Workbench
1. Insert the Tiva C Series Development Kit Software USB flash drive and click on the index.html. For kits
that don't include a USB flash drive, go to the evaluation board software webpage (www.ti.com/tool/sw<kit_name>).
2. With the Evaluation Kit USB flash drive, click the IAR Logo to start the setup program. If the setup
program does not start or if you are using downloaded software, use Windows Explorer to view the
files on the USB flash drive or the download directory and double-click the EWARM-KS-CD-n.nn.exe
file in the Tools\IAR\ directory.
3. Click the Install Embedded Workbench link to begin the tool installation. You must register with IAR to
receive license information (by clicking Get License) before you can install the tools. If you have any
questions about installation, follow the instructions detailed in this IAR quick start documentation, which
can be accessed by clicking QuickStart Installation Information in the main window of the splash
screen.
Tiva, TivaWare are trademarks of Texas Instruments.
Stellaris is a registered trademark of Texas Instruments.
Cortex is a trademark of ARM limited.
KickStart is a trademark of IAR Systems AB.
IAR Embedded Workbench is a registered trademark of IAR Systems AB.
Microsoft Windows is a registered trademark of Microsoft Corporation.
All other trademarks are the property of their respective owners.
SPMU354 – July 2013
Submit Documentation Feedback
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
1
IAR Embedded Workbench
2.1.2
www.ti.com
Install the TivaWare™ C Series Software Package
A full set of C-based peripheral drivers is provided, covering all peripherals and functionality of the Tiva C
Series devices. The TivaWare for C Series package includes various example applications with project
files for all major tool vendors that support Tiva C Series, including IAR. To install TivaWare, follow these
steps:
1. On the html index of the Development Kit Software USB flash drive, click on the Firmware
Development Package. Depending on your web browser, you have the option to run the TivaWare
installer or save it to your drive.
NOTE: If you are navigating the USB flash drive using Windows Explorer (or a similar application),
go to the Tools/TivaWare directory.
2. Run the TivaWare installer. To manually install TivaWare, use the installer, which is a self-extracting
.zip file in the Tools/TivaWare directory. Use a .zip file extraction utility such as WinZip to manually
extract the contents.
3. To view the TivaWare documentation, navigate to the Tools/TivaWare/docs directory and click the Tiva
Peripheral Driver Library User’s Guide PDF.
NOTE: For the most recent version of TivaWare, check the www.ti.com/tiva-c website
2
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
SPMU354 – July 2013
Submit Documentation Feedback
IAR Embedded Workbench
www.ti.com
2.2
Start the Embedded Workbench IDE and Open a Workspace
1. Start the IAR Embedded Workbench IDE by selecting it from the Windows Start Menu. When the IDE
loads, it has a blank screen (see Figure 1).
Figure 1.
SPMU354 – July 2013
Submit Documentation Feedback
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
3
IAR Embedded Workbench
www.ti.com
2. Open the workspace file that corresponds to your board by clicking File → Open → Workspace. The
workspace file is in the TivaWare tree, which was installed on your PC as part of Section 2.1.2. In the
TivaWare tree, the workspace files are in the directory corresponding to your particular board:
ti\TivaWare_C_Series-n.n\examples\boards\{board_name}.
NOTE: The IAR tools also install TIvaWare as part of the default installation, but the version may be
older than what is currently available from the website. You can find TivaWare in the IAR
tree by looking in: C:\Program Files\IAR Systems\Embedded Workbench 5.4 Kickstart in the
folder: arm\examples\TexasInstruments\Tiva\boards\{board_name}.
Important: For the most recent version of the TivaWare example projects, check www.ti.com/tiva-c for the
latest software updates.
2.3
Build the StellarisWare Components and Example Project
Before any of the examples can be built, the TivaWare file must be compiled. To build the library file:
1. Right-click the driverlib project and select Make (see Figure 2).
Figure 2.
4
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
SPMU354 – July 2013
Submit Documentation Feedback
IAR Embedded Workbench
www.ti.com
2. Right-click the Hello example and select Set as Active to make the project the target project for
debugging (see Figure 3).
Figure 3.
3. Right-click the hello project again and select Make to build the project.
SPMU354 – July 2013
Submit Documentation Feedback
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
5
IAR Embedded Workbench
2.4
www.ti.com
Debug a Project
You can debug with either the on-board ICDI or you can use the IAR I-jet debug probe.
Perform the following steps to debug a project:
1. Select Download and Debug under the Project menu.
NOTE: The debugger downloads and verifies the application and stops execution at the main()
function (see Figure 4).
Figure 4.
From here, you can:
• Examine and modify memory.
• Program variables and processor registers.
• Set breakpoints.
• Step through a program.
• Perform other typical debugging activities.
6
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
SPMU354 – July 2013
Submit Documentation Feedback
IAR Embedded Workbench
www.ti.com
2. Select Go from the Debug menu or click the Go icon to run the program (see Figure 5).
Figure 5.
3. The application runs and the text Hello World! outputs to the PC via the UART or to the display of the
evaluation board.
2.5
Build and Run Additional Example Programs
There are several additional example projects listed in the TivaWare workspace. To build another example
project:
1. Right-click the project and select Set as Active to make it the target for debugging.
2. Right-click and select Make.
Follow the instructions from Section 2.4 to debug the application. The quick start application that came
preloaded on the evaluation board is the qs-xxxxxx project listed with the examples.
SPMU354 – July 2013
Submit Documentation Feedback
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
7
Create a New Project
3
www.ti.com
Create a New Project
When you have completed the TivaWare example applications, you may want to create your own project
to start development. While you can always start with an existing, simple project, sometimes you may
want to create a new project.
Because the IAR environment uses workspaces to manage projects, you can either create a brand new
workspace, or add your new project to the existing workspace. For demonstration purposes, you will
simply add your new project to the existing workspace.
To add a new project to the workspace perform the following steps:
1. In the Project menu, select Project → Create New Project… (see Figure 6).
Figure 6.
2. The Create New Project dialog box appears (see Figure 7). Because you are working with a C source,
select the C → main option.
8
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
SPMU354 – July 2013
Submit Documentation Feedback
Create a New Project
www.ti.com
Figure 7.
3. Create the project within the TivaWare tree by either saving it in the existing TivaWare\boards directory
or creating a new item in the boards directory that corresponds to your specific board or development.
4. If you create a new item, then create a new directory called my_board in ti\TivaWare_C_Seriesn.n\examples\boards, and create a new project called my_project.
The TivaWare tree now appears as: C:\ti\TivaWare_C_Seriesn.n\examples\boards\my_board\my_project (see Figure 8).
SPMU354 – July 2013
Submit Documentation Feedback
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
9
Create a New Project
www.ti.com
Figure 8.
This process creates the basic project as well as adds a simple main.c file. This new project, however, is
still missing startup code (required for Cortex™-M4).
To obtain startup code, the easiest thing to do is:
1. Copy a startup_ewarm.c file from one of the other TivaWare examples. Copy the file from the Hello
project (ti\TivaWare_C_Series-n.n\examples\boards\{board_name}\hello).
2. Place the file in the new my_project directory.
Now the startup code must be added to the project.
3. Right-click the project and select Add → Add Files…(see Figure 9). This takes you to the project
directory.
4. Select the startup_ewarm.c file.
10
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
SPMU354 – July 2013
Submit Documentation Feedback
Create a New Project
www.ti.com
Figure 9.
Before compiling and debugging the project, a few settings must be adjusted in the project options. In
addition to setting the processor core, TivaWare hooks and the debug and flash programmer must be
configured.
SPMU354 – July 2013
Submit Documentation Feedback
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
11
Create a New Project
3.1
www.ti.com
Set the Target
First, set the target of the project to a Tiva C Series device.
1. In the project options, select the project and either go to the project menu and select Options, or rightclick the project and select Options.
2. Select the device that most closely fits your board (see Figure 10).
Figure 10.
12
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
SPMU354 – July 2013
Submit Documentation Feedback
Create a New Project
www.ti.com
3.2
Add TivaWare Hooks
Next, add the driverlib.a file to your project:
1. Follow the same File → Add procedure described in Section 3.1. The location of the file is:
C:\ti\TivaWare_C_Series-1.0\driverlib\ewarm\Exe.
NOTE: The file browser must search for library file types, so change the Files of type drop-down
from Source Files to Library/Object Files or All Files.
To make sure that you have the appropriate pointers to the TivaWare source and header files, you must
include paths to the project settings. It is also a good practice to add defines for the compiler (ewarm) and
the part number (see Figure 11). This configuration is used in TivaWare to compile the IAR-specific
sections correctly.
Figure 11.
SPMU354 – July 2013
Submit Documentation Feedback
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
13
Create a New Project
3.3
www.ti.com
Set up the Debugger and Flash Programmer
The last thing to do is configure the debugger and flash programmer.
1. In the project options, select the Debugger item and choose the TI Stellaris option from the driver dropdown menu (see Figure 12).
Figure 12.
2. Under the Download tab, check the Verify download and Use flash loader(s) options (see Figure 13).
14
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
SPMU354 – July 2013
Submit Documentation Feedback
Conclusion
www.ti.com
Figure 13.
With these settings complete, you can download and debug your simple application. You can add your
own code or calls to TivaWare drivers (assuming you include the correct header files). The best way to
make sure everything is correct is to review some of the examples in the TivaWare package.
4
Conclusion
You have now installed the IAR Embedded Workbench IDE and used it to build, load, and run an example
application on your Tiva C Series Evaluation Board. You have also learned how to create a new project.
From here, you can experiment with the debugger or create your own application or use the Hello program
as an example.
5
References
The following references are included on the Tiva C Series Development Kit Software USB flash drive and
are also available for download at www.ti.com/tiva-c:
• Tiva C Series Evaluation Kit User's Manual.
• TivaWare for C Series Software, Order Number SW-TM4C (http://www.ti.com/tool/sw-tm4c)
• TivaWare Peripheral Driver Library User’s Guide, Order Number SW-DRL-UG (literature SPMU298).
In addition, the following website may be useful: IAR website at http://www.iar.com
SPMU354 – July 2013
Submit Documentation Feedback
Tiva™ for C Series Development and Evaluation Kits for IAR Embedded
Workbench®
Copyright © 2013, Texas Instruments Incorporated
15
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other
changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest
issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and
complete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of sale
supplied at the time of order acknowledgment.
TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms
and conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary
to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily
performed.
TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and
applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information
published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty or
endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alteration
and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered
documentation. Information of third parties may be subject to additional restrictions.
Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service
voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.
TI is not responsible or liable for any such statements.
Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements
concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support
that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which
anticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause
harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use
of any TI components in safety-critical applications.
In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to
help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and
requirements. Nonetheless, such components are subject to these terms.
No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties
have executed a special agreement specifically governing such use.
Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in
military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components
which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal and
regulatory requirements in connection with such use.
TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of
non-designated products, TI will not be responsible for any failure to meet ISO/TS16949.
Products
Applications
Audio
www.ti.com/audio
Automotive and Transportation
www.ti.com/automotive
Amplifiers
amplifier.ti.com
Communications and Telecom
www.ti.com/communications
Data Converters
dataconverter.ti.com
Computers and Peripherals
www.ti.com/computers
DLP® Products
www.dlp.com
Consumer Electronics
www.ti.com/consumer-apps
DSP
dsp.ti.com
Energy and Lighting
www.ti.com/energy
Clocks and Timers
www.ti.com/clocks
Industrial
www.ti.com/industrial
Interface
interface.ti.com
Medical
www.ti.com/medical
Logic
logic.ti.com
Security
www.ti.com/security
Power Mgmt
power.ti.com
Space, Avionics and Defense
www.ti.com/space-avionics-defense
Microcontrollers
microcontroller.ti.com
Video and Imaging
www.ti.com/video
RFID
www.ti-rfid.com
OMAP Applications Processors
www.ti.com/omap
TI E2E Community
e2e.ti.com
Wireless Connectivity
www.ti.com/wirelessconnectivity
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2013, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising