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


Setting compiler path to ARM_CM4_MPU showing error

Posted by xuccccc on August 9, 2017


I am currently using the stm32f446 for development. I found that there is the MPU support for it, I am tring to use the MPU function, but failed. The problme is after I chagned the complier path from GCC/AMRCM4F to GCC/ARMCM4MPU and compiled the code, it gave me the error: FreeRTOS/Source/portable/GCC/ARMCM4MPU/portmacro.h:176:96: error: '**portNVICPENDSVSET**' undeclared (first use in this function) #define portENDSWITCHINGISR( xSwitchRequired ) if( xSwitchRequired ) portNVICINTCTRLREG = portNVICPENDSVSET

However, the portNVICPENDSVSET is declared in the FreeRTOS/Source/portable/Tasking/ARMCM4F. As my understading this Tasking folder should be anohter complier, then it makes me comfusing.

It might be I am in the wrong way to use the FREEROTS MPU. I would ask is there anyboday who could provide me some ideasw how to use the MPU for M4?

Thanks a lot, Xu

Setting compiler path to ARM_CM4_MPU showing error

Posted by rtel on August 9, 2017

It is not clear what you are doing. The MPU port is a completely different port. To use it you need to remove all the non MPU port layer code and add in the MPU port layer code, then also update the include paths to ensure the portmacro.h is picked up from the MPU port layer.

Is that what you did?

I would recommend pulling the latest code from the public SVN repository on SourceForge as it contains some improvements to the MPU port.

Setting compiler path to ARM_CM4_MPU showing error

Posted by xuccccc on August 10, 2017

Thanks for your reply. I updated the FreeRTOS, remove all non MPU port layer code and update the include path to the MPU code. It's still not working. Now it shows the error: arm-none-eabi-ld: section privilegedfunctions LMA [000000000000a7a0,000000000000d39b] overlaps section .data LMA [000000000000a79b,000000000000ac3e] arm-none-eabi-ld: section privilegeddata LMA [000000000000ac40,000000000000ad7f] overlaps section privilegedfunctions LMA [000000000000a7a0,000000000000d39b] bin-vt8x8/cpu.o: In function reboot': /home/xu/dev/volaWare/stm32-common/cpu.c:168: undefined reference toMPUvTaskDelay' bin-vt8x8/port.o: In function vPortStoreTaskMPUSettings': /home/xu/dev/volaWare/module/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c:769: undefined reference toSRAMsegmentstart' /home/xu/dev/volaWare/module/FreeRTOS/Source/portable/GCC/ARMCM4MPU/port.c:769: undefined reference to __SRAM_segment_end__' /home/xu/dev/volaWare/module/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c:769: undefined reference toprivilegeddatastart' /home/xu/dev/volaWare/module/FreeRTOS/Source/portable/GCC/ARMCM4MPU/port.c:769: undefined reference to __privileged_data_end__' bin-vt8x8/port.o: In functionxPortStartScheduler': /home/xu/dev/volaWare/module/FreeRTOS/Source/portable/GCC/ARMCM4MPU/port.c:462: undefined reference to __FLASH_segment_start__' /home/xu/dev/volaWare/module/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c:462: undefined reference toFLASHsegmentend' /home/xu/dev/volaWare/module/FreeRTOS/Source/portable/GCC/ARMCM4MPU/port.c:462: undefined reference to __privileged_functions_end__' /home/xu/dev/volaWare/module/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c:462: undefined reference toprivilegeddatastart' /home/xu/dev/volaWare/module/FreeRTOS/Source/portable/GCC/ARMCM4MPU/port.c:462: undefined reference to __privileged_data_end__' bin-vt8x8/crc32.o: In functioncrc32lock': /home/xu/dev/volaWare/module/crc32/stm32/crc32.c:63: undefined reference to MPU_xQueueSemaphoreTake' bin-vt8x8/crc32.o: In functioncrc32unlock': /home/xu/dev/volaWare/module/crc32/stm32/crc32.c:76: undefined reference to MPU_xQueueGenericSend' bin-vt8x8/crc32.o: In functioncrc32init': /home/xu/dev/volaWare/module/crc32/stm32/crc32.c:203: undefined reference to MPU_xQueueCreateMutex' bin-vt8x8/init.o: In functionmainloop': /home/xu/dev/volaWare/arm-common/init.c:373: undefined reference to MPU_xTaskGetTickCount' /home/xu/dev/volaWare/arm-common/init.c:381: undefined reference toMPUvTaskDelete' bin-vt8x8/init.o: In function _init': /home/xu/dev/volaWare/arm-common/init.c:398: undefined reference toMPUxTaskCreate'

It seems some linker issue. Then is there any linker example for using the MPU code?

To make the things more clear. I would talk about what I really want to do. What I want to do is to replace the xTaskCreate() with xTaskCreateRestricted(), test and evaluate if this function can solve some problem, since I think in my code there is some memory corruption issue. The complier path for FreeRTOS I used before is ARMCM4F, which I think is not support xTaskCreateRestricted(), so I want to change it to ARMCM4_MPU. But I didn't make it work.

[ 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