Browse Source

cpu/atmega2560/startup.c: Add __attribute__((used)) to init functions

pr/spi.typo
Joakim Nohlgård 8 years ago committed by Kaspar Schleiser
parent
commit
37eece1961
  1. 11
      cpu/atmega2560/startup.c

11
cpu/atmega2560/startup.c

@ -43,19 +43,20 @@ extern void __libc_init_array(void);
* which should never be reached but just in case jumps to exit.
* This way there should be no way to call main directly.
*/
void init7_ovr(void) __attribute__((naked)) __attribute__((section(".init7")));
void init8_ovr(void) __attribute__((naked)) __attribute__((section(".init8")));
void init7_ovr(void) __attribute__((section(".init7")));
void init8_ovr(void) __attribute__((section(".init8")));
void init7_ovr(void)
__attribute__((used,naked)) void init7_ovr(void)
{
__asm__("call reset_handler");
}
void init8_ovr(void)
__attribute__((used,naked)) void init8_ovr(void)
{
__asm__("jmp exit");
}
/**
* @brief This function is the entry point after a system reset
*
@ -63,7 +64,7 @@ void init8_ovr(void)
* 1. initialize the board (sync clock, setup std-IO)
* 2. initialize and start RIOTs kernel
*/
void reset_handler(void)
__attribute__((used)) void reset_handler(void)
{
/* initialize the board and startup the kernel */
board_init();

Loading…
Cancel
Save