cpu/atmega2560/startup.c: Add __attribute__((used)) to init functions
This commit is contained in:
parent
5fcb09f6b9
commit
37eece1961
@ -43,19 +43,20 @@ extern void __libc_init_array(void);
|
|||||||
* which should never be reached but just in case jumps to exit.
|
* which should never be reached but just in case jumps to exit.
|
||||||
* This way there should be no way to call main directly.
|
* This way there should be no way to call main directly.
|
||||||
*/
|
*/
|
||||||
void init7_ovr(void) __attribute__((naked)) __attribute__((section(".init7")));
|
void init7_ovr(void) __attribute__((section(".init7")));
|
||||||
void init8_ovr(void) __attribute__((naked)) __attribute__((section(".init8")));
|
void init8_ovr(void) __attribute__((section(".init8")));
|
||||||
|
|
||||||
|
|
||||||
void init7_ovr(void)
|
__attribute__((used,naked)) void init7_ovr(void)
|
||||||
{
|
{
|
||||||
__asm__("call reset_handler");
|
__asm__("call reset_handler");
|
||||||
}
|
}
|
||||||
|
|
||||||
void init8_ovr(void)
|
__attribute__((used,naked)) void init8_ovr(void)
|
||||||
{
|
{
|
||||||
__asm__("jmp exit");
|
__asm__("jmp exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function is the entry point after a system reset
|
* @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)
|
* 1. initialize the board (sync clock, setup std-IO)
|
||||||
* 2. initialize and start RIOTs kernel
|
* 2. initialize and start RIOTs kernel
|
||||||
*/
|
*/
|
||||||
void reset_handler(void)
|
__attribute__((used)) void reset_handler(void)
|
||||||
{
|
{
|
||||||
/* initialize the board and startup the kernel */
|
/* initialize the board and startup the kernel */
|
||||||
board_init();
|
board_init();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user