13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tool OptionsAssembler option: --define (-D)Menu entry1. Select Assembler » Preprocessing.The Defined symbols box right-below shows the symbols that are currently defined.2. To define a new symbol, click on the Add button in the Defined symbols box.3. Type the symbol definition (<strong>for</strong> example, demo=1)Use the Edit and Delete button to change a macro definition or to remove a macro from the list.Command line syntax--define=macro_name[=macro_definition]-Dmacro_name[=macro_definition]DescriptionWith this option you can define a macro and specify it to the assembler preprocessor. If you only specifya macro name (no macro definition), the macro expands as '1'.You can specify as many macros as you like. Simply use the Add button to add new macro definitions.On the command line, use the option --define (-D) multiple times. If the command line exceeds the limitof the operating system, you can define the macros in an option file which you then must specify to theassembler with the option --option-file (-f) file.Defining macros with this option (instead of in the assembly source) is, <strong>for</strong> example, useful in combinationwith conditional assembly as shown in the example below.This option has the same effect as defining symbols via the .DEFINE, .SET, and .EQU directives.(similar to #define in the C language). With the .MACRO directive you can define more complexmacros.ExampleConsider the following assembly program with conditional code to assemble a demo program and a realprogram:.IF DEMO == 1... ; instructions <strong>for</strong> demo application.ELSE... ; instructions <strong>for</strong> the real application.ENDIF497

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!