Merge pull request #10390 from PeterKietzmann/pr_mega2560_puf_seed
cpu/atmega_common: add mega2560 puf_sram feature
This commit is contained in:
commit
1be4d15a4e
@ -1,3 +1,4 @@
|
|||||||
|
FEATURES_PROVIDED += puf_sram
|
||||||
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features
|
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features
|
||||||
|
|
||||||
include $(RIOTCPU)/atmega2560/Makefile.features
|
include $(RIOTCPU)/atmega2560/Makefile.features
|
||||||
|
|||||||
@ -51,6 +51,11 @@ extern "C" {
|
|||||||
#define THREAD_STACKSIZE_IDLE (128)
|
#define THREAD_STACKSIZE_IDLE (128)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Attribute for memory sections required by SRAM PUF
|
||||||
|
*/
|
||||||
|
#define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".noinit")))
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -25,6 +25,9 @@
|
|||||||
|
|
||||||
/* For Catchall-Loop */
|
/* For Catchall-Loop */
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
#ifdef MODULE_PUF_SRAM
|
||||||
|
#include "puf_sram.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief functions for initializing the board, std-lib and kernel
|
* @brief functions for initializing the board, std-lib and kernel
|
||||||
@ -65,6 +68,9 @@ __attribute__((used, naked)) void init8_ovr(void)
|
|||||||
*/
|
*/
|
||||||
__attribute__((used)) void reset_handler(void)
|
__attribute__((used)) void reset_handler(void)
|
||||||
{
|
{
|
||||||
|
#ifdef MODULE_PUF_SRAM
|
||||||
|
puf_sram_init((uint8_t *)RAMEND-SEED_RAM_LEN, SEED_RAM_LEN);
|
||||||
|
#endif
|
||||||
/* initialize the board and startup the kernel */
|
/* initialize the board and startup the kernel */
|
||||||
board_init();
|
board_init();
|
||||||
/* startup the kernel */
|
/* startup the kernel */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user