Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Bare Metal Option #94

Closed
sstaub opened this issue Oct 23, 2019 · 1 comment
Closed

Bare Metal Option #94

sstaub opened this issue Oct 23, 2019 · 1 comment
Labels
type: enhancement New feature or request

Comments

@sstaub
Copy link

sstaub commented Oct 23, 2019

Describe the solution you'd like
It would nice to have an option to program the Arduino boards without the Arduino framework.
This is possible in PlatformIO, because the #include of Arduino.h is not hidden.

@sstaub sstaub added the type: enhancement New feature or request label Oct 23, 2019
@per1234
Copy link
Contributor

per1234 commented Feb 18, 2021

Hi @sstaub. Even though I think the Arduino sketch preprocessor's default behavior of automatically adding the #include directive for Arduino.h to the .ino file is very important for providing beginners with a gentle learning curve, I also think it's nice to allow advanced users to have control over this. Cristian Maglie came up with what I think is the perfect solution to allow this: arduino/Arduino#4352 (comment)

the preprocessor now skips the automatic insertion of the #include <Arduino.h> if the sketch already includes it.

You can combine this feature with a preprocessor conditional to prevent Arduino.h from being included in the sketch. People doing that might also find the ability to override the core library's main() to be handy:

#if false
#include <Arduino.h>
#endif

int main() {
  return 0;
}

@per1234 per1234 closed this as completed Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants