FREERTOS App -- MPU support status

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User7902
Level 2
Level 2
Hello Infineon,

i'm curious about the status of MPU support in FREERTOS App.
I just noticed that the actual App supports FreeRTOS V9 - so MPU should be supported.
There's also a checkbox "Enable MPU support".

It doesn't change the linker script automatically, so i changed it manually (according to http://www.freertos.org/FreeRTOS_Support_Forum_Archive/September_2011/freertos_Linker_Problems_STM32....
Linker script now works without problems.

Compiling results in:


...
'Building file: ../Dave/Generated/FREERTOS/tasks.c'
'Invoking: ARM-GCC C Compiler'
"C:/DAVEv4-64Bit/DAVE-4.3.2/eclipse/ARM-GCC-49/bin/arm-none-eabi-gcc" -MMD -MT "Dave/Generated/FREERTOS/tasks.o" -DXMC4400_F100x512 -I"D:/tmp/Dave-4.3/FreeRTOS_Dave_Test/Libraries/XMCLib/inc" -I"D:/tmp/Dave-4.3/FreeRTOS_Dave_Test/Libraries/CMSIS/Include" -I"D:/tmp/Dave-4.3/FreeRTOS_Dave_Test/Libraries/CMSIS/Infineon/XMC4400_series/Include" -I"D:/tmp/Dave-4.3/FreeRTOS_Dave_Test" -I"D:/tmp/Dave-4.3/FreeRTOS_Dave_Test/Dave/Generated" -I"D:/tmp/Dave-4.3/FreeRTOS_Dave_Test/Libraries" -Og -ffunction-sections -fdata-sections -Wall -std=gnu99 -mfloat-abi=softfp -Wa,-adhlns="Dave/Generated/FREERTOS/tasks.o.lst" -pipe -c -fmessage-length=0 -MMD -MP -MF"Dave/Generated/FREERTOS/tasks.d" -MT"Dave/Generated/FREERTOS/tasks.d Dave/Generated/FREERTOS/tasks.o" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -g -gdwarf-2 -o "Dave/Generated/FREERTOS/tasks.o" "../Dave/Generated/FREERTOS/tasks.c"
'Finished building: ../Dave/Generated/FREERTOS/tasks.c'

'Building target: FreeRTOS_Dave_Test.elf'
'Invoking: ARM-GCC C Linker'
"C:/DAVEv4-64Bit/DAVE-4.3.2/eclipse/ARM-GCC-49/bin/arm-none-eabi-gcc" -T"../linker_script.ld" -nostartfiles -Xlinker --gc-sections -specs=nano.specs -specs=nosys.specs -Wl,-Map,"FreeRTOS_Dave_Test.map" -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -mcpu=cortex-m4 -mthumb -g -gdwarf-2 -o "FreeRTOS_Dave_Test.elf" "@objects.rsp" -lm
makefile:58: recipe for target 'FreeRTOS_Dave_Test.elf' failed
./main.o: In function `led_task':
D:\tmp\Dave-4.3\FreeRTOS_Dave_Test\Debug/../main.c:18: undefined reference to `MPU_xTaskGetTickCount'
D:\tmp\Dave-4.3\FreeRTOS_Dave_Test\Debug/../main.c:22: undefined reference to `MPU_vTaskDelayUntil'
./main.o: In function `main':
D:\tmp\Dave-4.3\FreeRTOS_Dave_Test\Debug/../main.c:58: undefined reference to `MPU_xTaskCreate'
collect2.exe: error: ld returned 1 exit status
make: *** [FreeRTOS_Dave_Test.elf] Error 1


Seems like the functions from "FreeRTOSv9.0.0/FreeRTOS/Source/portable/Common/mpu_wrappers.c" are not generated by Dave.

Do i have to copy them manually?
Or maybe is MPU support by FREERTOS App incomplete?

Daniel
0 Likes
2 Replies
lock attach
Attachments are accessible only for community members.
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi Daniel,

It seems you found a bug.
I have fixed it. Find attached project using the MPU example provided by FreeRTOS.
The version of the FreeRTOS APP in the project attached is v4.0.18 which will be part of the official release next week.

BTW: There is a still a "small" issue to be fixed, i.e. not the complete RAM can be used. This is due to MPU regions size being only allowed power of two. In the attached example only DRAM1 and DSRAM2 are used. See linker file.

Regards,
Jesus
0 Likes
User7902
Level 2
Level 2
Great,

thank you!


Daniel
0 Likes