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.

Run-time EnvironmentMain application execution mode (all architectures except M-profile)With the symbol __PROCESSOR_MODE you can define the execution mode in which the processor shouldrun when your application's main program is called. Based on this setting, together with the interruptstatus (FIQ interrupts enabled/disabled, IRQ interrupts enabled/disabled), the linker will generate a symbol(_APPLICATION_MODE_) which value is used in the startup code in the run-time library to set the valueof the CPSR status register be<strong>for</strong>e calling your main function. Available values:Value0x100x110x120x130x170x1B0x1FDescriptionUSR modeFIQ modeIRQ modeSVC modeABT modeUND modeSYS mode (default)Interrupt Status (all architectures except M-profile)It is common use to start with interrupts disabled (__IRQ_BIT=0x80 and __FIQ_BIT=0x40) and enableinterrupt during run-time after installing all exception handlers and initializing all peripherals. To enableinterrupts during run-time, use the __setcpsr() intrinsic:__setcpsr (0x00, 0x80); /* Enable IRQ interrupts */__setcpsr (0x00, 0x40); /* Enable FIQ interrupts */If you want to start with interrupts enabled, set the define the symbols __IRQ_BIT=0 and/or __FIQ_BIT=0.Vector tableBy default the linker can generate a vector table, unless you define the symbol __NO_AUTO_VECTORSor __NO_DEFAULT_AUTO_VECTORS.The linker will look <strong>for</strong> specific symbols designating the start of a handler function. These symbols aregenerated by the compiler when one of the following function qualifiers is used:Function type qualifier__interrupt_und__interrupt_svc__interrupt_iabt__interrupt_dabt__interrupt_irq__interrupt_fiq__interrupt(n)Vector symbol_vector_1_vector_2 (*)_vector_3_vector_4_vector_6_vector_7_vector_n227

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

Saved successfully!

Ooh no, something went wrong!