Skip to content

Error compiling for --fqbn arduino:avr:mega (missing cpu flags) #17

Closed
@FernandoGarcia

Description

@FernandoGarcia

Hi!

I have successfully installed Go compiler and Arduino CLI using this steps:

wget https://dl.google.com/go/go1.11.linux-armv6l.tar.gz

sudo tar -C /usr/local -xvf go1.11.linux-armv6l.tar.gz

cat >> ~/.bashrc << 'EOF'

export GOPATH=$HOME/go

export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin

EOF

source ~/.bashrc

go version

result: go1.11 linux/arm

Then:

go get -u github.com/arduino/arduino-cli

Now following the https://github.com/arduino/arduino-cli#getting-started starts the problems.

arduino-cli sketch new MyFirstSketch

Returns:

 Error: mkdir /home/pi/Arduino/MyFirstSketch: permission denied
Could not create sketch directory.

So I tried using sudo the result is:

sudo: arduino-cli: command not found

To try solved this issue I have created the folder manually using

sudo mkdir -p /home/pi/Arduino/MyFirstSketch

On next step I could not download package_index.json due permissions error again.

So I did:

sudo mkdir -p /home/pi/.arduino15/

cd /home/pi/.arduino15/

wget https://downloads.arduino.cc/packages/package_index.json

After I have successfully installed AVR core using:

arduino-cli core install arduino:avr

The result for arduino-cli core list is:

ID Installed Latest Name
arduino:avr 1.6.21 1.6.21 Arduino AVR Boards

Now using arduino-cli board list the result is always:

FQBN Port ID Board Name
/dev/ttyUSB0 0403:6001 unknown

In this point I don't know what to do to go on since the CLI doesn't find a FQBN to my Arduino mega connected to USB port.

Can someone help please?

Best regards.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions