Я хочу использовать ArduinoMakefile для отправки кода на доску SleepyPi через командную строку.
Это часть сенсорного проекта с RaspberryPi3, в котором эта плата питания Arduino подключена через GPIO для управления контролем мощности.
Я делаю это в док-контейнере, который развернут с помощью matrix.io.
Мой Makefile выглядит так:
PROJECT_DIR = /sonah/src/sleepypi/run/script2
ARDMK_DIR = $(PROJECT_DIR)
ARDUINO_DIR = /usr/share/arduino
USER_LIB_PATH := /usr/share/arduino/libraries
BOARD_TAG = sleepypi
MONITOR_BAUDRATE = 115200
AVR_TOOLS_DIR = /usr
AVRDUDE = /usr/bin/avrdude
CFLAGS_STD = -std=gnu11
CXXFLAGS_STD = -std=gnu++11
CXXFLAGS += -pedantic -Wall -Wextra
MONITOR_PORT = /dev/ttyS0
CURRENT_DIR = $(shell basename $(CURDIR))
OBJDIR = $(PROJECT_DIR)/bin/$(BOARD_TAG)/$(CURRENT_DIR)
include $(ARDMK_DIR)/Arduino.mk
И когда я запускаю его, я получаю следующее сообщение:
root@raspberrypi3-c49223e:/sonah/src/sleepypi/run/script2# make upload
-------------------------
Arduino.mk Configuration:
- [AUTODETECTED] CURRENT_OS = LINUX
- [USER] ARDUINO_DIR = /usr/share/arduino
- [USER] ARDMK_DIR = /sonah/src/sleepypi/run/script2
- [AUTODETECTED] ARDUINO_VERSION = 105
- [DEFAULT] ARCHITECTURE =
- [DEFAULT] ARDMK_VENDOR = arduino
- [DEFAULT] ARDUINO_SKETCHBOOK =
- [USER] AVR_TOOLS_DIR = /usr
- [COMPUTED] ARDUINO_LIB_PATH = /usr/share/arduino/libraries (from ARDUINO_DIR)
- [COMPUTED] ARDUINO_VAR_PATH = /usr/share/arduino/hardware/arduino//variants (from ARDUINO_DIR)
- [COMPUTED] BOARDS_TXT = /usr/share/arduino/hardware/arduino//boards.txt (from ARDUINO_DIR)
- [USER] USER_LIB_PATH = /usr/share/arduino/libraries
- [DEFAULT] PRE_BUILD_HOOK = pre-build-hook.sh
- [USER] BOARD_TAG = sleepypi
- [COMPUTED] CORE = arduino (from build.core)
- [COMPUTED] VARIANT = standard (from build.variant)
- [USER] OBJDIR = /sonah/src/sleepypi/run/script2/bin/sleepypi/script2
- [COMPUTED] ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino//cores/arduino (from ARDUINO_DIR, BOARD_TAG and boards.txt)
- [USER] MONITOR_BAUDRATE = 115200
- [DEFAULT] OPTIMIZATION_LEVEL = s
- [DEFAULT] MCU_FLAG_NAME = mmcu
- [USER] CFLAGS_STD = -std=gnu11
- [USER] CXXFLAGS_STD = -std=gnu++11
- [COMPUTED] DEVICE_PATH = /dev/ttyS0 (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.6
- [COMPUTED] CC_VERSION = 4.8.1 (avr-gcc)
-------------------------
mkdir -p /sonah/src/sleepypi/run/script2/bin/sleepypi/script2
make reset
make[1]: Entering directory '/sonah/src/sleepypi/run/script2'
/sonah/src/sleepypi/run/script2/bin/ard-reset-arduino /dev/ttyS0
make[1]: /sonah/src/sleepypi/run/script2/bin/ard-reset-arduino: Command not found
/sonah/src/sleepypi/run/script2/Arduino.mk:1600: recipe for target 'reset' failed
make[1]: *** [reset] Error 127
make[1]: Leaving directory '/sonah/src/sleepypi/run/script2'
/sonah/src/sleepypi/run/script2/Arduino.mk:1558: recipe for target 'upload' failed
make: *** [upload] Error
Я бы хотел получить представление о том, что я сделал неправильно, и как я могу это исправить.
Я должен признаться, что я не эксперт по Arduino и последовательной связи.