You are not logged in.

#1 2016-09-27 12:39:48

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

[Obviated] arduino-mk errors

Hi folks,

I got a couple of Arduinos, and I'd like to compile within my environment. I don't like the Arduino IDE wink.
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 wink

Offline

#2 2016-09-27 14:12:15

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: [Obviated] arduino-mk errors

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

#3 2016-11-19 15:14:02

billxue
Member
Registered: 2016-11-19
Posts: 1

Re: [Obviated] arduino-mk errors

I met the same issue. Any solutions?

Offline

#4 2016-12-16 18:25:11

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [Obviated] arduino-mk errors

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 wink

Offline

#5 2017-02-22 19:58:18

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [Obviated] arduino-mk errors

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 wink

Offline

Board footer

Powered by FluxBB