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


ARM_CM3_MPU does not seem to build in FreeRTOS 9.0.0

Posted by hengblom on July 26, 2016


First I'm new to this forum, don't know if this question belongs here. I've been working with FreeRTOS for a couple of years now, and I think it is great.

However, I'm having problems building ARM CortexM3, the MPU vairant, for FreeRTOS 9.0.0, with GCC

First there seem to be a "BIT" (With an underscore before but that is for some reason interpreted as a "start of italic" here...) missing in the end of line 176 in portable/GCC/ARMCM3_MPU/portmacro.h

But after having fixed that, there are still some problems. I also run completely static memory allocation, new to 9.0.0, and as long as I don't use MPU, that works fine. However the MPU variant don't seem to be completely compliant to an entirely static memory allocation. It complains about this:

Linking buildrls11/SW0033-11v03pre.elf buildrls11/FreeRTOS/tasks.o: In function xTaskCreateRestricted': /opt/repos/git/src/SW/SW0033-GenIV_TX/09_11-TigerGenIV_MidiJoystick_CPU1/src/FreeRTOS/tasks.c:643: undefined reference topvPortMalloc'

And looking in the code, it seems FreeRTOS cannot run completely static in the MPU-case:

xTaskCreateRestricted() calls pvPortMalloc() and there don't seem to be a xTaskCreateRestrictedStatic(). Neither can I find any config-option in FreeRTOSConfig.h that disables this function if i run MPU. (I don't think I need xTaskCreateRestricted() , I'll use xTaskCreateStatic() instead, so it's not a big problem for me, I can just put "#if 0" around it)

Has anyone else run in to the same problem, or is it me that has missed to configure something ?

Should I write a new bug-ticket about this ?

br Håkan

ARM_CM3_MPU does not seem to build in FreeRTOS 9.0.0

Posted by rtel on July 27, 2016

Thank you for pointing out the missing "_BIT" on the end of the constant name. This has been corrected in the code, and added to the known issues list (which will be published when I am back in the office) so there is no need to create a ticket.

On your other point. Currently (but not for long) the MPU port is not compatible with a completely statically allocated system. I think this is documented somewhere, but it might be somewhere too obscure, like in the change history or SVN comments. I thought there was a

in the code to warn people of this if they attempted to use both, but evidently not.

ARM_CM3_MPU does not seem to build in FreeRTOS 9.0.0

Posted by hengblom on July 27, 2016

Thanks for the info. As I said, I can live without xTaskCreateRestricted() as of now. How far into the future do you think it is to have support for MPU without dynamic memory allocation ?

I can of course comment out xTaskCreateRestricted() but it feels a bit risky and too "unsupported".


ARM_CM3_MPU does not seem to build in FreeRTOS 9.0.0

Posted by rtel on July 27, 2016

If it is useful for people we can prioritise the work.

ARM_CM3_MPU does not seem to build in FreeRTOS 9.0.0

Posted by hengblom on July 27, 2016

For me it is not urgent, technically. As I said, I think I can live with just commenting out xTaskCreateRestricted(). I'll try that, and see if things work as expected.

The only thing that would make it more "urgent" for me is that it would be nice to have a released version of FreeRTOS that supports it, so that I don't have to apply any patch for it. But I don't consider that very important to me.

[ 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