Added compatibility for builds under ARMCC
This commit is contained in:
parent
435debffed
commit
ea51f396ca
2 changed files with 31 additions and 0 deletions
|
@ -32,10 +32,24 @@
|
|||
#include "MicroBitFiber.h"
|
||||
#include "MicroBitMessageBus.h"
|
||||
|
||||
/*
|
||||
* The underlying Nordic libraries that support BLE do not compile cleanly with the stringent GCC settings we employ
|
||||
* If we're compiling under GCC, then we suppress any warnings generated from this code (but not the rest of the DAL)
|
||||
* The ARM cc compiler is more tolerant. We don't test __GNUC__ here to detect GCC as ARMCC also typically sets this
|
||||
* as a compatability option, but does not support the options used...
|
||||
*/
|
||||
#if !defined (__arm)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
#include "ble/BLE.h"
|
||||
|
||||
/*
|
||||
* Return to our predefined compiler settings.
|
||||
*/
|
||||
#if !defined (__arm)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#include "ble/services/DeviceInformationService.h"
|
||||
#include "MicroBitDFUService.h"
|
||||
|
|
|
@ -12,11 +12,28 @@
|
|||
* as the first line of nrf_soc.h, but that's a different
|
||||
* module ...
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The underlying Nordic libraries that support BLE do not compile cleanly with the stringent GCC settings we employ
|
||||
* If we're compiling under GCC, then we suppress any warnings generated from this code (but not the rest of the DAL)
|
||||
* The ARM cc compiler is more tolerant. We don't test __GNUC__ here to detect GCC as ARMCC also typically sets this
|
||||
* as a compatability option, but does not support the options used...
|
||||
*/
|
||||
#if !defined(__arm)
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
||||
#include "nrf_soc.h"
|
||||
|
||||
/*
|
||||
* Return to our predefined compiler settings.
|
||||
*/
|
||||
#if !defined(__arm)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
Loading…
Reference in a new issue