Im on Linux Manjaro right now and Im following this tutorial (https://youtu.be/qAM2S27FWAI) on how to use Arduino from the command line. Im currently trying to create a Makefile for my Arduino Leonardo. This is how my makefile looks for now:

ARDUINO_DIR = /usr/share/arduino

USER_LIB_PATH = /home/pi/sketchbook/libraries

BOARD_TAG = leonardo

include /usr/share/arduino/Arduino.mk

After saving it and trying to run make this the error I am getting:

- [COMPUTED]           OBJDIR = build-leonardo (from BOARD_TAG)
grep: /usr/share/arduino/hardware/arduino/avr/boards.txt: No such file or directory
- [DEFAULT]            ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino/avr/cores/arduino 
- [ASSUMED]            MONITOR_BAUDRATE = 9600 
- [DEFAULT]            MCU_FLAG_NAME = mmcu 
- [DEFAULT]            CFLAGS_STD = -std=gnu11 -flto -fno-fat-lto-objects 
- [DEFAULT]            CXXFLAGS_STD = -std=gnu++11 -fno-threadsafe-statics -flto 
- [COMPUTED]           DEVICE_PATH = /dev/ttyACM* (from MONITOR_PORT)
- [AUTODETECTED]       Size utility: AVR-aware for enhanced output
- [COMPUTED]           BOOTLOADER_PARENT = /usr/share/arduino/hardware/arduino/avr/bootloaders (from ARDUINO_DIR)
- [COMPUTED]           ARDMK_VERSION = 1.5 
- [COMPUTED]           CC_VERSION = 10.1.0 (avr-gcc)
grep: /usr/share/arduino/hardware/arduino/avr/boards.txt: No such file or directory
grep: /usr/share/arduino/hardware/arduino/avr/boards.txt: No such file or directory
mkdir -p build-leonardo
/usr/bin/avr-g++ -x c++ -include Arduino.h -MMD -c -mmcu= -DF_CPU= -DARDUINO=1812 -DARDUINO_ARCH_AVR -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/    -Wall -ffunction-sections -fdata-sections -Os -fpermissive -fno-exceptions -std=gnu++11 -fno-threadsafe-statics -flto blinky.ino -o build-leonardo/blinky.ino.o
avr-g++: error: missing device or architecture after '-mmcu='
make: *** [/usr/share/arduino/Arduino.mk:1256: build-leonardo/blinky.ino.o] Error 1

I suspect it might be caused by me not knowing what BOARD_TAG Leonardo exactly has. But I'm not sure. How can I make it work?

  • Where/how did you install the Arduino core library? On Raspbian, the package arduino-mk depends on arduino-core. That's why the author of the video does not install it explicitly. – Edgar Bonet Jun 2 at 9:24
  • I think the clue is in this line: grep: /usr/share/arduino/hardware/arduino/avr/boards.txt: No such file or directory – Majenko Jun 2 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.