This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432P401R: getting ../../driverlib/inc/msp_compatibility.h:145:41: warning: implicit declaration of function 'asm' [-Wimplicit-function-declaration]

Part Number: MSP432P401R
Other Parts Discussed in Thread: MSP432WARE

When building some code that includes the driverlib.h I am getting the following warning

../../driverlib/inc/msp_compatibility.h:145:41: warning: implicit declaration of function 'asm' [-Wimplicit-function-declaration]
#define __wfi() asm(" wfi")
^
../../driverlib/inc/msp_compatibility.h:146:41: note: in expansion of macro '__wfi'
#define __sleep() __wfi()
^
./src/sp_lpm.c:274:8: note: in expansion of macro '__sleep'
__sleep();

This only happens if I use the gcc compile flag -std=c99 . If I remove it, the warning goes away and the code builds fine, otherwise it fails to build.

My file includes the following:

#include <rom.h>
#include <rom_map.h>
#include <driverlib.h>

Is there any other header that should be included for this to work?

Thanks and regards,

Pedro

**Attention** This is a public forum