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.

<strong>TASKING</strong> <strong>VX</strong>-<strong>toolset</strong> <strong>for</strong> <strong>ARM</strong> <strong>User</strong> <strong>Guide</strong>Linker option: --define (-D)Menu entry1. Select Linker » Script File.The Defined symbols box 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 linker LSL file preprocessor. If you onlyspecify a macro name (no macro definition), the macro expands as '1'.You can specify as many macros as you like; just use the option --define (-D) multiple times. If thecommand line exceeds the limit of the operating system, you can define the macros in an option file whichyou then must specify to the linker with the option --option-file (-f) file.The definition can be tested by the preprocessor with #if, #ifdef and #ifndef, <strong>for</strong> conditional locating.ExampleTo define the stack size and start address which are used in the linker script file arm.lsl, enter:lkarm test.obj -otest.abs --lsl-file=arm.lsl --define=__STACK=32k--define=__START=0x00000000Related in<strong>for</strong>mationLinker option --option-file (Specify an option file)538

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

Saved successfully!

Ooh no, something went wrong!