-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Generate global macros according to contents of specially named header file in sketch #5084
Comments
See arduino/arduino-builder#15 and #3757. I agree that something like this would be very useful but it has been requested multiple times in various forms(see also arduino/arduino-builder#29, #3717) and it seems this is not considered a desirable feature by the Arduino team(see arduino/arduino-builder#15 (comment)). I do understand the idea of forcing library authors to create a more user friendly API but sometimes you just need the preprocessor and I don't consider forcing the user to edit the library every time they want to change the configuration to be very user friendly. I found it interested that .org did merge arduino/arduino-builder#29. |
@per1234 This is a bit disappointing to me somehow. Any good IDE should allow the users some way to manage this really. I have a hobby project to rewrite the IDE from ground up (but optimize away a few problems like |
All of us know that in a library module we can insert i.e. the following include: I recently downloaded a library very well done with a huge amount of features. amelia |
Closing this as the discussion about the metadata (or configuration) file is going to take place in arduino-cli repo and in the mailing list |
I am here suggesting a possible way of allowing configuring the libraries in a reliable way.
Currently when a library requires configuration, it takes those information either as arguments in the initializer, or build it into the code as
#define
s. The first type is already customizable, but what about the latter, as used in, say, some variant of Ethernet library that can driveW5100
,W5200
andW5500
?I am suggesting the use of an optional
config.h
file. Only#define
s are allowed in this file, and those lines are turned into-D
flags that is present when compiling the entire sketch. This will allow some libraries to be configured at compile time.The text was updated successfully, but these errors were encountered: