diff --git a/cpu/esp8266/periph/rtt.c b/cpu/esp8266/periph/rtt.c index 482a9c4687..932fe1ee34 100644 --- a/cpu/esp8266/periph/rtt.c +++ b/cpu/esp8266/periph/rtt.c @@ -26,6 +26,7 @@ #include "log.h" #include "periph/rtt.h" +#include "esp_common.h" #include "esp/common_macros.h" #include "esp/dport_regs.h" #include "esp/rtc_regs.h" @@ -33,8 +34,6 @@ #define FRC2_CLK_DIV_256 2 /* divider for the 80 MHz AHB clock */ -#define RTC_BSS_ATTR __attribute__((section(".rtc.bss"))) - /** * FRC2 is a 32-bit countup timer, triggers interrupt when reaches alarm value. */ diff --git a/cpu/esp_common/include/esp_common.h b/cpu/esp_common/include/esp_common.h index 1a855ea729..4190bf2429 100644 --- a/cpu/esp_common/include/esp_common.h +++ b/cpu/esp_common/include/esp_common.h @@ -48,6 +48,14 @@ extern "C" { #endif #endif /* ICACHE_FLASH */ +#ifndef RTC_BSS_ATTR +#define RTC_BSS_ATTR __attribute__((section(".rtc.bss"))) +#endif + +#ifndef RTC_DATA_ATTR +#define RTC_DATA_ATTR __attribute__((section(".rtc.data"))) +#endif + /** Print out a message that function is not yet implementd */ #define NOT_YET_IMPLEMENTED() LOG_INFO("%s not yet implemented\n", __func__) /** Print out a message that function is not supported */