views:

164

answers:

1

All example AVR programs I've ever seen start with code such as the following:

.org $0000
    rjmp Reset
    ; ...
Reset:
    ; Start of program

If I'm not making use of any interrupts can I do without the rjmp and start the program at $0000?

+3  A: 

At the program memory locations immediately after $0000 interrupt vectors are located. I guess that if you are not using any interrupt, you could start your program without the rjmp. From ATmega 128 datasheet:

If the program never enables an interrupt source, the interrupt vectors are 
not used, and regular program code can be placed at these locations. This is
also the case if the Reset Vector is in the Application section while the 
interrupt vectors are in the Boot section or vice versa.
kgiannakakis