Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Excluding a part of RAM, how to deny access from FreeRTOS

Posted by christoph-es on June 5, 2018

Hello there, I reserved a small part (32 byte) of the RAM of my device. (0x2000 0000 - 0x2000 001F) So in the linker-file I mapped the RAM starting at 0x2000 0020. I can exclude accessing this addresses in my application code but I am not sure if the "remapping" of the RAM prevents FreeRTOS to overwrite this addresses. Does the FreeRTOS-Kernel has any possibilty to overwrite this part of the RAM? I am using heap4.

Thank you in advance, Christoph


Excluding a part of RAM, how to deny access from FreeRTOS

Posted by richard_damon on June 5, 2018

FreeRTOS itself will only write to memory it has been told to. That would be memory allocated to it via globals, stack variables and allocated from the heap. If you have excluded the memory by the linker, then FreeRTOS itself won't use it. That said, if you program has an error, it could overwrite that memory as FreeRTOS won't 'protect' that memory.


Excluding a part of RAM, how to deny access from FreeRTOS

Posted by christoph-es on June 5, 2018

Hello Richard, thank you for your fast response. Is there away to protect the memory with FreeRTOS without excluding it in the linker-file?


Excluding a part of RAM, how to deny access from FreeRTOS

Posted by richard_damon on June 5, 2018

By definition, you are going to need a linker-file to tell the linker what to do and where it can place things. To reserve the memory, you are going to have to say something in the linker file to let the linker know not to put other things there. There are several ways in the linker file to control how it does things. The bluntest is what you describe, and just not tell the linker that memory is ram, and then it won't use it. You can normally also declare all of RAM space as RAM, but then within that there will be declerations for the various blocks of the various things that use ram, and you could add a decleration for a reserve block at the address you want, and that the 'general' block of ram follows. The details will depend on the linker you are using.


Excluding a part of RAM, how to deny access from FreeRTOS

Posted by christoph-es on June 6, 2018

Thank you very much for your help, I think this will improve the code. Best regards, Christoph


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo & Nuvoton Cortex-M23 demo.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Mediatek

Renesas

RISC-V

SiFIve RISC-V

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner