Quality RTOS & Embedded Software

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




Loading

Cortex M3 Order of MPU regions

Posted by bainorama on December 3, 2013

I'm using the Cortex M3 MPU port and I'd like to configure my application to protect only the OS data, while allowing the non-privileged tasks access to everything else; however there doesn't seem to be a simple way to achieve this. The OS appears to be reserving MPU regions 0-3 for itself, and allowing regions 4-7 to be set per task. Since higher index MPU regions override lower ones, wouldn't it be better to do this the other way around (OS uses 4-7 and tasks use 0-3)? Is there another way to achieve the configuration I'm after?


Cortex M3 Order of MPU regions

Posted by davedoors on December 4, 2013

Declare a static const MPU regions structure that covers all memory not used by the kernel, then assign that to each task as they are created.


Cortex M3 Order of MPU regions

Posted by dumarjo on December 4, 2013

Hi,

I just finish coding a simple application with the Cortex-M4 and What I did is changed the way the initial port was done.

probably a way of doing what you want, is to disable background, set region 0 (all the 4 gig) to USER_RW and then set region 7 to privileged RW for the OS section. If you want to protect also the flash section you will need to add the Region 6 to the flash section too.

This should work. With this setup, you should have 4 or 3 free region for your tasks.

Jonathan

Jonathan Le 2013-12-03 17:13, bainorama a écrit : > > I'm using the Cortex M3 MPU port and I'd like to configure my > application to protect only the OS data, while allowing the > non-privileged tasks access to everything else; however there doesn't > seem to be a simple way to achieve this. The OS appears to be > reserving MPU regions 0-3 for itself, and allowing regions 4-7 to be > set per task. Since higher index MPU regions override lower ones, > wouldn't it be better to do this the other way around (OS uses 4-7 and > tasks use 0-3)? Is there another way to achieve the configuration I'm > after? > > ------------------------------------------------------------------------ > > Cortex M3 Order of MPU regions > https://sourceforge.net/p/freertos/discussion/382005/thread/32662fa9/?limit=50#6529 > > ------------------------------------------------------------------------ > > Sent from sourceforge.net because you indicated interest in > https://sourceforge.net/p/freertos/discussion/382005/ > > To unsubscribe from further messages, please visit > https://sourceforge.net/auth/subscriptions/ > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner http://www.mailscanner.info/, and is > believed to be clean.


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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