Quality RTOS & Embedded Software

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


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


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

Latest News

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

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

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

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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