LED is not blinking on some target boards.
Recently, following code has been added in this example code.
// Initialise the digital pin LED1 as an output
#ifdef LED1
DigitalOut led(LED1);
#else
bool led;
#endif
The #ifdef detective doesn't recognize typedefed LED1 symbol, so LED doesn't blink for some target boards such as NXP LPC1768, Renesas, Nordic, Maxim and other target board which declare LED symbol as typedef.
AFAIK, C/C++ preprocessor can only handle macros and arithmetic constant expressions.
Target(s) affected by this defect ?
NXP LPC1768, Renesas, Nordic, Maxim, Toshiba target and others
Toolchain(s) (name and version) displaying this defect ?
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
What version of Mbed-os are you using (tag or sha) ?
Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers.
Internal Jira reference: https://jira.arm.com/browse/IOTOSM-4310
Description of defect
LED is not blinking on some target boards. Recently, following code has been added in this example code.
The
#ifdef
detective doesn't recognize typedefed LED1 symbol, so LED doesn't blink for some target boards such as NXP LPC1768, Renesas, Nordic, Maxim and other target board which declare LED symbol as typedef.Typical decleration for typedef is as below.
AFAIK, C/C++ preprocessor can only handle macros and arithmetic constant expressions.
Target(s) affected by this defect ?
NXP LPC1768, Renesas, Nordic, Maxim, Toshiba target and others
Toolchain(s) (name and version) displaying this defect ?
What version of Mbed-os are you using (tag or sha) ?
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
How is this defect reproduced ?
Import the example, compile and run.