Skip to content

[TC-440] Blink_Nicla.ino compiles for Nicla Sense, but not Nicla Vision #615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aliphys opened this issue Jan 30, 2023 · 4 comments
Open
Labels
bug Something isn't working

Comments

@aliphys
Copy link
Contributor

aliphys commented Jan 30, 2023

Background info

According to arduino/arduino-examples#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.
image
However, when compiling for the Nicla Vision, it fails to compile.
image

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
@facchinm
Copy link
Member

Nicla Vision doesn't have the LED on external I2C controller, so it can use the normal blink. Best thing we can do is adding an #error directive when compiling Nicla_System library for Nicla Vision, so the error is more precise.

@aliphys
Copy link
Contributor Author

aliphys commented Feb 2, 2023

@facchinm So something like this?

#ifdef ARDUINO_NICLA_VISION
  #error "Run the standard Blink.ino sketch for the Nicla Vision"

@facchinm
Copy link
Member

facchinm commented Feb 2, 2023

yup

@deemano
Copy link

deemano commented Feb 10, 2023

Nicla Vision doesn't have the LED on external I2C controller, so it can use the normal blink. Best thing we can do is adding an #error directive when compiling Nicla_System library for Nicla Vision, so the error is more precise.

What do you mean by it can you the normal Blink?
Q: It's there any reason why compiling is very slow for Vision? [using the latest Arduino IDE]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants