arduino / arduino/ArduinoCore-mbed
[TC-440] Blink_Nicla.ino compiles for Nicla Sense, but not Nicla Vision
- Dominant language
- C
- Stars
- 411
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
**Background info**
According to https://github.com/arduino/arduino-examples/issues/47 there is a special Blink.ino for the Nicle Sense ME, which according to https://docs.arduino.cc/software/ide-v1/tutorials/getting-started/cores/arduino-mbed_nicla also applies to the Nicla Vision. This is called `Blink_Nicla.ino`.
It can be found in this repo here: https://github.com/arduino/ArduinoCore-mbed/blob/master/libraries/Nicla_System/examples/Blink_Nicla/Blink_Nicla.ino
**Expected behaviour**
I can compile the `Blink_Nicla.ino` sketch to both the Nicla Sense ME as well as the Nicla Vision
**Current Behaviour**
When the Nicla Sense ME is selected, IDE 2 compiles without error.

However, when compiling for the Nicla Vision, it fails to compile.

Error message is as below
```
In file included from C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\3.5.1\libraries\Nicla_System\src/Nicla_System.h:6:0,
from C:\Users\user\AppData\Local\Temp\.arduinoIDE-unsaved2023030-12348-k6zwi4.8tz8\Blink_Nicla\Blink_Nicla.ino:1:
C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\3.5.1\libraries\Nicla_System\src/RGBled.h:91:14: error: expected identifier before numeric constant
#define Mode 1
^
C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\3.5.1\cores\arduino/mbed/drivers/include/drivers/interfaces/InterfaceCAN.h:150:10: note: in expansion of macro 'Mode'
enum Mode {
^
C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\3.5.1\libraries\Nicla_System\src/RGBled.h:91:14: error: expected unqualified-id before numeric constant
#define Mode 1
^
C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\3.5.1\cores\arduino/mbed/drivers/include/drivers/interfaces/InterfaceCAN.h:150:10: note: in expansion of macro 'Mode'
enum Mode {
^
C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\3.5.1\libraries\Nicla_System\src/RGBled.h:91:14: error: expected identifier before numeric constant
#define Mode 1
^
C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\3.5.1\cores\arduino/mbed/drivers/include/drivers/CAN.h:171:14: note: in expansion of macro 'Mode'
int mode(Mode mode);
^
C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\3.5.1\libraries\Nicla_System\src/RGBled.h:91:14: error: expected ',' or '...' before numeric constant
#define Mode 1
^
C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\3.5.1\cores\arduino/mbed/drivers/include/drivers/CAN.h:171:14: note: in expansion of macro 'Mode'
int mode(Mode mode);
^
exit status 1
Compilation error: exit status 1
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with libraries/Nicla_System/src/RGBled.h and the Blink_Nicla/Blink_Nicla.ino example, then inspect the reported mbed CAN headers for the Mode name collision. Verify the result by compiling the sketch for both Nicla Sense ME and Nicla Vision, with both builds completing successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100