Contiki 2.5
bootloader.h
1 #ifndef __AVR_BOOTLOADER_H__
2 #define __AVR_BOOTLOADER_H__
3 
4 #include <inttypes.h>
5 #include <avr/io.h>
6 #include <stdbool.h>
7 
8 #define ATTR_INIT_SECTION(SectionIndex) __attribute__ ((naked, section (".init" #SectionIndex )))
9 #define ATTR_NO_INIT __attribute__ ((section (".noinit")))
10 
11 #ifndef BOOTLOADER_SEC_SIZE_BYTES
12 #define BOOTLOADER_SEC_SIZE_BYTES (0x1000)
13 #endif
14 
15 #ifndef BOOTLOADER_START_ADDRESS
16 #define BOOTLOADER_START_ADDRESS (FLASHEND-BOOTLOADER_SEC_SIZE_BYTES+1)
17 #endif
18 
19 #define MAGIC_BOOT_KEY 0xDC42ACCA
20 
21 extern void Jump_To_Bootloader(void);
22 extern bool bootloader_is_present(void);
23 
24 #endif