#include <avr/io.h>
#include <avr/sfr_defs.h>
#include "os.h"
Go to the source code of this file.
Defines | |
#define | zero_reg "r1" |
#define | vector(name) |
A macro to simplify the vector list. | |
Functions | |
void | __vectors (void) |
The vectors section. | |
void | __vector_not_set (void) |
A default routine that is called when an interrupt occurs for which no ISR was assigned. | |
void | __init (void) |
The beginning of the executable code in this file. | |
void | init2 (void) |
init2 | |
void | __do_copy_data (void) |
init4 | |
void | init9 (void) |
init9 |
Use only one of crt0.S and crt0.c
This file is adapted from grct1.S in the avr source.
For use in Mantis Cheng's CSC 460 Fall 2007
To use this as startup code in AVR Studio, add "-nostartfiles" to [Linker Options] in Project>Configuration options>Custom Options.
The name of the function in the last call is where the program starts. (For project 2 it should be "OS_Init".)
Definition in file crt0.c.
#define vector | ( | name | ) |
Value:
A macro to simplify the vector list.The symbol "__vector_i" is weakly bound to this spot in the object file. Later, other object files can reference this spot using this symbol.
The value of the symbol is set to "__vector_not_set", which is the label of a function below. Other files will change this if an ISR is declared.
The instruction at this spot is "jmp (addr)" (4 bytes). These addresses are hardwired in the mcu.
void __vectors | ( | void | ) |
__vector_not_set | ( | void | ) |
void __init | ( | void | ) |
void init2 | ( | void | ) |
void __do_copy_data | ( | void | ) |
void init9 | ( | void | ) |