Texas Instruments MSP-FET430 manual Segment Control, Introduction, Character strings

Page 82

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

E.1 Segment Control

RSEG defines a Relocatable SEGment. A relocatable segment means that the code that follows the RSEG statement will be place *somewhere* in the region defined for that segment (in the .xcl file). In other words, the code can be "relocated", and you don't know (or care) where it's put. In the .xcl files provided with the FET, multiple segments are defined in the same memory regions. ASEG defines an Absolute SEGment. An absolute segment means that the code that follows the ASEG statement will be placed in the order it is encountered in the region defined for the segment (in the .xcl file). In other words, the placement of the code is fixed in memory. One significant difference between the new IAR assembler and the old TI assembler is the meaning of the ORG statement. In the old TI assembler, ORG would set the assembler code pointer to the specified absolute address. However, the IAR assembler uses ORG to set an offset from the current RSEG. Fortunately, if you don't use RSEG explicitly, it will default to 0 (zero) and your program will link as you expect (with your code at ORG). Be careful if you mix RSEG and ORG as ORG then becomes a relative offset. Use ASEG if you want the (absolute) behavior of the old TI ORG statement.

E.2 Translating Asm430 Assembler Directives to A430 Directives

E.2.1 Introduction

The following sections describe, in general, how to convert assembler directives for Texas Instruments’ Asm430 assembler (Asm430) to assembler directives for IAR’s A430 assembler (A430). These sections are only intended to act as a guide for translation. For detailed descriptions of each directive, refer to either the MSP430 Assembly Language Tools User’s Guide, SLAUE12, from Texas Instruments, or the MSP430 Assembler User’s Guide from IAR.

Note: Only the assembler directives require conversion

Only the assembler directives require conversion - not the assembler instructions. Both assemblers use the same instruction mnemonics, operands, operators, and special symbols such as the section program counter ($), and the comment delimiter (;).

The A430 assembler is not case sensitive by default. These sections show the A430 directives written in uppercase to distinguish them from the Asm430 directives, which are shown in lower case.

E.2.2 Character strings

In addition to using different directives, each assembler uses different syntax for character strings. A430 uses C syntax for character strings: A quote is represented using the backslash character as an escape character together with quote (\”) and the backslash itself is represented by two

E-2

Image 82
Contents Users Guide 2004Important Notice Page July Read This First How to Use This ManualAbout This Manual Information About Cautions and Warnings Related Documentation From Texas InstrumentsIf You Need Assistance FCC WarningPage Contents Frequently Asked Questions Figures TablesPage Get Started Now TopicKit Contents, MSP-FET430X110 Software Installation Kit Contents, MSP-FET430UIFHardware Installation, MSP-FET430X110 Hardware Installation, USB-IF, MSP-FET430UIF Flashing the LEDGet Started Now Important MSP430 Documents on the CD-ROM and WEB Development Flow Using Kickstart OverviewProject Settings OUTPUT-OUTPUT FILE-EXECUTABLEFactory Settings Creating a Project from Scratch Using an Existing IAR V1.x/V2.x Project Stack Management within the .xcl FilesHow to Generate Texas Instrument .TXT and other format Files Overview of Example ProgramsDevelopment Flow Using Breakpoints Using C-SPYBreakpoint Types Using Single Step Using Watch Windows Page Design Considerations for In-Circuit Programming Bootstrap Loader External PowerDesign Considerations for In-Circuit Programming Device Signals PRGS430Design 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 Debugging C-SPY OPTIONS-FET DEBUGGER-CONNECTIONSFrequently 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 Figure B-1. MSP-FET430X110, Schematic HardwareFigure 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-GIE on/off EMULATOR-FORCE Single SteppingPin 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 Introduction Segment ControlTranslating Asm430 Assembler Directives to A430 Directives Character stringsSection Control Directives Description Asm430 Directive TI A430 Directive IARConstant Initialization Directives Listing Control DirectivesConditional-Assembly Directives File Reference DirectivesSymbol Control Directives ReptcMiscellaneous Directives Macro DirectivesPreprocessor Directives Additional A430 Directives IAR Asm430 directive A430 directiveLstpag + #if, #else, #elif Page MSP-FET430UIF Installation Guide Hardware Installation Figure F-1. WinXP Hardware RecognitionFigure F-3. WinXP Driver Location Selection Folder Figure F-4. WinXP Driver Installation Figure F-5. Device Manager