-
-
Notifications
You must be signed in to change notification settings - Fork 114
Use the directory of the arduino-builder binary as the default tool/library/hardware path #94
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
Comments
Paths relative to the arduino-builder directory might be useful, but in practice these paths can exist in various places: arduino install directory, sketchbook, ~/.arduino15 directory. Adding all of these by default means duplicating some logic in arduino-builder, which might not be ideal, and adding just the arduino install directory might be confusing to users. Still, adding some defaults paths might be a good idea, dunno. |
Well, what happens if you download Arduino? You get a directory with the After all, the users of |
@lukasbestle Note that you can also still call the Arduino IDE on the commandline (e.g |
I know, but that can't be the solution given that It's no problem for me, because I have already configured my building environment after puzzling together the required options, but I think it could be easier for others (and a bit for me, since this change would shorten my Makefile quite a bit). |
As I mentioned in #76, I also have to do the same sort of hacky, hardcoded things as @lukasbestle in order to get arduino-builder to build sketches on my headless ARM computer, as it is unable to correctly detect where things like tools (CMSIS, upload tools, etc) are. I really believe that arduino-builder should be treated as an application that can completely stand alone without needing the normal IDE installed, meaning it would be great to also have it be able to download and install cores, boards, etc. like it's IDE counterpart. I've accomplished this with some bash scripts of my own. I'm not sure how it is trying to resolve the variables such as {runtime.tools.ctags.path} and {runtime.tools.avr-gcc.path}, but it seems like it would be prudent to set up some kind of config file for the tool to specify which directories it should be searching for these dependencies, whether it be the same directory relative to the binary or otherwise. Until that is solved, the custom SAMD21 variant that I made for our robotics platform can't be used in a standard Arduino fashion (using recipes and variables) outside of the very specific build environment I set up. Note: The -hardware and -libraries work great, just seems to be the -tools option that gives me issues, and I assume that if it was working, it would solve these issues, though a default configuration/config file relative to the binary would be a welcome addition. |
|
I'm not saying it should implement all of the features, but being able to fetch the official hardware and library folders isn't that complex. Making it so that you have to go find and download those folders (either from the source releases or by downloading the IDE, downloading them there, and then copying them over) makes it less simple, to use, in my opinion. When it comes to trying to building sketches on ARM, there are no official packages or releases, and you have to jump through a bunch of hoops to get everything set up. If you added both the features of being able to fetch the official hardware folders and configure the default paths that arduino-builder looks in, there would be an easy, cross-platform workflow for building arduino sketches that would look something like:
If you are using arduino-builder as packaged with the IDE, you're already good to go, because all of your dependencies are bundled and default locations configured (for platforms that can build and use the graphical interface). There should be no conflict. I know that ARM/headless use is a minor subset of the use cases, but it just doesn't seem like it should be hard to support an amiable workflow for this configuration. With all of the single board MPU+MCU packages popping up, it would be appreciated and I know that at least I would find it useful for continuous integration and for use on my desktop as well. |
I think that hardware, library, tools must be set with a default value.. |
The
-tools
,-hardware
and also effectively the-libraries
options are required forarduino-builder
to work.Since
arduino-builder
is now shipped with Arduino, wouldn't it make sense to default to the the appropriate paths in the subdirectories of the binary's directory? If the directories don't exist (for example whenarduino-builder
is built from source or moved somewhere else) it could still exit and ask for the options to be passed manually.I think this would make it much easier to get started with
arduino-builder
.The text was updated successfully, but these errors were encountered: