Motorola LD-W-1 Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Nein Motorola LD-W-1 herunter. Motorola LD-W-1 User manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 89
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
November 2009 Doc ID 11392 Rev 4 1/89
UM0144
User Manual
ST Assembler-Linker
Introduction
This manual describes using the ST Assembler-Linker to develop applications for the ST7
and STM8 microcontrollers. The assembly tools described in this book form a development
system that assembles, links and formats your source code.
Purpose and scope
This manual provides information about producing an application executable for the ST7
and STM8 microcontrollers from your application source code in assembler language. It
includes:
An overview of assembly language for the ST7 and STM8 microcontrollers
Instructions for running the ST Assembler-Linker
Descriptions of the assembler output
For information on related subjects refer to the following documentation:
ST7xxxx Datasheet – full description of the ST7 xxxxmicrocontroller
STM8xxxx Datasheet – full description of the STM8xxxx microcontroller
ST7 Programming Manual – a complete reference to the ST7 assembly language
STM8 Programming Manual – a complete reference to the STM8 assembly language
Figure 1. Schematic overview of the assembler toolset
LY N
Obsend
Source files
Objects (*.obj)
Listings (*.lsr) with relative addresses
*.cod
*.map
Listings (*.lst) with
Programmable binary
file (*.s19 or *.hex)
ABSLIST
ASM
Stored object
files (*.lib)
LIB
absolute addresses
www.st.com
Seitenansicht 0
1 2 3 4 5 6 ... 88 89

Inhaltsverzeichnis

Seite 1 - User Manual

November 2009 Doc ID 11392 Rev 4 1/89 UM0144User ManualST Assembler-LinkerIntroductionThis manual describes using the ST Assembler-Linker to develop a

Seite 2 - Contents

Introduction ST Assembler-Linker10/89 Doc ID 11392 Rev 4For assistance on all ST microcontroller subjects, or for help developing applications that us

Seite 3 - Doc ID 11392 Rev 4 3/89

ST Assembler-Linker Getting startedDoc ID 11392 Rev 4 11/892 Getting startedInstalling the ST Assembler-LinkerThe ST Assembler-Linker is delivered as

Seite 4 - Contents ST Assembler-Linker

ST7 and STM8 addressing modes ST Assembler-Linker12/89 Doc ID 11392 Rev 43 ST7 and STM8 addressing modes3.1 Overview of ST7 and STM8 addressing mode

Seite 5 - List of tables

ST Assembler-Linker ST7 and STM8 addressing modesDoc ID 11392 Rev 4 13/89www.st.com. This chapter only gives a brief explanation of the main addressin

Seite 6 - 6/89 Doc ID 11392 Rev 4

ST7 and STM8 addressing modes ST Assembler-Linker14/89 Doc ID 11392 Rev 4addressing mode, while STM8 instructionaccepts both modespush memory ; STM8 a

Seite 7 - List of figures

ST Assembler-Linker ST7 and STM8 addressing modesDoc ID 11392 Rev 4 15/89An indirect addressing mode means that the data byte(s) required to do the op

Seite 8 - 1 Introduction

ST7 and STM8 addressing modes ST Assembler-Linker16/89 Doc ID 11392 Rev 43.7 Indexed modesThe ST7 supports the following types of indexed mode:● index

Seite 9 - 1.4 Getting assistance

ST Assembler-Linker ST7 and STM8 addressing modesDoc ID 11392 Rev 4 17/89nopld A,#lab12.h; load A with $00ld A,#lab12.l; load A with $12In the STM8, s

Seite 10 - 1.5 Conventions

ST assembler ST Assembler-Linker18/89 Doc ID 11392 Rev 44 ST assembler4.1 OverviewThe ST assembler program is a cross-assembler, meaning that it produ

Seite 11 - 2 Getting started

ST Assembler-Linker ST assemblerDoc ID 11392 Rev 4 19/89For example:Figure 2. Assembler source code format exampleThe next sections describe the main

Seite 12 -

Contents ST Assembler-Linker2/89 Doc ID 11392 Rev 4Contents1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Seite 13

ST assembler ST Assembler-Linker20/89 Doc ID 11392 Rev 4The suffix is not used when the label is referred to. Using of any suffixes other than .b, .w

Seite 14 - 3.5 Immediate operands

ST Assembler-Linker ST assemblerDoc ID 11392 Rev 4 21/894.3.4 Label scopeOften, in multi-module programs, a piece of code needs to refer to a label th

Seite 15 - Doc ID 11392 Rev 4 15/89

ST assembler ST Assembler-Linker22/89 Doc ID 11392 Rev 44.3.5 OpcodesThe Opcode field may serve three different purposes. It may contain:● The opcode

Seite 16 - 3.8 Relative mode

ST Assembler-Linker ST assemblerDoc ID 11392 Rev 4 23/89 String constantsString constants are strings of ASCII characters surrounded by double

Seite 17 - Doc ID 11392 Rev 4 17/89

ST assembler ST Assembler-Linker24/89 Doc ID 11392 Rev 4 Table 6. Level 1 operatorsOperation Result, level #1-a negated aa a

Seite 18 - 4 ST assembler

ST Assembler-Linker ST assemblerDoc ID 11392 Rev 4 25/89 Operator names longer than one character must be followed by a space character. For e

Seite 19 - 4.3.2 Label size

ST assembler ST Assembler-Linker26/89 Doc ID 11392 Rev 44.4 Segmentation4.4.1 Segments explainedSegments are very important. You have to understand se

Seite 20 - 4.3.3 Label relativity

ST Assembler-Linker ST assemblerDoc ID 11392 Rev 4 27/894.4.2 ParametersPossible arguments are:● Name● Align● Combine● cod parameter, output file cont

Seite 21 - 4.3.4 Label scope

ST assembler ST Assembler-Linker28/89 Doc ID 11392 Rev 4CombineThe <combine> argument tells the assembler and linker how to treat the segment. T

Seite 22 - 4.3.6 Operands

ST Assembler-Linker ST assemblerDoc ID 11392 Rev 4 29/89cod parameter, output file controlThe last field of a SEGMENT directive controls where the lin

Seite 23 - Expressions and operators

ST Assembler-Linker ContentsDoc ID 11392 Rev 4 3/894.4 Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Seite 24 - Table 8. Level 3 operators

ST assembler ST Assembler-Linker30/89 Doc ID 11392 Rev 44.5 MacrosMacros are assembly-time subroutines.When you call an execution-time subroutine you

Seite 25 - 4.3.8 A source code example

ST Assembler-Linker ST assemblerDoc ID 11392 Rev 4 31/89There is one further problem: because a macro may be called several times in the same module,

Seite 26 - 4.4 Segmentation

ST assembler ST Assembler-Linker32/89 Doc ID 11392 Rev 44.6 Conditional assembly #IF, #ELSE and #ENDIF directivesConditional assembly is used to choo

Seite 27 - 4.4.2 Parameters

ST Assembler-Linker ST assemblerDoc ID 11392 Rev 4 33/894.7 Running the assembler4.7.1 Command lineThe assembler needs the following arguments:ASM &l

Seite 28

ST assembler ST Assembler-Linker34/89 Doc ID 11392 Rev 4SYM optionLI optionOBJ option-D <1> <2> #define <1> <2> (see page 36)-

Seite 29

ST Assembler-Linker ST assemblerDoc ID 11392 Rev 4 35/89FI optionNote: Instead of using ASM -fi, it is advised to use the list file post processor ABS

Seite 30 - 4.5 Macros

ST assembler ST Assembler-Linker36/89 Doc ID 11392 Rev 4D optionNote: If you specify multiple -D switches, they should always be separated by a space.

Seite 31 - 4.5.2 Parameter substitution

ST Assembler-Linker ST assemblerDoc ID 11392 Rev 4 37/89M optionPA optionNP optionDescription: Tells the ST assembler to output a rule suitable for m

Seite 32 -

Linker ST Assembler-Linker38/89 Doc ID 11392 Rev 45 Linker5.1 What the linker doesAfter having separately assembled all the component modules in your

Seite 33

ST Assembler-Linker LinkerDoc ID 11392 Rev 4 39/89Some examples:Linking together the modules game.obj, scores.obj, key.obj, game1.obj, game2.obj and g

Seite 34 - OBJ option

Contents ST Assembler-Linker4/89 Doc ID 11392 Rev 46.2.8 GP binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Seite 35 - FI option

Linker ST Assembler-Linker40/89 Doc ID 11392 Rev 45.4 Linking in detail5.4.1 PUBLICs and EXTERNsAll labels declared external in the modules being li

Seite 36 - I option

ST Assembler-Linker LinkerDoc ID 11392 Rev 4 41/89For example:grafix segment byte at: 100-027F 'RAM1'cursor_buf ds.b 64 ; buffer for map und

Seite 37 - NP option

Linker ST Assembler-Linker42/89 Doc ID 11392 Rev 45.5 The linker in more detail5.5.1 The composition of the .OBJ filesThe .OBJ files produced by the

Seite 38 - 5 Linker

ST Assembler-Linker LinkerDoc ID 11392 Rev 4 43/89Class list:The external label list only includes labels that were declared PUBLIC: labels used inter

Seite 39 - 5.3.2 Response files

OBSEND ST Assembler-Linker44/89 Doc ID 11392 Rev 46 OBSEND6.1 What OBSEND does for youAfter your program has been assembled and linked to form a .COD

Seite 40 - 5.4 Linking in detail

ST Assembler-Linker OBSENDDoc ID 11392 Rev 4 45/896.2.4 Straight binary format<format>= <none>This is the simplest of the formats. It is

Seite 41 - 5.4.3 Symbol files

OBSEND ST Assembler-Linker46/89 Doc ID 11392 Rev 4The next two characters are the record type for this line: 00 is a data line, and 01 signals EOF. Th

Seite 42 - 42/89 Doc ID 11392 Rev 4

ST Assembler-Linker OBSENDDoc ID 11392 Rev 4 47/89S113001AFF120094FF130094D08AFF390094FF1250S20801C004FFC0000073<format>= xThe extended S-record

Seite 43 - Doc ID 11392 Rev 4 43/89

ABSLIST ST Assembler-Linker48/89 Doc ID 11392 Rev 47 ABSLIST7.1 OverviewAs the list file with absolute addresses generated by the assembler from the s

Seite 44 - 6 OBSEND

ST Assembler-Linker ABSLISTDoc ID 11392 Rev 4 49/897.2 Invoking the list file post processorHere is the full command syntax of the list file post pro

Seite 45 - 6.2.5 Intel hex format

ST Assembler-Linker List of tablesDoc ID 11392 Rev 4 5/89List of tablesTable 1. Description of installed files . . . . . . . . . . . . . . . . . . .

Seite 46 - 46/89 Doc ID 11392 Rev 4

ABSLIST ST Assembler-Linker50/89 Doc ID 11392 Rev 47.3 Limitations1. There is one main limitation. The update of the relative address is based on the

Seite 47 - 6.2.8 GP binary

ST Assembler-Linker LibrarianDoc ID 11392 Rev 4 51/898 Librarian8.1 OverviewIf you do a lot of work on similar boards especially those with the same p

Seite 48 - 7 ABSLIST

Librarian ST Assembler-Linker52/89 Doc ID 11392 Rev 4 8.3 Adding modules to a libraryTyping for example: +user1\board would look for a file,

Seite 49 - Doc ID 11392 Rev 4 49/89

ST Assembler-Linker LibrarianDoc ID 11392 Rev 4 53/898.5 Copying modules from a libraryTo make a copy of a .OBJ module located in a library back to y

Seite 50 - 7.3 Limitations

Definitions ST Assembler-Linker54/89 Doc ID 11392 Rev 49 Definitions Table 18. Acronyms and terms used in this documentName DefinitionApplicat

Seite 51 - 8 Librarian

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 55/89Appendix A Assembler directivesA.1 IntroductionEach directive is described in a table

Seite 52

Assembler directives ST Assembler-Linker56/89 Doc ID 11392 Rev 4A.2 Directives Table 20. .BELLPurpose Ring bell on console.F

Seite 53

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 57/89 Table 23. CEQUPurpose Equate pre-existing label to

Seite 54 - 9 Definitions

Assembler directives ST Assembler-Linker58/89 Doc ID 11392 Rev 4 ExampleDC.B 1,2,3 ; generates 01,02,03DC.B “HELLO” ; genera

Seite 55 - A.1 Introduction

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 59/89 DescriptionThe benefits of using labels in assembler level programmi

Seite 56 - A.2 Directives

List of tables ST Assembler-Linker6/89 Doc ID 11392 Rev 4Table 49. #INCLUDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Seite 57

Assembler directives ST Assembler-Linker60/89 Doc ID 11392 Rev 4 DescriptionThis directive is used to 'space out' label definitions.

Seite 58

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 61/89 Table 33. ENDPurpose End of source code.Format ENDDescripti

Seite 59 - Table 29. #DEFINE

Assembler directives ST Assembler-Linker62/89 Doc ID 11392 Rev 4 Table 36. #ELSEPurpose Conditional ELSE.F

Seite 60 - Table 32. DS.L

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 63/89 Table 39. FCSPurpose Form constant string.Format F

Seite 61 - Table 35. EXTERN

Assembler directives ST Assembler-Linker64/89 Doc ID 11392 Rev 4 DescriptionSometimes it is necessary to have different versions of a

Seite 62 - Table 38. FAR (STM8 only)

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 65/89 Table 45. #IFBPurpose Conditional on argument being blank.F

Seite 63 - Table 42. #IF

Assembler directives ST Assembler-Linker66/89 Doc ID 11392 Rev 4 Table 48. #IFLABPurpose Conditional on argument being a la

Seite 64 - Table 44. #IF2

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 67/89 ExampleINTELld X,0FFFFhSee also MOTOROLA, TEXAS, Z

Seite 65 - Table 47. #IFDEF

Assembler directives ST Assembler-Linker68/89 Doc ID 11392 Rev 4 Examplesegment byte at 8000-C000 'EPROM1'#LOAD “table.bin”

Seite 66 - Table 50. INTEL

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 69/89 Table 57. LONGSPurpose Default new label length long.Format

Seite 67

ST Assembler-Linker List of figuresDoc ID 11392 Rev 4 7/89List of figuresFigure 1. Schematic overview of the assembler toolset. . . . . . . . . . . .

Seite 68

Assembler directives ST Assembler-Linker70/89 Doc ID 11392 Rev 4 Examplecmp16 MACRO first,second,resultLOCAL trylowld A,firs

Seite 69 - Table 59. MEND

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 71/89 DescriptionStrings named in the first argument of

Seite 70 - Table 62. .NOCHANGE

Assembler directives ST Assembler-Linker72/89 Doc ID 11392 Rev 4 DescriptionThis directive marks out given labels defined du

Seite 71

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 73/89 Examplebyte no alignment; can start on any byte boundariesword align

Seite 72

Assembler directives ST Assembler-Linker74/89 Doc ID 11392 Rev 4 Table 72. STRINGPurpose Define a byte-level string

Seite 73 - Table 69. SEGMENT

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 75/89 DescriptionThe Motorola style:>AB Hexadecimal~17 Octal?1

Seite 74 - Table 75. TEXAS

Assembler directives ST Assembler-Linker76/89 Doc ID 11392 Rev 4 DescriptionThis directive forces the word(s) in its argumen

Seite 75 - Table 78. WORD

ST Assembler-Linker Assembler directivesDoc ID 11392 Rev 4 77/89DescriptionThe Motorola style:%AB Hexadecimal%(8)17 Octal%(2)100 Binary17 Decimal (def

Seite 76 - Table 81. ZILOG

Error messages ST Assembler-Linker78/89 Doc ID 11392 Rev 4Appendix B Error messagesB.1 Format of error messagesThere are two classes of error trappe

Seite 77

ST Assembler-Linker Error messagesDoc ID 11392 Rev 4 79/89B.3 Assembler errorsTable 82. Assembler errorsError Definition1 Empty file: The assembler co

Seite 78 - Appendix B Error messages

Introduction ST Assembler-Linker8/89 Doc ID 11392 Rev 41 Introduction1.1 ST7 and STM8 incompatibilitiesThe new ST7/STM8 assembler development toolcha

Seite 79 - B.3 Assembler errors

Error messages ST Assembler-Linker80/89 Doc ID 11392 Rev 426Illegal external suffix: Only the suffixes .b, .B, .w, .W, .l, .L are legal after an exter

Seite 80

ST Assembler-Linker Error messagesDoc ID 11392 Rev 4 81/8951Phase inconsistency (P1=X,P2=Y) 'label': Reports that the named label was alloca

Seite 81

Error messages ST Assembler-Linker82/89 Doc ID 11392 Rev 467 Improper characters: Unusual characters have been spotted in the source file, of value &g

Seite 82

ST Assembler-Linker Error messagesDoc ID 11392 Rev 4 83/89B.4 Linking errors 101 Label defined as NEAR and INTERRUPT102 Label defined as FAR a

Seite 83 - B.4 Linking errors

Revision history ST Assembler-Linker84/89 Doc ID 11392 Rev 4Revision history Table 84. Document revision historyDate Revision Changes01-Jul-20

Seite 84 - Revision history

Index ST Assembler-Linker85/89 Doc ID 11392 Rev 4IndexSymbols.asm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18.cod . . . . .

Seite 85 - Numerics

ST Assembler-Linker IndexDoc ID 11392 Rev 4 86/89%OUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71.CTRL . . . . . . . . . . . . . .

Seite 86 - Doc ID 11392 Rev 4 86/89

Index ST Assembler-Linker87/89 Doc ID 11392 Rev 4no closing single quote . . . . . . . . . . . . . . . . .81no info on start address of class ’class’

Seite 87 - 87/89 Doc ID 11392 Rev 4

ST Assembler-Linker IndexDoc ID 11392 Rev 4 88/89f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45g . . . . . . . . . . . . .

Seite 88 - Doc ID 11392 Rev 4 88/89

ST Assembler-LinkerDoc ID 11392 Rev 4 89/89 Please Read Carefully:Information in this document is provided solely in connection with ST produ

Seite 89 - ST Assembler-Linker

ST Assembler-Linker IntroductionDoc ID 11392 Rev 4 9/89Generally, the instruction sets are similar, with the following notable differences:● The STM8

Kommentare zu diesen Handbüchern

Keine Kommentare