ST AN2142 APPLICATION NOTE

AN2142
Application note
ST10F27X firmware development
getting started with tasking ST10 toolchain
Introduction
This document provides an introduction to the Tasking toolchain (version v8.5 r1) for the ST10F27x product family. It describes the software environment required to develop an ST10F27x application and summarizes the different steps needed to configure the Tasking development toolset, to build and to debug an application on the target hardware.
Two software examples are supplied with this application note. The first one is a small application demonstrating an input / output toggling function. The required steps to create the project, build and debug it will be described. The second one illustrates another example using interrupts. Both examples are loaded and executed from an external RAM using Tasking RAM monitor.
The application source files are provided within an archived file. This file must be unpacked into a directory before use.
June 2006 Rev 1 1/16
http:/www.st.com
16
AN2142
Contents
1 Tasking ST10 toolchain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Starting Tasking development environment (EDE) . . . . . . . . . . . . . . . . . . . . . 3
1.2 Creating a new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Adding files to the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.1 Adding existing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.2 Adding new files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Setting build options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Building the application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.6 Using the RAM Monitor to debug the application with Cross View debugger 12
2 Application example: interrupt handling . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2/16
AN2142 Tasking ST10 toolchain

1 Tasking ST10 toolchain

The TASKING Embedded Development Environment EDE can be divided into three main parts:
Edit / Project management: In this part, projects are created and maintained, project
source files are edited etc.
Build: Here, a makefile (created by the Edit part) is used to invoke the needed toolchain
components, resulting in an absolute object file(*.abs).
Debug: In this part, the absolute file is used to debug the project.
The figure below shows how these parts interface with each other and enumerates the most imporant generated files.
(Motorola S record format)
*.sre
Project managemen
Tool options
*.C
*.asm
makefile
*.src
*.obj
*.out *.map etc...
*.abs
Debugger
t
EDIT part
BUILD part
*HEX
DEBUG part
Neither the toolset installation nor the license management are described in this application note. This section assumes that Tasking is already installed on the development host.
For more details on Tasking installation and license management, refer to Tasking documentation.
This section describes the steps required for creating, building and debugging an ST10F27x application using the tasking toolchain.

1.1 Starting Tasking development environment (EDE)

Getting started with EDE:
Select Start -> Programs ->Tasking C166-ST10 from the Windows Start menu.
Select C166-ST10 EDE from the menu
3/16
Tasking ST10 toolchain AN2142
Tasking starts and the following window appears:
Files Window
Project Window
Output Window
The files window is used to edit source files. The project window contains several tabs for viewing information about projects and other files. Finally, the output window contains several tabs to display results of EDE operations such as compiles and builds.
For further information about the window’s contents, refer to the Tasking documentation.

1.2 Creating a new project

When you use EDE, you need to setup a project space and add a project to it. A project space stores a set of projects. It allows multiple projects to be displayed at a time and allows the user to organize projects.
A project space file has the extension ‘*.psp’. A project file has the extension ‘*.pjt’.
The following steps describe how to create a new project:
Select New project space from the File menu. A Create a New Project Space dialog box
is displayed (see the figure below)
Use the Browse button to select a working directory.
Enter ’Getting Started Examples’ as the project space name in the Filename field.
Click OK to confirm your entries and close the Create a New Project Space window.
4/16
AN2142 Tasking ST10 toolchain
The following window appears:
Click on ’Getting Started Examples’ and choose Add New Project
An Add New Project to Project Space dialog box is displayed (see the figure below)
Use the Browse button to select a working directory.
5/16
Loading...
+ 11 hidden pages