#include <avr/io.h>
#include <avr/sfr_defs.h>
Go to the source code of this file.
Defines | |
#define | __zero_reg__ r1 |
Functions | |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out | _SFR_IO_ADDR (SREG) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi | lo8 (__stack) ldi r29 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi | hi8 (__stack) out _SFR_IO_ADDR(SPH) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out | _SFR_IO_ADDR (SPL) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data | hi8 (__data_end) ldi r26 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data | lo8 (__data_start) ldi r27 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data | hi8 (__data_start) ldi r30 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data | lo8 (__data_load_start) ldi r31 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data | hi8 (__data_load_start) ldi r16 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data | hh8 (__data_load_start) out _SFR_IO_ADDR(RAMPZ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start Z st r0 | lo8 (__data_end) cpc r27 |
Variables | |
macro vector name weak name set | name |
macro vector name weak name set __vector_not_set jmp name endm section | vectors |
macro vector name weak name set __vector_not_set jmp name endm section | ax |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors | __vectors |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors | ax |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init | __init |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set | __heap_end |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section | init2 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section | ax |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi | r28 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section | init4 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section | ax |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data | __do_copy_data |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start | L__do_copy_data_loop |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start Z st | X |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start Z st r0 | L__do_copy_data_start |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start Z st r0 r17 brne L__do_copy_data_loop section | init9 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start Z st r0 r17 brne L__do_copy_data_loop section | ax |
Use only one of crt0.S and crt0.c
An assembler file modified by Scott Craig from gcrt1.S
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.S.
#define __zero_reg__ r1 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out _SFR_IO_ADDR | ( | SREG | ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi lo8 | ( | __stack | ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi hi8 | ( | __stack | ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out _SFR_IO_ADDR | ( | SPL | ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data hi8 | ( | __data_end | ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data lo8 | ( | __data_start | ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data hi8 | ( | __data_start | ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data lo8 | ( | __data_load_start | ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data hi8 | ( | __data_load_start | ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data hh8 | ( | __data_load_start | ) |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start Z st r0 lo8 | ( | __data_end | ) |
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.
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set __heap_end |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section init2 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section ax |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r28 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data __do_copy_data |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start L__do_copy_data_loop |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start Z st X |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start Z st r0 L__do_copy_data_start |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start Z st r0 r17 brne L__do_copy_data_loop section init9 |
macro vector name weak name set __vector_not_set jmp name endm section progbits global __vectors func __vectors progbits weak __init RAMEND weak __heap_end set section progbits clr __zero_reg__ out __zero_reg__ ldi r29 out r28 section progbits global __do_copy_data r16 rjmp L__do_copy_data_start Z st r0 r17 brne L__do_copy_data_loop section ax |