Skip to content

Commit d8fc1e9

Browse files
committed
Force callback non-trivial for IAR
1 parent 9a8c9e2 commit d8fc1e9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

platform/Callback.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
// MBED_CONF_PLATFORM_CALLBACK_NONTRIVIAL - support storing non-trivial function objects
3131
// MBED_CONF_PLATFORM_CALLBACK_COMPARABLE - support memcmp comparing stored objects (requires zero padding)
3232

33+
#ifdef __ICCARM__
34+
/* Force platform.callback-nontrivial for IAR */
35+
#undef MBED_CONF_PLATFORM_CALLBACK_NONTRIVIAL
36+
#define MBED_CONF_PLATFORM_CALLBACK_NONTRIVIAL 1
37+
#endif
38+
39+
3340
namespace mbed {
3441
/** \addtogroup platform-public-api */
3542
/** @{*/

platform/mbed_lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
"value": 8
120120
},
121121
"callback-nontrivial": {
122-
"help": "Enables support for non-trivial callable objects in Callback. Can be disabled to save ROM if no-one is using non-trivial types. Changing this value may cause incompatibility with pre-built binaries.",
122+
"help": "Enables support for non-trivial callable objects in Callback. Can be disabled to save ROM if no-one is using non-trivial types. Changing this value may cause incompatibility with pre-built binaries. Choice not available with IAR, value forced to true.",
123123
"value": false
124124
},
125125
"callback-comparable": {

0 commit comments

Comments
 (0)