-
Notifications
You must be signed in to change notification settings - Fork 428
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
Add -DBOARD_NAME="{build.board}" #136
Conversation
Add -DBOARD_NAME="{build.board}" to Compile patterns to facilitate using BOARD_NAME in sketches
@khoih-prog is the If not, I'm wondering if it would be better to use the |
The
If we need to display which board we're using (for example, for library/core writer to know if the user uses or selects the correct board) It's better than we have to use harder way
This way, users has to know how to access
to use while using This is very minor and not important feature, just good to have. |
One more note is that in ArduinoCore-mbedcore, we have the similar
|
Thanks for the clarification. That is a fairly significant precedent, which I was not aware of. This sort of thing is most valuable when done consistently across the ecosystem, so I think you made the right choice. Ideally, there would be a formal official definition of these standards. There is (in my biased opinion) currently pretty good documentation about the platform components which are required or provided automatically by the build system, but essentially no formal documentation about the recommended/expected components (arduino/arduino-cli#985), which means there is not a very good mechanism for documenting the current standards or proposing new ones. Currently the approach is to just analyze what has been done in the official platforms.
I fully understand the motivation behind the proposal and why |
That's something waiting for you, as an long-time insider, to propose and make change. |
Don't we need some escape magic to get this define as a quoted string? I think bash/cmd will just eat the quotes in platform.txt while parsing out args to the compiler. |
I haven't seen any issue yet. This way has been used and tested in several platforms and OSes without any problem. |
Ok, thx! |
Add -DBOARD_NAME="{build.board}" to Compile patterns to facilitate using BOARD_NAME in sketches
For example
to print