xxxajk / arduino_makefile_master Goto Github PK
View Code? Open in Web Editor NEWUse make on macos Darwin or linux instead of arduino IDE.
Use make on macos Darwin or linux instead of arduino IDE.
This project looks awesome, but I'm stuck.
Using Arduino 1.6.5 or 1.6.6 is not working for me, I have to define many variables in my makefile and make some minor changes to the source. What's the latest supported version? Am I missing something basic here?
Thanks in advance.
My Makefile so far is, which seems unnecessary complex:
BOARD_TAG = teensy31
ARDUINO_PLATFORM_LIB_PATH = /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries
ARCHITECTURE = arm
ARDUINO_ARCH_FLAG = -DARDUINO_ARCH_AVR
MCU = cortex-m4
F_CPU = 72000000
USB_TYPE = USB_SERIAL_HID
LINKSCRIPT = mk20dx256.ld
CPPFLAGS = -mthumb -D__MK20DX256__ -DTEENSYDUINO=126
CXXFLAGS_STD += -std=gnu++0x
CXXFLAGS += -felide-constructors
CXXFLAGS += -fno-rtti
CXXFLAGS += -fsingle-precision-constant
CXXFLAGS += -M -MG -MP -w -x c++
LDFLAGS = -mthumb
LDFLAGS += -fsingle-precision-constant
LDFLAGS += -larm_cortexM4l_math
include ~/Documents/Arduino/Arduino-Makefile/Teensy.mk
Some loops use bash-style { } instead of POSIX sh do done
. e.g.:
UTLLIB_DIRS =
This results in errors liike:
/bin/sh: 1: Syntax error: "{" unexpected (expecting "do")
Adding SHELL=bash
on the make commandline solves this. Please don't assume the default shell is bash.
Running make -f Makefile.xxxajk BOARD=uno PORT=foo ARD_HOME=/home/matthijs/docs/Electronics/Arduino/Arduino-1.5/
I get:
Makefile.xxxajk:315: *** Unknown board 'uno'. Stop.
Looking at the source, I see:
ifdef BOARD_SUB
(stuff setting VARIANT)
endif
ifndef VARIANT
$(error Unknown board '$(BOARD)')
endif
Defining BOARD_SUB to some value prevents this error (but gives me other errors, probably related to my ARD_HOME being git checkout rather than an install).
Hello,
i am trying to use the Makefile in Linux (fedora 21). Compilation works fine, but linking fails:
Building "build/arduino_due_x_dbg/libAuser_.a"...
cp build/arduino_due_x_dbg/core_/libAcore_.a build/arduino_due_x_dbg/core_/libarduino_core.a
"/opt/arduino-1.5.8/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-gcc" -Os -Wl,--gc-sections -mcpu=cortex-m3 "-T/opt/arduino-1.5.8/hardware/arduino/sam/variants/arduino_due_x/linker_scripts/gcc/flash.ld" "-Wl,-Map,build/arduino_due_x_dbg/Blink.map" -Wl,--relax -Lbuild/arduino_due_x_dbg/core_ -o "build/arduino_due_x_dbg/Blink.elf" "-Lbuild/arduino_due_x_dbg" -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "build/arduino_due_x_dbg/syscalls_sam3.c.o" build/arduino_due_x_dbg/Blink_ino.o -lAuser_ "/opt/arduino-1.5.8/hardware/arduino/sam/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a" "build/arduino_due_x_dbg/core_/libarduino_core.a" -Wl,--end-group -lm -gcc
arm-none-eabi-gcc: error: build/arduino_due_x_dbg/syscalls_sam3.c.o: No such file or directory
_Makefile.master:1181: recipe for target 'build/arduino_due_x_dbg/Blink.hex' failed
make: *** [build/arduino_due_x_dbg/Blink.hex] Error 1
I use the simple blink example and added include "Arduino.h"
My Makefile looks like this:
BOARD=arduino_due_x_dbg
PORT=/dev/ACM0
ARD_HOME=/opt/arduino-1.5.8
MAKE_QUIET_LINK=
include _Makefile.master
The file build/arduino_due_x_dbg/syscalls_sam3.c.o does not exist, but ./build/arduino_due_x_dbg/core_/syscalls_sam3_c.o exists.
The file ./hardware/arduino/sam/platform.txt in arduino 1.5.8 contains this:
## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "{build.path}/syscalls_sam3.c.o" {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group -lm -gcc
Hello,
ARD_RESET_OPTS += --zero
The zero flag is not working here.
/usr/bin/ard-reset-arduino --zero /dev/ttyACM0
usage: ard-reset-arduino [-h] [--caterina] [--verbose] [--period PERIOD] port
ard-reset-arduino: error: unrecognized arguments: --zero
/home/thales/NAND/Arduino-Makefile/Arduino.mk:1621: recipe for target 'reset' failed
make: *** [reset] Error 2
Is it needed?
EDIT: Also, even with ttyACM0 port, when I try to upload, it says "No device found."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.