Quality RTOS & Embedded Software

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


Where is 'xMPU_SETTINGS' defined?

Posted by rs9562 on April 18, 2017

Port is portable/GCC/ARMCM3MPU. Build error (with portUSINGMPUWRAPPERS == 1) FreeRTOSv9.0.0/FreeRTOS/Source/include/portable.h:199:34: error: unknown type name 'xMPU_SETTINGS'

Output from cscope for name "xMPUSETTINGS": 0 FreeRTOS.h 936 xMPUSETTINGS xDummy2;

1 portable.h 199 void vPortStoreTaskMPUSettings( xMPUSETTINGS *xMPUSettings, const struct xMEMORYREGION * const xRegions, StackTypet *pxBottomOfStack, uint32t ulStackDepth )

2 port.c 614 void vPortStoreTaskMPUSettings( xMPUSETTINGS *xMPUSettings, const struct xMEMORYREGION * const xRegions, StackType_t

3 tasks.c 298 xMPU_SETTINGS xMPUSettings; /*< The MPU settings are defined as part of the port layer. THIS MUST BE THE SECOND

Where is 'xMPU_SETTINGS' defined?

Posted by rtel on April 18, 2017

When I get a 'NNN' undefined message the first thing I do is grep (or equivalent) the source tree. Within a few seconds that shows me where 'NNN' is defined, or not as the case may be. In this case it showed me that xMPU_SETTINGS is defined in the portmacro.h header file for the MPU ports - so my first question back to yourself is - are you certain you are including the correct portmacro.h file. Check the compiler options to make sure that the path to the MPU version of portmacro.h is in the compiler's include path.

Where is 'xMPU_SETTINGS' defined?

Posted by rs9562 on April 19, 2017

I needed to adjust the includes macro in the Makefile. I use cscope which is a glorified grep utility. I admit that I should have checked this before posting.

Well here is the real question about the Memory Protection Unit part of the port for the Cortex-M3. Is it as easy as making the following changes. For me the it appears that none of the tasks start running. Otherwise, when I back out these changes below everything runs perfectly.

FreeRTOSConfig.h: #define portUSINGMPUWRAPPERS 1

Makefile: SRC += mpu_wrappers.c

Where is 'xMPU_SETTINGS' defined?

Posted by rtel on April 19, 2017



This is not something you should define yourself - doing so will break the required include sequence. It is already defined in portmacro.h, assuming you are using an MPU port so you just need to ensure you are including the correct portmacro.h file.

Using the MPU port is definitely not as easy as a non-MPU port. I would recommend starting with one of the pre-configured examples. There is an example that runs in the Keil simulator (using either the ARM or GCC compiler) that is a good place to start. If that is not in the main FreeRTOS zip file download then you will find it in the following directory of the SVN head:


There is also this one which only uses static memory allocation:


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

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists