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.
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 mpu_wrappers.c
'Warning[Pe223]:function “vPortResetPrivilege” decalred implicity in mpu_wrappers.c
The MPU ports have portUSING_MPU_WRAPPERS 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 portUSING_MPU_WRAPPERS or vPortResetPrivilege().
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/ARM_CM3 (or ARM_CM4F
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 (ARM_CM3). 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 portUSING_MPU_WRAPPERS etc… in my files.