-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
feature request: add board name string to compile defines in platform.txt file #1007
Comments
Just a followup. The string in the esp8266 is not really the board name but rather a string version of the build.board value. |
Hi @bperrybap , |
I'm not understanding
do to my not understanding how the builder tool works and what boards.txt values it "knows" about. What I was wanting was to have a macro like ARDUINO_BOARD_NAME that was a string based on the existing xxx.name field in the boards.txt file, but it sounds like that may not be possible with the existing code. i.e. I had assumed (perhaps incorrectly) it was only a simple change to platform.txt |
In fact you also can use the |
Yes that is what I meant. I wasn't looking for any kind of override or anything special in builder. |
Related to #985 |
Why was this closed? |
Hi @bperrybap. I apologize for the confusion. I seem to have broken the "stale-bot" workflow somehow. This was never intended to be closed. |
Currently there is a define for the board type -DARDUINO_{build.board} that is passed to the compiler.
But the actual name of the board as a string is not available.
There are some use cases in diagnostic tools where having the actual name of the board as a string can be useful as it can be used to display to the user.
The esp8266 core uses this define -DARDUINO_BOARD="{build.board}" in their platform.txt file.
It would be nice if the Arduino.cc provided cores supported a define that allowed the code to obtain a string version of the board name.
Since the name ARDUINO_BOARD is already used by the esp8266 core, perhaps the Arduino.cc cores could adopt the same thing.
The text was updated successfully, but these errors were encountered: