Quality RTOS & Embedded Software

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




Loading

mpu_wrappers.h bug?

Posted by Shawn Gardner on January 27, 2012
For v7.1.0, should line 59 be:

#if( portUSING_MPU_WRAPPERS == 1 )

instead of :

#ifdef portUSING_MPU_WRAPPERS

since it will always be defined as either 1 or 0?

Thanks

RE: mpu_wrappers.h bug?

Posted by Richard on January 27, 2012
I have to admit it is a little while since I tested the MPU version, but I have done a global search on this and I think the line of code you refer to is actually correct.

Everywhere else where the macro is tested it is tested against 1 or 0 - so the macro must be defined. It is, however, only defined when using a port of FreeRTOS that supports the MPU, so will not be defined at all for other ports. The line you have highlighted checks if it is defined, and if it is, does what it needs to do (if it is defined it can only be defined as 1). If it is not defined it defines it as 0 in the #else part line 129.

Regards.


[ 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