You are not logged in.
Hi folks,
I got a couple of Arduinos, and I'd like to compile within my environment. I don't like the Arduino IDE .
So I've downloaded arduino-mk from AUR. I've tried to understand how to get a Makefile, so I copied one into the directory which contains the sketch to compile.
My Makefile for my nano :
BOARD_TAG = nano
BOARD_SUB = atmega328
ARDUINO_DIR = /usr/share/arduino
BOARDS_TXT = /usr/share/arduino/hardware/arduino/avr/boards.txt
MONITOR_PORT = /dev/ttyACM0
include /usr/share/arduino/Arduino.mk
And the errors when giving the make
$ make
-------------------------
Arduino.mk Configuration:
- [AUTODETECTED] CURRENT_OS = LINUX
- [USER] ARDUINO_DIR = /usr/share/arduino
- [COMPUTED] ARDMK_DIR = /usr/share/arduino (relative to Common.mk)
- [AUTODETECTED] ARDUINO_VERSION = ${v
/bin/sh: -c: line 0: unexpected EOF while looking for matching `}'
/bin/sh: -c: line 1: syntax error: unexpected end of file
- [DEFAULT] ARCHITECTURE =
- [DEFAULT] ARDMK_VENDOR = arduino
/bin/sh: -c: line 0: unexpected EOF while looking for matching `}'
/bin/sh: -c: line 1: syntax error: unexpected end of file
- [DEFAULT] ARDUINO_SKETCHBOOK =
- [BUNDLED] AVR_TOOLS_DIR = /usr/share/arduino/hardware/tools/avr (in Arduino distribution)
/bin/sh: -c: line 0: unexpected EOF while looking for matching `}'
/bin/sh: -c: line 1: syntax error: unexpected end of file
/bin/sh: -c: line 0: unexpected EOF while looking for matching `}'
/bin/sh: -c: line 1: syntax error: unexpected end of file
- [COMPUTED] ARDUINO_LIB_PATH = /usr/share/arduino/libraries (from ARDUINO_DIR)
/bin/sh: -c: line 0: unexpected EOF while looking for matching `}'
/bin/sh: -c: line 1: syntax error: unexpected end of file
- [COMPUTED] ARDUINO_VAR_PATH = /usr/share/arduino/hardware/arduino//variants (from ARDUINO_DIR)
- [USER] BOARDS_TXT = /usr/share/arduino/hardware/arduino/avr/boards.txt
- [DEFAULT] USER_LIB_PATH = /libraries (in user sketchbook)
- [DEFAULT] PRE_BUILD_HOOK = pre-build-hook.sh
- [USER] BOARD_SUB = atmega328
- [USER] BOARD_TAG = nano
- [COMPUTED] CORE = arduino (from build.core)
- [COMPUTED] VARIANT = eightanaloginputs (from build.variant)
- [COMPUTED] OBJDIR = build-nano-atmega328 (from BOARD_TAG)
- [COMPUTED] ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino//cores/arduino (from ARDUINO_DIR, BOARD_TAG and boards.txt)
- [DETECTED] MONITOR_BAUDRATE = 9600 (in sketch)
/bin/sh: -c: line 0: unexpected EOF while looking for matching `}'
/bin/sh: -c: line 1: syntax error: unexpected end of file
- [DEFAULT] OPTIMIZATION_LEVEL = s
- [DEFAULT] MCU_FLAG_NAME = mmcu
- [DEFAULT] CFLAGS_STD =
- [DEFAULT] CXXFLAGS_STD =
- [COMPUTED] DEVICE_PATH = /dev/ttyACM0 (from MONITOR_PORT)
- [DEFAULT] FORCE_MONITOR_PORT =
- [AUTODETECTED] Size utility: AVR-aware for enhanced output
- [COMPUTED] BOOTLOADER_PARENT = /usr/share/arduino/hardware/arduino//bootloaders (from ARDUINO_DIR)
- [COMPUTED] ARDMK_VERSION = 1.5
- [COMPUTED] CC_VERSION = 4.9.2 (avr-gcc)
-------------------------
mkdir -p build-nano-atmega328
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -x c++ -include Arduino.h -MMD -c -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=${v -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino//cores/arduino -I/usr/share/arduino/hardware/arduino//variants/eightanaloginputs -Wall -ffunction-sections -fdata-sections -Os -fno-exceptions BTcontrol-03.ino -o build-nano-atmega328/BTcontrol-03.ino.o
/bin/sh: -c: line 0: unexpected EOF while looking for matching `}'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [/usr/share/arduino/Arduino.mk:1226: build-nano-atmega328/BTcontrol-03.ino.o] Error 1
I think there are some errors in the scripts or I've missed something.
EDIT
I found a remedy, that is pretty simple. I made a small script, and after compiling I can find the results into the listed directory.
#!/bin/bash
#
rm -rf /tmp/unti* 2>&1 >/dev/null
rm -rf /tmp/arduino* 1>&2 >/dev/null
arduino --verify --preserve-temp-files $1
ls /tmp/ |grep ardu*
This requires, anyways, to have arduino installed, but my liking is just to skip tu run the IDE.
Last edited by TheSaint (2016-09-29 05:58:06)
do it good first, it will be faster than do it twice the saint
Offline
Moving to AUR issues.
Looks interesting, I may take a look at this this evening.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I met the same issue. Any solutions?
Offline
Sorry to be vacant for long. I didn't go further and I'm happy with my script.
do it good first, it will be faster than do it twice the saint
Offline
For Arduino version 1.8.1 I found my script failing. So I copied the output from the IDE shell to mimic the same behavior.
Arduino-mk still not working, complaining for missing executables.
do it good first, it will be faster than do it twice the saint
Offline