You are on page 1of 10

Application note

ST200 VLIW series


Using the ST200 tools on the STm8010-REF Traviata board

Synopsis
This document provides an overview of how to use the ST200 toolsets on an STm8010-REF
Traviata (mb426). It covers:

Prerequisites on page 3,

How to compile applications on page 5,

How to connect to the board on page 7.

November 2006

7974411 Rev C

1/10
www.st.com

Contents

ST200

Contents
Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1

Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

How to compile applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2/10

2.1

ST231 architecture selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2

STm8010 chip selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.3

Memory mapping and CPU selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.4

Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

How to connect to the board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7


3.1

Connection in bypass mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.2

Connection in multiplexed mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.3

Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

7974411

ST200

Prerequisites

Prerequisites
There are several prerequisites that must be fulfilled before using the toolset.

Access to an STm8010-REF Traviata with an STm8010 chip.

An ST-MULTICORE/MUX box must be installed and connected to the single debug port
of the STm8010-REF Traviata with a LVDS cable.

One ST Micro Connect box must be installed for each ST231 CPU you want to access,
as shown in Figure 1. Each ST Micro Connect is dedicated to a specific CPU and
therefore must be connected to a specific port in number on the ST-MULTICORE/MUX
box.
Connect the ST Micro Connect to:

port in 2 to debug avenc cpu,

port in 3 to debug host cpu,

port in 4 to debug avdec cpu.

The ST-MULTICORE/MUX box enables debug information to be multiplexed and then


transmitted through the single debug port of the STm8010-REF Traviata and
demultiplexed by the STm8010 chip. STm8010 applications can be debugged either in
multiplexed mode (up to three CPUs debugged at the same time) or in bypass mode
(one ST231 CPU debugged at a time)

Figure 1.

The ROM slide switch must be in position A and the configuration switches on the front
panel of the ST-MULTICORE/MUX box must be set as shown in Figure 2.

Connecting to the STm8010-REF Traviata

PC / UNIX
development
host running
multiple debug
operations

HDMI, HDTV,
video outputs
Traviata (STm8010-Ref)
PAL/NTSC TV
monitor and
audio system DSU

DB582

Ethernet hub

PORT 4
PORT 2
ST Micro Connect

PORT 3
master

SATA
drive interface

IEEE1394
interface
USB
interface

ST Micro Connect
ST Micro Connect

HDDI
DVD interface

ST-MULTICORE/MUX
module
Printer

10baseT
Host/target
Ethernet connection interfaces
(network or point-point)

7974411

3/10

Prerequisites
Figure 2.

ST200

ST-MULTICORE/MUX front panel switch positions


DB579

Switches on On
ROM
1

Switches off

Config

Table 1 summarizes the system components.


Table 1.

System requirements for using the ST200 tools on the STm8010-REF Traviata

Component

Description

Supplier

Part Number

PC/UNIX/Linux
development host

Supported configuration: Windows 2000/XP


OS Pentium class PC, RedHat Linux
Enterprise V3.0 or higher for Linux
development (minimum Pentium II
Any PC supplier
processor at >300 MHz with >32 Mbytes of
RAM, >120 Mbytes disk free space). Sun
Solaris OS 5.8 platform for Unix.

Not applicable

ST-Multicore/MUX
module

Add-on module allowing multiple ST Micro


Connect communications.

STMicroelectronics

DB579

ST Dongle Board

Special Connector used to interface LVDS


cable to JTAG port

STMicroelectronics

DB582

ST Micro Connect

Hardware interface from Ethernet to


motherboard under test. Part number
depends upon the operating system. As
used in Figure 1.

STMicroelectronics

ST20-Connect(1)/Win,
ST20-Connect/Sun,
ST20-Connect/Lnx

ST200 Micro toolset

Embedded core development tools whose


part number depends upon the operating
system and development platform being
used (for example, PC or Sun Solaris and
Windows, Unix or Linux).

STMicroelectronics

ST200-Toolset

Target board

Worldwide reference platform consisting of


multicore STm8010 and memory.

STMicroelectronics

STm8010-Ref

1. Either the ST20 or the ST40 version of ST Micro Connect is compatible for use with the ST200 Micro Toolset.

4/10

7974411

ST200

How to compile applications

How to compile applications

2.1

ST231 architecture selection


By default the toolset compiles the application for the ST220 core architecture. The
STm8010 chip contains only ST231 cores, so the following st200cc option must be
specified:
-mcore=st231

2.2

STm8010 chip selection


By default, the toolset compiler is not aware of peripheral control registers specific to the
STm8010 chip and shared by the three ST231 CPUs. Specify the following st200cc option
to enable the application to access relevant information in these control registers:
-msoc=stm8010

Note:

This option is essential for the correct execution of any application built in OS21 run-time
mode or for bare mode applications that utilize time features.

2.3

Memory mapping and CPU selection


Predefined memory configuration
The toolset is provided with a default setting for sharing the LMI memory of the
STm8010-REF Traviata between the three CPUs, as shown in Table 2.
Table 2.

LMI memory
Target name

Address

Size

mb426_host

0x80000000

32M

mb426_avenc

0x82000000

16M

mb426_avdec

0x83000000

16M

The ST231 application must be linked to match the dedicated memory area. For example, to
build for the mb426_avdec CPU memory space, use the st200cc option:
-mboard=mb426_avdec

Customized memory configuration


By default, the toolset compiles the application to be loaded at DEFAULT_TEXT_BASE
(where the .text section of the program is set at link time) and the st200run and
st200gdb debugger tools initialize the RAMEND (where the stack is initialized) at
DEFAULT_RAMEND, as described in the ST200 Cross Development Manual
(ADCS 7521642). Both DEFAULT_TEXT_BASE and DEFAULT_RAMEND are defined at
compile time in <tools-dir>/target/board/<target name>/board.ld.

7974411

5/10

How to compile applications

ST200

All the information related to the memory space usage of each target is encoded in the
<tools-dir>/target/board/<target name>/board.ld files of each <target
name> such as mb426_host. New <target name> directories may be created under
<tools-dir>/target/board in order to fit the requirements of the application for
sharing the memory space for this board. This is taken into account by specifying the
-mboard=<target name> option when using st200cc, and by specifying the BOARD
<target name> option in the definition of the connection alias in the targets.cfg file
when using st200run or st200gdb.

2.4

Example
Compile your hello world program for the three different cores available on the STm8010
chip:
st200cc -mboard=mb426_avenc -msoc=stm8010 -mcore=st231
-mruntime=[os21|bare]
-o hello.avenc hello.c -g
st200cc -mboard=mb426_avdec -msoc=stm8010 -mcore=st231
-mruntime=[os21|bare]
-o hello.avdec hello.c -g
st200cc -mboard=mb426_host -msoc=stm8010 -mcore=st231
-mruntime=[os21|bare]
-o hello.host hello.c -g

6/10

7974411

ST200

How to connect to the board

How to connect to the board


The three ST231 cores of the STm8010-REF Traviata can be accessed either in bypass
mode or in multiplexed mode.

3.1

Connection in bypass mode


In bypass mode, one ST231 CPU (the host CPU) can be accessed with the st200gdb
debugger or the st200run tool while the two other CPUs are left in an idle loop. This mode is
useful for quickly connecting to one ST231 host CPU (the host CPU), debugging code,
running with oscalls or debugging at a higher speed.
This mode can be accessed using the following target alias in the targets.cfg file:
mb426_host_bp
st200emu HTI_ID tcp:<IP address> BOARD mb426_host
NO_TAP_CTRL BOARD_TXT_FILE board_bypass.txt CLOCK_D=2
CPU_RESET_ADDRESS=0x0

Note:

While debugging or running in bypass mode on this CPU, no attempt should be made to
access the other CPUs by the st200gdb and st200run tools.

3.2

Connection in multiplexed mode


In multiplexed mode, each ST231 CPU can be accessed under a st200gdb debugger or
st200run session at the same time. This mode is useful for debugging integration problems
in a multicore application context, or just to enable concurrent and independent execution or
debug activities for the three CPUs.
There are, however, some limitations users must be aware of.

After power-on or physical reset of the board, the mb426_host CPU must be
connected first by either the st200gdb or st200run tools, before the mb426_avenc or
mb426_avdec CPUs can be connected.

While the mb426_avenc or mb426_avdec slave CPUs are connected, any action on
the mb426_host CPU that triggers a STm8010 chip reset must be prevented:

do not start a connect or disconnect action on the host CPU while a slave CPU is
connected,

do not start an st200gdb load action on the host CPU while a slave CPU is
connected.

To access the targets in multiplexed mode, the following target aliases must be used in the
targets.cfg file:
mb426_host st200emu HTI_ID tcp:<IP address> BOARD mb426_host
NO_TAP_CTRL CLOCK_D=16 CPU_RESET_ADDRESS=0x0
mb426_avenc st200emu HTI_ID tcp:<IP address> BOARD mb426_avenc
NO_TAP_CTRL NO_CHIP_RESET CLOCK_D=64 CPU_RESET_ADDRESS=0x40
mb426_avdec st200emu HTI_ID tcp:<IP address> BOARD mb426_avdec
NO_TAP_CTRL NO_CHIP_RESET CLOCK_D=64 CPU_RESET_ADDRESS=0x100

7974411

7/10

How to connect to the board

3.3

ST200

Example
Execute a program in bypass mode on the host CPU:
st200run -v -t mb426_host_bp hello.host
Launch a program on the host CPU, then launch two debug sessions in parallel on the slave
CPUs:
st200run -v -t mb426_host hello.host
st200gdb -nw hello.avenc
target gdi -t mb426_avenc
load
b main
run
st200gdb -nw hello.avdec
target gdi -t mb426_avdec
load
b main
run

8/10

7974411

ST200

Revision history

Revision history
Table 3.

Document revision history

Date

Revision

Changes

8-Nov-2006

Moved to new template. No technical changes.

Jun 2006

Prerequisites: Updated supported Linux version.

Mar 2006

Initial release.

7974411

9/10

ST200

Please Read Carefully:

Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (ST) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to STs terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.

UNLESS OTHERWISE SET FORTH IN STS TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USERS OWN RISK.

Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.

ST and the ST logo are trademarks or registered trademarks of ST in various countries.


Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.

2006 STMicroelectronics - All rights reserved


STMicroelectronics group of companies
Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America
www.st.com

10/10

7974411

You might also like