-
-
Notifications
You must be signed in to change notification settings - Fork 403
Q: How to use sketchbook/hardware directory instead of ~/.arduino15/packages/ #898
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
hi @sej7278 Let me know how it pans out ✌️ |
hi @ubidefeo yes i've looked some more into this and understand now that tools (avr-gcc, avrdude etc.) are also downloaded into ~/.arduino15/packages, that i'm fine with. but i'd still like a way to have the sketchbook/hardware folder used for the cores (perhaps without the numbering - surely that can be held in a file rather than as a subdirectory name?) to make it consistent with the "old" way of doing things and also the libraries which are downloaded to sketchbook/libraries/ using arduino-cli i'm a fan of Makefiles, as a contributor to arduino-mk so made this simple wrapper for arduino-cli, which i think is much easier than passing in all of the flags every time you run arduino-cli: FQBN = ATTinyCore:avr:attinyx5
all:
arduino-cli compile --fqbn $(FQBN) $(notdir $(CURDIR)).ino
upload:
arduino-cli upload -b $(FQBN) -P usbasp $(CURDIR)
clean:
rm -rf $(CURDIR)/build although as i recall with arduino-builder you could make a local json file to hold the config, can't seem to find the documentation for that now. finally, does burn-bootloader set the fuses for cores that don't have bootloaders like attiny85? otherwise how do we set the fusebits for blank chips using this? |
There are other
|
ok thanks, think i'll stick to git cloning cores to my hardware directory then, or maybe using arduino-cli and moving the files it downloads. wonder if symlinking would work - might mess up with those versioned directories though. |
if it suits you :D the advantage of keeping it stock is that you'll be able to get updates via |
Yeah I get that, but the directory location and versioning breaks too many if my supporting scripts, I'll close this, thanks for the input. |
@ubidefeo what is the issue that prevents using the sketchbook folder as destination of downloaded cores? I just did a quick test with both
@sej7278 it does whatever the the author of the boards core configured it to do. Just as in the Arduino IDE, Arduino CLI doesn't impose any restriction in this matter. For example, here's how the classic
In the case of the more advanced So you can see the Arduino boards core system is flexible enough that the boards core authors are able to do amazing things! |
I believe if you only use CLI you might have no issues, but if you also need to run the Java IDE and/or the Pro IDE then they'd source and store data in different places and there would be no consistency. |
IIRC the Java IDE uses checks like "is this path inside the sketchbook" and "is this path inside my user directory" to retroactively decide where a core was loaded from. Not ideal, but works most of the time. However, in the Java IDE, there is no way to change the user directory (it is always |
Yeah I can live with it, just been changing an awful lot of makefiles and scripts lol. One thing I found odd was that the ide couldn't find the cores I'd installed until I added the additional URLs into it too, it didn't read the cli config yaml. |
I don't like the way boards manager in the IDE dumps everything into a hidden directory, is there a way to avoid that with arduino-cli?
I tried setting the following in arduino-cli.yaml but it ended up just creating a packages directory where I expected the cores to go:
Is there a way to force the cores to go into the hardware directory inside the user sketchbook instead of ~/.arduino15/packages/arduino/hardware/avr/1.8.3 ?
arduino-cli core list
seems to list the cores from there, so surely it can install to there too?Libraries seem to work this way (install/update work fine) but not cores.
The text was updated successfully, but these errors were encountered: