Should AVR programs always begin with relative jump instructions?

All the examples of AVR programs I've ever seen start with code, for example:

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

If I do not use any interrupts, can I do without rjmp and run the program at $0000 ?

+4
source share
1 answer

In program memory cells immediately after the interrupt vectors $ 0000. I assume that if you do not use interrupts, you can run your program without rjmp. From the ATmega 128 table:

 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. 
+7
source

Source: https://habr.com/ru/post/1285816/


All Articles