mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:52:44 +01:00
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.
|
||||
* 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…
Reference in New Issue
Block a user