mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
2c09d9bd5b
Many MCUs contain some Backup or Low Power SRAM that is retained'even in the deepest sleep modes. In such sleep modes the MCU is essentually turned off with only the RTC still running. It can be woken by a GPIO or a RTC alarm. When this happens, a reset is triggered and the normal startup routine is invoked. This adds bss & data section for this memory in the linker script. This allows for structures to be placed in it e.g.: e.g.: static uint8_t persistent_buffer[64] __attribute__((section(".backup.bss"))); static uint32_t persistent_counter __attribute__((section(".backup.data"))) = 1234;
32 lines
760 B
Plaintext
32 lines
760 B
Plaintext
/*
|
|
* Copyright (C) 2017 Inria
|
|
* 2018 Freie Universität Berlin
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
* directory for more details.
|
|
*/
|
|
|
|
/**
|
|
* @addtogroup cpu_cortexm_common
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief Memory definitions for the Cortex-M family
|
|
*
|
|
* @author Francisco Acosta <francisco.acosta@inria.fr>
|
|
* Gaëtan Harter <gaetan.harter@inria.fr>
|
|
*
|
|
* @}
|
|
*/
|
|
|
|
INCLUDE cortexm_rom_offset.ld
|
|
|
|
MEMORY
|
|
{
|
|
rom (rx) : ORIGIN = _rom_start_addr + _rom_offset, LENGTH = _fw_rom_length
|
|
ram (w!rx) : ORIGIN = _ram_start_addr, LENGTH = _ram_length
|
|
}
|
|
|
|
INCLUDE cortexm_base.ld
|