Closed sta-c0000 closed 4 years ago
hi, unknown why that's happening - we've had no complaints or issue with IDE users or with our travisCI script https://github.com/adafruit/travis-ci-arduino/blob/master/install.sh
I just noticed that certain features, like the Adafruit_NeoPixel_ZeroDMA
library, will not work when compiling using --fqbn arduino:samd:adafruit_circuitplayground_m0
; whereas they do work using the adafruit
fqbn.
So I'm working around this issue by compiling with --fqbn adafruit:samd:adafruit_circuitplayground_m0
, then using uf2conv.py to convert the .bin
into a .uf2
to copy to the CPLAYBOOT
USB mount.
I can confirm this is also happening with an Adafruit Feather M0.
arduino-cli
does not expand the properties for the upload tool - on my machine, the command that is being executed is:
"{runtime.tools.bossac-1.7.0-arduino3.path}/bossac" --port=cu.usbmodem14301 -U true -i -e -w -v "test/test.adafruit.samd.adafruit_feather_m0.bin"
It looks like there is something wrong with the expansion of {runtime.tools.bossac-1.7.0-arduino3.path}
.
Based on issue #22...
Tool versions specified in .arduino15/packages/adafruit/hardware/samd/1.5.7/platform.txt
:
[...]
compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
[...]
tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path}
[...]
tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}
[...]
...are out of sync with the 1.5.7 "toolsDependencies"
versions specified in package_adafruit_index.json
:
{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
},
{
"packager": "arduino",
"name": "bossac",
"version": "1.7.0"
},
{
"packager": "arduino",
"name": "openocd",
"version": "0.9.0-arduino"
},
Changing package_adafruit_index.json
to match platform.txt
does the trick:
{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "7-2017q4"
},
{
"packager": "arduino",
"name": "bossac",
"version": "1.7.0-arduino3"
},
{
"packager": "arduino",
"name": "openocd",
"version": "0.10.0-arduino7"
},
I tested and it works (but had to delete .arduino15/packages/
and re-install: arduino-cli core install adafruit:samd
).
It appears it's important those two files have matching versions, but it's not clear to me how they are meant to be kept in sync in this repository? Manually?
Thanks @sta-c0000 for finding the workaround - I spent an hour or so looking at these files and making changes but nothing took effect!
Thanks @sta-c0000 for finding the workaround - I spent an hour or so looking at these files and making changes but nothing took effect!
After running arduino-cli core update-index
you will find the downloaded package_adafruit_index.json
file in the .arduino15/
folder. You can then make the changes @sta-c0000 suggested and retry uploading.
Hmmm, there's been two more versions generated since?... I've just created PR#52 for bpt.ini so that at least future versions should have the correct toolsDependencies... hopefully.
I'll add that Initially I was only able to compile because I had also installed arduino:samd which has correct toolsDependencies and downloaded the correct compiler requested by adafruit:samd. Once package_adafruit_index.json is corrected, then you should be able to compile and upload without needing to also install arduino:samd ...saves disk space.
I am having the same problem with my ItsyBitsym0. I am pretty new to this and I thought I would try the Arduino IDE. What I don't understand is that they share the same location for the board files (the arduino:samd and adafruit:samd I installed with the arduino-cli were detected) and the upload works fine in the GUI app and not in the CLI. So there may be a problem with the different versions of bossac in platform.txt and package_adafruit_index.json, but I don't understand how it would work fine in the IDE and not the cli if it was the only problem.
Anyway, I don't really undersand all this yet and there is probably a good explanation for it, but I find it a bit odd.
its def possible to use the CLI for itsym0 - we use it in our actions CI https://github.com/adafruit/ci-arduino/blob/master/build_platform.py
Yeah well, everything compiles fine. It's only the upload that doesn't work with the same Error during Upload: cannot execute upload tool: fork/exec {runtime.tools.bossac-1.7.0-arduino3.path}/bossac: no such file or directory
error.
I simply thought it was strange that the issue only affects the cli and not the ide. I guess that the ide does things differently somehow. I thought the ide only used the arduino-cli behind the scenes, but it looks like it's not that simple 😐
Hopefully the pr #52 will fix it 😃
Closing, Thanks! Works since 1.5.11 package_adafruit_index.json
now that it is in sync with Adafruit's SAMD platform.txt
. And we no longer need to also install arduino:samd.
Note (to users) that it is easiest to add the file ~/.arduino15/arduino-cli.yaml
with the contents:
board_manager:
additional_urls:
- https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
...otherwise you would need to add the following parameter for most arduino-cli
commands, including upload:
arduino-cli [commands] --additional-urls "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json"
So, from scratch (assuming you've created ~/.arduino15/arduino-cli.yaml
):
$ arduino-cli core update-index
$ arduino-cli core install adafruit:samd
$ arduino-cli board list # (= list connected; listall = all known)
# using fqbn and port from above command, to compile and upload:
$ arduino-cli compile --fqbn {fqbn} MyFirstSketch
$ arduino-cli upload -p {port} --fqbn {fqbn} MyFirstSketch
arduino-cli
cannot upload to Circuit Playground Express using FQBN (Fully Qualified Board Name)adafruit:samd:adafruit_circuitplayground_m0
Error reported:
Error during Upload: cannot execute upload tool: fork/exec {runtime.tools.bossac-1.7.0-arduino3.path}/bossac: no such file or directory
Upload works OK using FQBN
arduino:samd:adafruit_circuitplayground_m0
Apologies, the differences between the two (adafruit vs arduino) FQBNs is not clear to me. I imagine this issue implies users should use the arduino FQBN, but then why is there an adafruit one? EDIT: required for certain features, see two posts below...
Thank you!
More information
With following added to
~/.arduino15/arduino-cli.yaml
(or can use param below):Compile works, but upload fails using
adafruit:samd:adafruit_circuitplayground_m0
Compile and upload works using
arduino:samd:adafruit_circuitplayground_m0