Skip to content

Question: RAM data area that survives over system restart #823

@lyusupov

Description

@lyusupov

This is a kind of basic question that I can not find an answer on... It probably should be asked on stm32duino forum, but it seems to be down right now.

Does the Arduino/STM32 has an equivalent of RTC_DATA_ATTR attribute ?
This attribute is defined in Arduino/ESP32 and gives an opportunity to have some data in a RAM section that does not get overwritten in a subsequent deep sleep, shutdown and restart operations.

They implement the area by means of ld script section, like this:

#define RTC_DATA_ATTR attribute((section(".rtc.data")))

  /* RTC data section holds RTC wake stub
     data/rodata, including from any source file
     named rtc_wake_stub*.c and the data marked with
     RTC_DATA_ATTR, RTC_RODATA_ATTR attributes.
     The memory location of the data is dependent on 
     CONFIG_ESP32_RTCDATA_IN_FAST_MEM option.
  */
  .rtc.data :
  {
    _rtc_data_start = ABSOLUTE(.);
    *(.rtc.data)
    *(.rtc.rodata)
    *rtc_wake_stub*.*(.data .rodata .data.* .rodata.* .bss .bss.*)
    _rtc_data_end = ABSOLUTE(.);
  } > rtc_data_location

Full content:
https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/ld/esp32.common.ld

Attributes:
https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/include/esp32/esp_attr.h

When I look into ld scripts of Arduino/STM32 I don't see anything similar.

Is the functionality already implemented in Arduino/STM32 but with some different way ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy