-
-
Notifications
You must be signed in to change notification settings - Fork 398
Adafruit SAMD Boards are not found by arduino-cli core search #166
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
I re-read the README.md and noticed the text for adding third-party cores and then update the package index. I attempted to add this package index:
to arduino-cli.yaml as instructed. However, the arduino-cli tree has 3 arduino-cli.yaml files in these locations: go/src/github.com/arduino/arduino-cli/configs/testdata/navigate/inheritance/first/arduino-cli.yaml I updated all of them like so:
...but this did not seem to download the package_adafruit_index.json. I also added arduino-cli.yaml to the path
...but this did not seem to get the adafruit package index downloaded, either. |
This might help. |
@gdsports Thank you! I looked in yaml_serializer.go but could not find anything in the format mentioned in Issue #5. That issue references a file .cli_config.yml that does not exist. I did notice a configuration.go file that is in ~/go/src/github.com/arduino/arduino-cli/configs and that seems to have a function NewConfiguration which, in part, returns this:
I'm thinking of changing that to point to Adafruit's package index file and seeing what happens. It's still unclear how exactly to add additional URL's in a way that will be parsed and processed properly. |
Those are used for testing of arduino-cli. They will not be used when you're actually running arduino-cli. If you want to see the locations that are searched for your arduino-ci.yaml file, run this command:
The priority is opposite of the order they are listed in the debug output (i.e. the configuration file in the current folder overrides the configuration file in the .arduino15 folder).
Unless you're actually building arduino-cli from source, it doesn't make sense for you to be editing files in the source code.
The file name has since been changed from .cli_config.yml to arduino-ci.yaml.
Unless you just enjoy hacking around in the code, you're better off using arduino-cli as it was designed to be used.
This is the correct format: board_manager:
additional_urls:
- https://adafruit.github.io/arduino-board-index/package_adafruit_index.json Note that the file in your other URL: With the above configuration in your arduino-ci.yaml file, you can now do this:
It seems to me that the root of this issue is the need for documentation of the possible locations of arduino-ci.yaml. The format of the additional Boards Manager URLs in that file is already correctly documented here: https://github.com/arduino/arduino-cli#adding-3rd-party-cores |
@per1234, I'm very confused and need some clarity here. I installed arduino-cli within the past 24 hours. So I'm getting the most recent version of the master branch. I'm running it on a Ubuntu 18.04 LTS server box. You say in your post above that I should add my additional_urls to this file: arduino-ci.yaml However, it does not exist anywhere under my ~/go/src/github.com/arduino/arduino-cli/ directory. Can you tell me exactly where this file is located? Do I need to check out a totally different branch of arduino-cli in order to find the file, because it has not yet been merged into the master branch? I did in fact change the file configuration.go to add the Adafruit package index to it. It took a bit of research to see how arrays and slices are created in go, and some experimentation. Eventually I was able to run
This allowed me to install the correct Adafruit core:
I was able to successfully compile MyFirstSketch. Unfortunately the upload failed due to an issue with the bossac path: ~$ arduino-cli upload -p /dev/ttyACM0 --fqbn adafruit:samd:adafruit_itsybitsy_m0 Arduino/MyFirstSketch The real point of this particular issue is to ask you: What is the path and name of the configuration file that needs to be edited in order to add additional URLs? The file name given in README.md appears to be wrong. No path to the file is specified. Update: I followed your suggestion and executed
...and now I understand. arduino-cli is looking for the arduino-cli.yaml file in the root of my home directory:
Thanks so much! |
The Adafruit SAMD board package depends on files in the Arduino SAMD board package so be sure to install both. The missing bossac error is almost always because the Arduino SAMD board package is not installed. |
I do have Arduino SAMD Boards installed. |
I have the following board packages installed. Are these sufficient to avoid the "no such file or directory" error I experienced with bossac?
|
@BobCochran Looks good to me. If missing files messages are still appearing you may have found a bug. |
@BobCochran The problem might be considered a bug in Adafruit's board package or the new arduino-cli, I do not know which. I use the older Arduino IDE command line interface which works fine with Adafruit, ESP, SparkFun, etc. boards. Here is an example.
|
@gdsports thank you so much for the comment and for providing the example. I'm going to dig into this some more and play with your script. I did have the 1.8.8 IDE downloaded to my Ubuntu account and untapped, but then I discovered arduino-cli. I was afraid the IDE might conflict with arduino-cli so I deleted it. That is easily fixed, I can re-download again and keep trying. I'll file an issue about bossac to either the Adafruit package repository or to arduino-cli. I definitely like using arduino devices on the linux command line. |
I am also experiencing the issue of the
Perhaps this issue should be renamed to 'Adafruit SAMD Bossac tool not resolving' |
@BobCochran I had a similar issue with the board detection for the Adafruit Feather M0 SAMD board. That particular issue isn’t with the Arduino CLI, that issue is with the boards.txt file inside the Adafruit SAMD board package. See here for an issue I opened in their repository to fix that problem. If you know which board it should be listed as, they can make similar adjustments to the VID and PID values on the appropriate board and that will resolve it being “unknown” even though the package is present. |
This is a bug on Adafruit's end: |
Upstream issue issue is fixed, any update on this? |
Before adafruit/arduino-board-index#32 was merged, I was able to reproduce the error on both the Arduino IDE and arduino-cli. Using Adafruit SAMD Boards 1.5.3 (which correctly specifies its tool dependency on arduino's bossac 1.7.0 tool), with the Arduino IDE, the problem is fixed. However, when I use it with arduino-cli @ fffa451, I get the same error during uploading:
The installation of Adafruit SAMD Boards 1.5.3 via So it seems to me that, in addition to the fixed bug in the Adafruit SAMD Boards Boards Manager JSON file that caused the error, there is also a bug in arduino-cli that causes the same error even after the problem in Adafruit SAMD Boards was fixed. |
I think I have a similar issue. I am able to search for Adafruit SAMD boards and install them too using the following input from
After that However the error comes with the bossac files -
|
In https://adafruit.github.io/arduino-board-index/package_adafruit_index.json there are two bossac tools listed as required:
I don't know if the Adafruit core requires both version, anyway this "confuses" the CLI (that accepts only the last one). If I manually remove the extra tool from the index it works. At a first glance I though that the index.json should be fixed by removing the extra instance of |
It does. They have two different upload tools defined in their platform.txt and used in boards.txt: |
@cmaglie which one did you remove? Or either of them work? |
Nope, a fix for the cli is coming. |
It will be in the next 0.6.0 release, but not timeline yet. |
@cmaglie Okay, great. Checked it with the nightly build....it worked on Adafruit Feather M0 Express : SAMD21 (which wasn't working before). |
Has there been a regression of this? I'm seeing the same issue in version 0.6.0:
UPDATE: Looks like the problem lies with Adafruit: |
Add tool for LZSS compression/decompression and improve documentation
…ules Temporarily disable platform documentation rules
I just installed arduino-cli on a Ubuntu 18.04 LTS box.
I have an Adafruit ItsyBitsy M0 board. When I plug this in, the operating system detects it as
...and arduino-cli sees it as:
usbob2@deaf58:~/Arduino/MyFirstSketch$ arduino-cli board list FQBN Port ID Board Name /dev/ttyACM0 239a:800f unknown
Searching for a core under the 'adafruit' name yields this:
However it cannot find contributed boards under the name "Adafruit SAMD Boards" which the Arduino 1.8.8 GUI on my Mac does locate, if I open "Boards Manager..." and search for contributed Adafruit boards.
I installed this:
usbob2@deaf58:~/Arduino/MyFirstSketch$ arduino-cli core install arduino:samd
...but my board is still not detected:
I'm not familiar with the Go programming language, but if there is some way I can contribute to arduino-cli that will help resolve this issue, I'm happy to do so.
Thanks!
The text was updated successfully, but these errors were encountered: