I have just started using IAR and have ported an Eclipse project I was working on into it. The project uses FreeRTOS. IAR is raising a lot of warnings on ‘vPortResetPrivilege’ and xTaskCreateRestricted. I really would like to get rid of these warnings. Is this a known issue and is there a fix. I cant see anything obvioulsy wrong with my project preprocessor options. Thanks for any help.
Ops should have added it is mpu_wrappers.c that it seems not to like.
hi, where did you get a MPU port for IAR? I only see the one without MPU support in the trunk.
I get frustrated when people ask for help without helping themselves by giving the information necessary to actually answer the question…so… What are the warnings that are generated? If you posted them in your original support request I might be giving you the answer now.
I apolgise for not being so detailed. The warnings were as per title ‘ implicity declared’ from mpu_wrappers.c. I did think I had sufficient information there. Warning mostly vPortResetPrivilege. About 50 warnings. ‘Warning[Pe223]:function “xTaskCreatRestricted” decalred implicity in mpuwrappers.c ‘Warning[Pe223]:function “vPortResetPrivilege” decalred implicity in mpuwrappers.c I am using IAR IDE 8.10.1 for the STM32F107VC
I used a FreeRTOS demo.
The MPU ports have portUSINGMPUWRAPPERS set to 1 and vPortResetPrivilege() defined in the portmacro.h files. They are already defined in the GCC versions in the FreeRTOS download. You will need to add them into your IAR version. For example in the FreeRTOS/Source/portable/IAR/[your_port]/portmacro.h.
Thanks for taking time to reply. I have compared the GCC version I was using and the IAR version and I dont see anything in either that defines portUSINGMPUWRAPPERS or vPortResetPrivilege().
Basic tools like grep can save you (and me in this case) a lot of time. See lines 115 and 247 (at the time of writing) in the following file: https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/GCC/ARMCM4MPU/portmacro.h
But by adding them, surely I am telling FreeRTOS to use MPU. I was not using MPU in the CM3. This was not defined in my GCC version and is not currently defined in my IAR version of portMacro. I can add them but it seems the wrong thing to do. I will however bow to experience. Maybe Im being a bit dumb, not being that familiar with FreeRTOS fully. If I am not using MPU then do I not require to include the mpu_wrappers.c in my build? I have left it in because I had it in my GCC version and assumed it was a required part of FreeRTOS.
I assumed, given the title of the thread, and the original post, that you were trying to use the MPU. vPortResetPrivilege() and xTaskCreateRestricted() are only defined in the MPU port. Are you just trying to use the normal IAR port for the Cortex-M? If so, then you are simply building the wrong port layer – you need to build the files from FreeRTOS/Source/portable/IAR/ARMCM3 (or ARMCM4F depending). There are lots of example IAR projects in the FreeRTOS download for you to use as a reference.
Yes I am just trying to use the normal IAR port for cortem-M3 (ARMCM3). The files you mention are the files I am using and having the warning issues with. Im not using the MPU or the associated files. I have double checked these files and they are the correct ones, hence why I dont see the portUSINGMPU_WRAPPERS etc.. in my files.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.