Skip to content
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

Blink.ino does not compile for Nicla Sense ME, unless #include "Nicla_System" #63

Closed
3 tasks done
aliphys opened this issue Apr 27, 2023 · 2 comments
Closed
3 tasks done
Assignees
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@aliphys
Copy link

aliphys commented Apr 27, 2023

Describe the problem

The Blink sketch does not run without modification on the Nicla Sense ME. It is required to add the #include "Nicla_System.h" directive, in order for the sketch to compile and successfully upload.

To reproduce

  1. Open Blink.ino from File -> Examples -> 01.Basics -> Blink.
  2. Connect the Nicla Sense ME board and select from the drop down menu
  3. Compile. A message informing the user to include the Nicla_System.h library is given in the bottom right corner
    image
/tmp/.arduinoIDE-unsaved2023327-15341-54bj3y.wzmz7/Blink/Blink.ino: In function 'void setup()':
/tmp/.arduinoIDE-unsaved2023327-15341-54bj3y.wzmz7/Blink/Blink.ino:29:10: error: call to 'pinMode' declared with attribute error: Please include Nicla_System.h to use this pin
   pinMode(LED_BUILTIN, OUTPUT);
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/tmp/.arduinoIDE-unsaved2023327-15341-54bj3y.wzmz7/Blink/Blink.ino: In function 'void loop()':
/tmp/.arduinoIDE-unsaved2023327-15341-54bj3y.wzmz7/Blink/Blink.ino:34:15: error: call to 'digitalWrite' declared with attribute error: Please include Nicla_System.h to use this pin
   digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/tmp/.arduinoIDE-unsaved2023327-15341-54bj3y.wzmz7/Blink/Blink.ino:36:15: error: call to 'digitalWrite' declared with attribute error: Please include Nicla_System.h to use this pin
   digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~

exit status 1

Compilation error: call to 'pinMode' declared with attribute error: Please include Nicla_System.h to use this pin
  1. Add #include "Nicla_System.h" just above the setup() function.
  2. Compile again, which will be successful.
Sketch uses 55788 bytes (10%) of program storage space. Maximum is 527616 bytes.
Global variables use 12256 bytes (19%) of dynamic memory, leaving 52032 bytes for local variables. Maximum is 64288 bytes.
  1. After uploading, all three RGB LEDs will start blinking together (white light)

Expected behavior

It is NOT required to add `#include "Nicla_System.h" to the sketch. Based on the selected FQBN, the compiler should add the directive if required.

The examples version

dfedf56

Additional context

The Blink sketch is the de-facto Hello World example, and often the first sketch users upload to their board.
Replicated on IDE 1 and Web Editor also.
image

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@aliphys aliphys added the type: imperfection Perceived defect in any part of project label Apr 27, 2023
@aliphys
Copy link
Author

aliphys commented Apr 27, 2023

While there is a dedicated Blink_Nicla.ino sketch, the Blink.ino sketch should work with all boards.

@facchinm
Copy link
Member

The error directive was added to target EXACTLY that case; I think it's more than enough to drive the user to add the include (which is enough to make everything work automatically)

@per1234 per1234 changed the title [AE-60] Blink.ino does not compile for Nicla Sense ME, unless #include "Nicla_System" Blink.ino does not compile for Nicla Sense ME, unless #include "Nicla_System" Oct 23, 2023
@per1234 per1234 self-assigned this May 22, 2024
@per1234 per1234 added conclusion: declined Will not be worked on topic: code Related to content of the project itself labels May 22, 2024
@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants