I’m using a port that doesn’t have a MPU, the atmega323 port. The constant
portUSING_MPU_WRAPPERS is not defined anywhere (I think so) but I’m getting this warnings:
mpu_wrappers.c: In function 'xPortRaisePrivilege': mpu_wrappers.c:67:26: warning: implicit declaration of function 'portIS_PRIVILEGED'; did you mean 'portPRIVILEGE_BIT'? [-Wimplicit-function-declaration] xRunningPrivileged = portIS_PRIVILEGED(); ^~~~~~~~~~~~~~~~~ portPRIVILEGE_BIT mpu_wrappers.c:72:9: warning: implicit declaration of function 'portRAISE_PRIVILEGE' [-Wimplicit-function-declaration] portRAISE_PRIVILEGE(); ^~~~~~~~~~~~~~~~~~~ mpu_wrappers.c: In function 'vPortResetPrivilege': mpu_wrappers.c:83:9: warning: implicit declaration of function 'portRESET_PRIVILEGE'; did you mean 'portEXIT_CRITICAL'? [-Wimplicit-function-declaration] portRESET_PRIVILEGE(); ^~~~~~~~~~~~~~~~~~~ portEXIT_CRITICAL
In this post it’s said that such constant has 3 states: not defined, 0 and 1.
Even when I un-define it in my FreeRTOSConfig.h file the problem still shows up:
#ifdef portUSING_MPU_WRAPPERS #undef portUSING_MPU_WRAPPERS #endif
If I set the constant to 0 or 1 then I get some errors: ‘xMPU_SETTINGS’ (and others) was not declared in this scope or undefine reference to…, respectively.
Is there something I can do in order to avoid the warnings? Should I delete the mpu_wappers.c file (seems to be a really bad idea)? As my chip is not using those functions, then there is no problem with the warnings that might arise soon, but it would be nice not to have them at all.