AN1774
APPLICATION NOTE
STR71x SOFTWARE DEVELOPMENT
GETTING STARTED
INTRODUCTION
This document provides an introduction to the STR71x product family. It describes the software environment required to develop an STR71x application from scratch. It summarizes the
different steps needed to configure the development toolset and to use the template software
library to build and to debug a sample STR71x application on the target hardware.
Two software examples are supplied with this application note. Both are intended for users
new to STR71x microcontrollers. The first one is a standard application demonstrating an
input/output pin toggling function. The required steps to create this example project, to build
and debug the image are described in the first chapter. The second one illustrates an advanced example showing the use of interrupts. Both examples are loaded and executed from
the STR71x embedded RAM, and then the target hardware has to be configured consequently
(BOOTEN/1/0=”110”).
The application source files are provided within the package ’AN1774.zip’. This file should be
unpacked into any directory.
This document assumes that the reader is familiar with ARM cores. For more details on the
ARM core architecture, refer to the ARM Developer Suite Guide and the ARM Technical Reference Manual. These documents are available from ARM website.
Rev. 1.3
AN1774/0804 1/9
1
STR71x SOFTWARE DEVELOPMENT GETTING STARTED
1 SOFTWARE SETTINGS
This chapter describes the different steps needed to creating and configuring an STR71x
project. Neither the toolset installation nor the licence management are described in this application note. This document assumes that the toolset is already installed on the development
host. For more details on RealView toolset installation and licences’ management, refer to the
RealView Debugger Installation Guide for Windows.
For more details on creating and running applications, refer to the RealView Debugger Essentials Guide. RealView Debugger documents are available from the ARM website.
The ARM RealView provides a graphical user interface tool for managing your software development projects.
This section describes the steps required for creating, building and debugging an STR71x
standard application using the RealView toolset. This application consists of toggling the I/O
port 0 peripheral pins. The I/Os, configured as push-pull outputs, are toggled in an endless
loop every 130 ms (the external clock operates at a frequency of 16 MHz).
The application source code files are located in the example 1 of ’AN1774.zip’ file and are
made of, besides the standard files described in Section 2.1, the ‘main.c’ file containing the
main routine.
1.1 STARTING REALVIEW DEBUGGER
To start the RealView Debugger:
■ Select Start->Programs->ARM->ARM RealView Developper Kit for ST from the
Windows Start menu,
■ Select RealView Debugger from the menu.
RealView Debugger starts and the default Code window is displayed. This window is your debugging and editing window.
The appearance of the Code window depends on your licenses. For further information about
this window contents, refer to the RealView Debugger Essentials Guide.
1.2 CREATING A NEW PROJECT
The following steps describe how to create a new project.
■ Select Project->New project... from the default Code window main menu. A Create New
project dialog box is displayed (see the figure below),
■ Enter ’PinToggling’ as the project name in the Project Name field,
■ Click the folder icon and choose <Select Dir...> to locate the project base directory,
2/9
2
STR71x SOFTWARE DEVELOPMENT GETTING STARTED
■ Select Standard project (Compile/Assemble/Link) as project type,
■ Click OK to confirm your entries and close the Create New Project window.
1.3 DEFINING A STANDARD PROJECT
Once the Create New Project window is closed the Create Standard project dialog box is displayed (See the figure below).
■ Select "ARM-C2" in the Toolchain field.
■ Specify the Sources (C/C++/Assembly) to build from by clicking the directory icon. The
project base directory, defined previously, is opened. Select the source files to be added to
the source list box: use Shift or Ctrl keys. The files: retarget.c, 71x_vect.s, main.c and
71x_init.s must be selected to be included in the build process.
The Real View Debugger completes the Executable field with the project name (PinTog-
gling.axf) and the Description field as Standard project. Then click OK to create the project.
3/9