Texas Instruments MSP-FET430 manual File Reference Directives, Conditional-Assembly Directives

Page 85

TI to IAR 2.x/3.x Assembler Migration

E.2.6

File Reference Directives

 

Description

 

Asm430 Directive (TI)

A430 Directive (IAR)

Include source statements from another

.copy or .include

#include or $

file

 

 

 

Identify one or more symbols that are

.def

PUBLIC or EXPORT

defined in the current module and used in

 

 

other modules

 

 

Identify one or more global (external)

.global

1)

symbols

 

 

 

Define a macro library

.mlib

2)

Identify one or more symbols that are

.ref

EXTERN or IMPORT

used in the current module but defined in

 

 

another module

 

 

1)The directive .global functions as either .def if the symbol is defined in the current module, or .ref otherwise. PUBLIC or EXTERN must be used as applicable with the A430 assembler to replace the

.global directive.

2)The concept of macro libraries is not supported. Include files with macro definitions must be used for this functionality.

Modules may be used with the Asm430 assembler to create individually linkable routines. A file may contain multiple modules or routines. All symbols except those created by DEFINE, #define (IAR preprocessor directive) or MACRO are “undefined” at module end. Library modules are, furthermore, linked conditionally. This means that a library module is only included in the linked executable if a public symbol in the module is referenced externally. The following directives are used to mark the beginning and end of modules in the A430 assembler.

Additional A430 Directives (IAR)

 

A430 Directive (IAR)

Start a program module

 

NAME or PROGRAM

Start a library module

 

MODULE or LIBRARY

Terminate the current program or library module

ENDMOD

E.2.7

Conditional-Assembly Directives

 

Description

 

Asm430 Directive (TI)

A430 Directive (IAR)

Optional repeatable block assembly

.break

1)

Begin conditional assembly

.if

IF

Optional conditional assembly

.else

ELSE

Optional conditional assembly

.elseif

ELSEIF

End conditional assembly

.endif

ENDIF

End repeatable block assembly

.endloop

ENDR

Begin repeatable block assembly

.loop

REPT

1)There is no directive that directly corresponds to .break. However, the EXITM directive can be used with other conditionals if repeatable block assembly is used in a macro, as shown:

SEQ

MACRO FROM,TO

; Initialize a sequence of byte constants

 

LOCAL X

 

 

X

SET

FROM

 

 

REPT

TO-FROM+1

; Repeat from FROM to TO

 

IF

X>255

; Break if X exceeds 255

 

EXITM

 

 

 

ENDIF

 

 

 

DB

X

; Initialize bytes to FROM...TO

E-5

Image 85
Contents 2004 Users GuideImportant Notice Page July Read This First How to Use This ManualAbout This Manual Related Documentation From Texas Instruments Information About Cautions and WarningsFCC Warning If You Need AssistancePage Contents Frequently Asked Questions Tables FiguresPage Topic Get Started NowKit Contents, MSP-FET430X110 Software Installation Kit Contents, MSP-FET430UIFHardware Installation, MSP-FET430X110 Flashing the LED Hardware Installation, USB-IF, MSP-FET430UIFGet Started Now Important MSP430 Documents on the CD-ROM and WEB Development Flow Overview Using KickstartOUTPUT-OUTPUT FILE-EXECUTABLE Project SettingsFactory Settings Creating a Project from Scratch Stack Management within the .xcl Files Using an Existing IAR V1.x/V2.x ProjectOverview of Example Programs How to Generate Texas Instrument .TXT and other format FilesDevelopment Flow Using Breakpoints Using C-SPYBreakpoint Types Using Single Step Using Watch Windows Page Design Considerations for In-Circuit Programming External Power Bootstrap LoaderDesign Considerations for In-Circuit Programming PRGS430 Device SignalsDesign Considerations for In-Circuit Programming Signal connections for MSP-FET430X110 Design Considerations for In-Circuit Programming Jtag Signal Connections Frequently Asked Questions Hardware Program Development Assembler, C-Compiler, Linker Should Done or Not Return Omit OPTIONS-FET DEBUGGER-CONNECTIONS Debugging C-SPYFrequently Asked Questions Figure A-1. Modification to FET Interface module Frequently Asked Questions Frequently Asked Questions Frequently Asked Questions Frequently Asked Questions Frequently Asked Questions Hardware Figure B-1. MSP-FET430X110, SchematicFigure B-1. MSP-FET430X110, Schematic Figure B-2. MSP-FET430X110, PCB Pictorials Figure B-3. MSP-FET430IF FET Interface module, Schematic Figure B-4. MSP-FET430IF FET Interface module, PCB Pictorial Figure B-5. MSP-TS430DW28 Target Socket module, Schematic LED connected to P1.0 Hardware Jumper J7 Jumper J6Open to measure current Hardware Jumper J6 Open to disconnect LED History of changes to MSP-TS430PM64 Target Socket module Figure B-11. MSP-TSPN80 Target Socket module, Schematic Figure B-12. MSP-TSPN80 Target Socket module, PCB Pictorials Figure B-13. MSP-TSPZ100 Target Socket module, Schematic Jumper J6 Figure B-15. MSP-FET430UIF USB Interface schematics Hardware Hardware Hardware Hardware Page FET Specific Menus Emulator EMULATOR-POWER on Reset EMULATOR-FORCE Single Stepping EMULATOR-GIE on/offPin MSP430F44x and MSP430F43x Device Emulation Table D-1. F4xx/80-pin Signal Mapping P1.5/TACLK/ACLK P1.4/TBCLK/SMCLK P1.3/TBOUTH/SVSOUT Page TI to IAR 2.x/3.x Assembler Migration Translating Asm430 Assembler Directives to A430 Directives Segment ControlIntroduction Character stringsDescription Asm430 Directive TI A430 Directive IAR Section Control DirectivesListing Control Directives Constant Initialization DirectivesFile Reference Directives Conditional-Assembly DirectivesReptc Symbol Control DirectivesMiscellaneous Directives Macro DirectivesPreprocessor Directives Asm430 directive A430 directive Additional A430 Directives IARLstpag + #if, #else, #elif Page MSP-FET430UIF Installation Guide Figure F-1. WinXP Hardware Recognition Hardware InstallationFigure F-3. WinXP Driver Location Selection Folder Figure F-4. WinXP Driver Installation Figure F-5. Device Manager