Skip to content

Cannot compile blink code for Arduino Uno #203

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

Closed
shebet opened this issue May 2, 2019 · 6 comments · Fixed by #204
Closed

Cannot compile blink code for Arduino Uno #203

shebet opened this issue May 2, 2019 · 6 comments · Fixed by #204
Assignees
Milestone

Comments

@shebet
Copy link

shebet commented May 2, 2019

I am trying to get the Arduino-cli to upload the sample blink code to Arduino UNO board.
I am running this on a Nvidia TX2 board running Ubuntu 16.04(aarch64) .
Here is the list of board installed:

$arduino-cli core list
ID                      Installed       Latest  Name
arduino:[email protected]      1.6.23          1.6.23  Arduino AVR Boards
arduino:[email protected]  1.6.26          1.6.26  Arduino megaAVR Boards

When I try to compile it it says :

$ arduino-cli compile --fqbn arduino:avr:uno ~/Arduino/MyFirstSketch
Build options changed, rebuilding all
Error: fork/exec /home/nvidia/.arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++: no such file or directory
Compilation failed.

Here is the same compile with the debug enabled:

$ arduino-cli --debug  compile --fqbn arduino:avr:uno ~/Arduino/MyFirstSketch
INFO[0000] Checking for config file in: /home/nvidia/.arduino15/arduino-cli.yaml
INFO[0000] Checking if CLI is Bundled into the IDE
INFO[0000] Candidate IDE Directory: /home/nvidia/Documents/cli
INFO[0000] CLI is not bundled into the IDE
INFO[0000] Checking for config in: /arduino-cli.yaml
INFO[0000] error loading                                 error="open /arduino-cli.yaml: no such file or directory"
INFO[0000] Checking for config in: /home/arduino-cli.yaml
INFO[0000] error loading                                 error="open /home/arduino-cli.yaml: no such file or directory"
INFO[0000] Checking for config in: /home/nvidia/arduino-cli.yaml
INFO[0000] error loading                                 error="open /home/nvidia/arduino-cli.yaml: no such file or directory"
INFO[0000] Configuration set
INFO[0000] arduino-cli-0.3.6-alpha.preview
INFO[0000] Starting root command preparation (`arduino`)
INFO[0000] Formatter set
INFO[0000] Executing `arduino compile`
INFO[0000] Initializing package manager
INFO[0000] Loading hardware from: /home/nvidia/.arduino15/packages
INFO[0000] Loading package arduino from: /home/nvidia/.arduino15/packages/arduino/hardware
INFO[0000] Loaded platform                               platform="arduino:[email protected]"
INFO[0000] Loaded platform                               platform="arduino:[email protected]"
INFO[0000] Checking existence of 'tools' path: /home/nvidia/.arduino15/packages/arduino/tools
INFO[0000] Loading tools from dir: /home/nvidia/.arduino15/packages/arduino/tools
INFO[0000] Loaded tool                                   tool="arduino:[email protected]"
INFO[0000] Loaded tool                                   tool="arduino:[email protected]"
INFO[0000] Loaded tool                                   tool="arduino:[email protected]"
INFO[0000] Loading package builtin from: /home/nvidia/.arduino15/packages/builtin
INFO[0000] Checking existence of 'tools' path: /home/nvidia/.arduino15/packages/builtin/tools
INFO[0000] Loading tools from dir: /home/nvidia/.arduino15/packages/builtin/tools
INFO[0000] Loaded tool                                   tool="builtin:[email protected]"
Ts: 1556811750 - Running: GenerateBuildPathIfMissing
Setting build path to /tmp/arduino-sketch-2952FBE27FB011D6DF4404B7737E1334
Ts: 1556811750 - Running: EnsureBuildPathExists
Ts: 1556811750 - Running: ContainerSetupHardwareToolsLibsSketchAndProps
Ts: 1556811750 - Running: AddAdditionalEntriesToContext
Ts: 1556811750 - Running: FailIfBuildPathEqualsSketchPath
Ts: 1556811750 - Running: HardwareLoader
Ts: 1556811750 - Running: PlatformKeysRewriteLoader
Ts: 1556811750 - Running: RewriteHardwareKeys
Ts: 1556811750 - Running: TargetBoardResolver
Ts: 1556811750 - Running: ToolsLoader
INFO[0000] Searching tools required for board arduino:avr:uno
INFO[0000] Required tool                                 tool="arduino:[email protected]"
INFO[0000] Required tool                                 tool="arduino:[email protected]"
INFO[0000] Required tool                                 tool="arduino:[email protected]"
Ts: 1556811750 - Running: AddBuildBoardPropertyIfMissing
Ts: 1556811750 - Running: LibrariesLoader
INFO[0000] Adding libraries dir                          dir=/home/nvidia/.arduino15/packages/arduino/hardware/avr/1.6.23/libraries location=platform
INFO[0000] Adding libraries dir                          dir=/home/nvidia/Arduino/libraries location=sketchbook
Ts: 1556811750 - Running: SketchLoader
Ts: 1556811750 - Running: SetupBuildProperties
Ts: 1556811750 - Running: LoadVIDPIDSpecificProperties
Ts: 1556811750 - Running: SetCustomBuildProperties
Ts: 1556811750 - Running: AddMissingBuildPropertiesFromParentPlatformTxtFiles
Ts: 1556811750 - Running: ContainerBuildOptions
Ts: 1556811750 - Running: CreateBuildOptionsMap
Ts: 1556811750 - Running: LoadPreviousBuildOptionsMap
Ts: 1556811750 - Running: WipeoutBuildPathIfBuildOptionsChanged
Build options changed, rebuilding all
Ts: 1556811750 - Running: StoreBuildOptionsMap
Ts: 1556811750 - Running: WarnAboutPlatformRewrites
Ts: 1556811750 - Running: RecipeByPrefixSuffixRunner
Looking for recipes like recipe.hooks.prebuild*.pattern
Ts: 1556811750 - Running: ContainerMergeCopySketchFiles
Ts: 1556811750 - Running: SketchSourceMerger
Ts: 1556811750 - Running: SketchSaver
Ts: 1556811750 - Running: AdditionalSketchFilesCopier
Ts: 1556811750 - Running: loggerAction
Ts: 1556811750 - Running: ContainerFindIncludes
Checking previous results for /tmp/arduino-sketch-2952FBE27FB011D6DF4404B7737E1334/sketch/MyFirstSketch.ino.cpp (result = /tmp/arduino-sketch-2952FBE27FB011D6DF4404B7737E1334/sketch/MyFirstSketch.ino.cpp.o, dep = /tmp/arduino-sketch-2952FBE27FB011D6DF4404B7737E1334/sketch/MyFirstSketch.ino.cpp.d)
Not found: /tmp/arduino-sketch-2952FBE27FB011D6DF4404B7737E1334/sketch/MyFirstSketch.ino.cpp.o
Ts: 1556811750 - Running: PrintUsedAndNotUsedLibraries
Ts: 1556811751 - Running: PrintUsedLibrariesIfVerbose
Ts: 1556811751 - Running: ExportProjectCMake
Ts: 1556811751 - Running: Sizer
ERRO[0000] Compilation failed.                           error="fork/exec /home/nvidia/.arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++: no such file or directory"
Error: fork/exec /home/nvidia/.arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++: no such file or directory
Compilation failed.

Any idea what I am missing?

@facchinm
Copy link
Member

facchinm commented May 6, 2019

@cmaglie is linux-aarch64 target already supported in the CLI? The json lists the toolchain as

            {
              "size": "33141295",
              "checksum": "SHA-256:0fa9e4f2d6d09782dbc84dd91a302849cde2f192163cb9f29484c5f32785269a",
              "host": "aarch64-linux-gnu",
              "archiveFileName": "avr-gcc-5.4.0-atmel3.6.1-arduino2-aarch64-pc-linux-gnu.tar.bz2",
              "url": "http://downloads.arduino.cc/tools/avr-gcc-5.4.0-atmel3.6.1-arduino2-aarch64-pc-linux-gnu.tar.bz2"
            },

@cmaglie
Copy link
Member

cmaglie commented May 6, 2019

nope, will add

@per1234 per1234 added the bug label May 6, 2019
cmaglie added a commit to cmaglie/arduino-cli that referenced this issue May 7, 2019
@cmaglie
Copy link
Member

cmaglie commented May 7, 2019

Done here #204, @shebet may you test it?

@cmaglie cmaglie added this to the next alpha milestone May 7, 2019
@cmaglie cmaglie self-assigned this May 7, 2019
@mpovel
Copy link

mpovel commented Jun 18, 2019

Just tried with arduino-cli-0.3.6-alpha.preview-linuxaarch64 and got:

root@orangepipc:~/Arduino# ./arduino-cli core update-index
Updating index: package_index.json downloaded                                   
root@orangepipc:~/Arduino# ./arduino-cli core install arduino:avr
The tool arduino:[email protected] is not available for the current OS

Running Debian Stretch with Armbian Linux 4.19.38-sunxi64

@cmaglie
Copy link
Member

cmaglie commented Jun 18, 2019

it's not yet in 0.3.6-alpha, please try this build --> #204 (comment)

@mpovel
Copy link

mpovel commented Jun 21, 2019

Hi, sorry there is no ARM64 executable ;-(

root@orangepipc2:~/Arduino# ./arduino-cli-48-PR204-linuxarm 
-bash: ./arduino-cli-48-PR204-linuxarm: No such file or directory
root@orangepipc2:~/Arduino# file ./arduino-cli-48-PR204-linuxarm 
./arduino-cli-48-PR204-linuxarm: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, not stripped
root@orangepipc2:~/Arduino# file arduino-cli-0.3.6-alpha.preview-linuxaarch64 
arduino-cli-0.3.6-alpha.preview-linuxaarch64: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped

masci pushed a commit that referenced this issue Jul 11, 2019
* Added arm64 support

Fix #203

* Fixed typo in test
mastrolinux pushed a commit that referenced this issue Jul 16, 2019
* Added arm64 support

Fix #203

* Fixed typo in test
per1234 added a commit that referenced this issue Aug 9, 2021
Add support for packages[].platforms[].deprecated property of package index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants