11.07.2015 Views

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

•fiq_handler - This is the default FIQ exception handler. This has been declared as aweak symbol to allow the user to override the implementation.Startup codeThe following section describes the role of the C runtime startup code, crt0.s.When you create a new project to produce an executable file using a target specificproject template, the crt0.s file will be added to the project. Initially a shared version ofthis file will be added to the project, if you want to modify this file you should selectthe file in the project explorer and then select Import to copy the file to your projectdirectory.The entry point of the C runtime startup code is _start. In a typical system this will becalled by the Target startup code (page 154) code after it has initialized the target.The C runtime carries out the following actions:•Initialize the stacks.•Copy the contents of the .data (initialized data) section from non-volatile memoryshould it be required.•Copy the contents of the .fast section from non-volatile memory to SRAM shouldit be required.•Initialize the .bss section.•Initialize the heap.•Call constructors.•Jump to the main entry point.•Call destructors.•Wait in exit loop.StacksThe <strong>ARM</strong> maintains six separate stacks. The position and size of these stacks arespecified in the project's section placement or memory map file by the followingprogram sections:•.stack — System and <strong>User</strong> mode stack.•.stack_svc — Supervisor mode stack•.stack_irq — IRQ mode stackChapter 14Startup code155

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

Saved successfully!

Ooh no, something went wrong!