using_tools_on_stm8010-ref.pdf

10
November 2006 7974411 Rev C 1/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. www.st.com

Upload: edenia-jolvino

Post on 13-Apr-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using_Tools_on_STm8010-Ref.pdf

November 2006 7974411 Rev C 1/10

Application noteST200 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.

www.st.com

Page 2: Using_Tools_on_STm8010-Ref.pdf

Contents ST200

2/10 7974411

Contents

Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

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

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

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

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

2.4 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 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

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

Page 3: Using_Tools_on_STm8010-Ref.pdf

ST200 Prerequisites

7974411 3/10

1 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)

● 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.

Figure 1. Connecting to the STm8010-REF Traviata

PAL/NTSC TVmonitor and

audio system

SATAdrive interface

HDDIDVD interface

IEEE1394interface

HDMI, HDTV,video outputs

USBinterface

DSU

Printer

ST-MULTICORE/MUXmodule

Host/target

ST Micro Connect

Eth

erne

t hub

PORT 3

PORT 2

interfaces

master

ST Micro Connect

ST Micro Connect

10baseT

(network or point-point)Ethernet connection

PC / UNIXdevelopmenthost running

multiple debugoperations

PORT 4

Traviata (STm8010-Ref)

DB582

Page 4: Using_Tools_on_STm8010-Ref.pdf

Prerequisites ST200

4/10 7974411

Figure 2. ST-MULTICORE/MUX front panel switch positions

Table 1 summarizes the system components.

On

5

Switches on

Switches off 1 2 3 4 6 7 8

Config

A B

ROM

DB579

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 processor at >300 MHz with >32 Mbytes of RAM, >120 Mbytes disk free space). Sun Solaris OS 5.8 platform for Unix.

Any PC supplier Not applicable

ST-Multicore/MUX module

Add-on module allowing multiple ST Micro Connect communications.

STMicroelectronics DB579

ST Dongle BoardSpecial 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.

STMicroelectronicsST20-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 boardWorldwide 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.

Page 5: Using_Tools_on_STm8010-Ref.pdf

ST200 How to compile applications

7974411 5/10

2 How to compile applications

2.1 ST231 architecture selectionBy 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 selectionBy 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.

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.

Table 2. LMI memory

Target name Address Size

mb426_host 0x80000000 32M

mb426_avenc 0x82000000 16M

mb426_avdec 0x83000000 16M

Page 6: Using_Tools_on_STm8010-Ref.pdf

How to compile applications ST200

6/10 7974411

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 ExampleCompile 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

Page 7: Using_Tools_on_STm8010-Ref.pdf

ST200 How to connect to the board

7974411 7/10

3 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 modeIn 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 modeIn 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=0x0mb426_avenc st200emu HTI_ID tcp:<IP address> BOARD mb426_avenc NO_TAP_CTRL NO_CHIP_RESET CLOCK_D=64 CPU_RESET_ADDRESS=0x40mb426_avdec st200emu HTI_ID tcp:<IP address> BOARD mb426_avdec NO_TAP_CTRL NO_CHIP_RESET CLOCK_D=64 CPU_RESET_ADDRESS=0x100

Page 8: Using_Tools_on_STm8010-Ref.pdf

How to connect to the board ST200

8/10 7974411

3.3 ExampleExecute 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

Page 9: Using_Tools_on_STm8010-Ref.pdf

ST200 Revision history

7974411 9/10

4 Revision history

Table 3. Document revision history

Date Revision Changes

8-Nov-2006 C Moved to new template. No technical changes.

Jun 2006 B Prerequisites: Updated supported Linux version.

Mar 2006 A Initial release.

Page 10: Using_Tools_on_STm8010-Ref.pdf

ST200

10/10 7974411

Please Read Carefully:

Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve theright to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at anytime, without notice.

All ST products are sold pursuant to ST’s 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 noliability 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 thisdocument 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 productsor services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of suchthird party products or services or any intellectual property contained therein.

UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIEDWARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIEDWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWSOF 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 NOTRECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAININGAPPLICATIONS, 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 "AUTOMOTIVEGRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.

Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately voidany warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, anyliability 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