This new port installs a makefile that makes it possible to build Arduino sketches from the FreeBSD command line using gmake. It includes a example demo sketch that shows how to use it. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2XvksACgkQWxlAhAje3JuL0ACgjquYmyqacAxhQZUtyicgXatz JIgAn3C+uKU76sIGO3IAoEQT9h1Y+VOS =qhs2 -----END PGP SIGNATURE----- --------------060301010200070600090404 Content-Type: text/plain; name="arduino-mk.shar" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="arduino-mk.shar" # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # arduino-mk # arduino-mk/files # arduino-mk/files/patch-Arduino.mk # arduino-mk/files/Makefile # arduino-mk/files/blink2.pde # arduino-mk/Makefile # arduino-mk/pkg-descr # arduino-mk/distinfo # echo c - arduino-mk mkdir -p arduino-mk > /dev/null 2>&1 echo c - arduino-mk/files mkdir -p arduino-mk/files > /dev/null 2>&1 echo x - arduino-mk/files/patch-Arduino.mk sed 's/^X//' >arduino-mk/files/patch-Arduino.mk << '6bd31c959ef6d251f24cf8fd4cca7681' XThis patch: X X - Adds ARDUINO_LIBS support X - Allows the user's Makefile to add to CPPFLAGS (e.g. -Werror) X - Fixes ARDUINO_LIB_PATH X XEnumerating each of the libraries directories isn't elegant but it Xworks. X X--- Arduino.mk 2010/07/06 03:43:35 1.1 X+++ Arduino.mk 2011/01/24 06:05:23 X@@ -5,7 +5,7 @@ X # X # Copyright (C) 2010 Martin Oldfield <m@mjo.tc>, based on work that is X # Copyright Nicholas Zambetti, David A. Mellis & Hernando Barragan X-# X+# X # This file is free software; you can redistribute it and/or modify it X # under the terms of the GNU Lesser General Public License as X # published by the Free Software Foundation; either version 2.1 of the X@@ -58,7 +58,7 @@ X # this would match the .pde file, but it's not needed X # here: you could always set it to xx if you wanted! X # ARDUINO_LIBS - A list of any libraries used by the sketch (we assume X-# these are in $(ARDUINO_DIR)/hardware/libraries X+# these are in $(ARDUINO_DIR)/libraries X # MCU,F_CPU - The target processor description X # ARDUINO_PORT - The port where the Arduino can be found (only needed X # when uploading X@@ -85,7 +85,7 @@ X # X # ARDUINO WITH OTHER TOOLS X # X-# If the tools aren't in the Arduino distribution, then you need to X+# If the tools aren't in the Arduino distribution, then you need to X # specify their location: X # X # AVR_TOOLS_PATH = /usr/bin X@@ -100,7 +100,7 @@ X # X # ISP_PROG = -c stk500v2 X # ISP_PORT = /dev/ttyACM0 X-# X+# X # ISP_LOCK_FUSE_PRE = 0x3f X # ISP_LOCK_FUSE_POST = 0xcf X # ISP_HIGH_FUSE = 0xdf X@@ -109,7 +109,7 @@ X # X # I think the fuses here are fine for uploading to the ATmega168 X # without bootloader. X-# X+# X # To actually do this upload use the ispload target: X # X # make ispload X@@ -133,9 +133,11 @@ X AVRDUDE_CONF = $(ARDUINO_ETC_PATH)/avrdude.conf X endif X X-ARDUINO_LIB_PATH = $(ARDUINO_DIR)/hardware/libraries X+ARDUINO_LIB_PATH = $(ARDUINO_DIR)/libraries X ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/arduino/cores/arduino X X+LOCAL_LIB_PATH = $(ARDUINO_DIR)/local/libraries X+ X endif X X # Everything gets built in here X@@ -168,8 +170,24 @@ X endif X endif X X+# lib sources X+ifdef ARDUINO_LIBS X+LIB_C_SRCS = $(wildcard $(patsubst %,$(ARDUINO_LIB_PATH)/%/*.c,$(ARDUINO_LIBS))) X+LIB_CPP_SRCS = $(wildcard $(patsubst %,$(ARDUINO_LIB_PATH)/%/*.cpp,$(ARDUINO_LIBS))) X+LIB_OBJ_FILES = $(LIB_C_SRCS:.c=.o) $(LIB_CPP_SRCS:.cpp=.o) X+LIB_OBJS = $(patsubst %,$(OBJDIR)/%,$(notdir $(LIB_OBJ_FILES))) X+endif X+ X+# local lib sources X+ifdef LOCAL_LIBS X+LOCAL_LIB_C_SRCS = $(wildcard $(patsubst %,$(LOCAL_LIB_PATH)/%/*.c,$(LOCAL_LIBS))) X+LOCAL_LIB_CPP_SRCS = $(wildcard $(patsubst %,$(LOCAL_LIB_PATH)/%/*.cpp,$(LOCAL_LIBS))) X+LOCAL_LIB_OBJ_FILES = $(LOCAL_LIB_C_SRCS:.c=.o) $(LOCAL_LIB_CPP_SRCS:.cpp=.o) X+LOCAL_LIB_OBJS = $(patsubst %,$(OBJDIR)/%,$(notdir $(LOCAL_LIB_OBJ_FILES))) X+endif X+ X # all the objects! X-OBJS = $(LOCAL_OBJS) $(CORE_OBJS) X+OBJS = $(LOCAL_OBJS) $(CORE_OBJS) $(LOCAL_LIB_OBJS) $(LIB_OBJS) X X ######################################################################## X # Rules for making stuff X@@ -201,8 +219,9 @@ X SYS_INCLUDES = $(patsubst %,-I%,$(SYS_LIBS)) X SYS_OBJS = $(wildcard $(patsubst %,%/*.o,$(SYS_LIBS))) X X-CPPFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU) \ X+CPPFLAGS += -mmcu=$(MCU) -DF_CPU=$(F_CPU) \ X -I. -I$(ARDUINO_CORE_PATH) \ X+ -I$(ARDUINO_DIR) -I$(LOCAL_LIB_PATH) \ X $(SYS_INCLUDES) -g -Os -w -Wall \ X -ffunction-sections -fdata-sections X CFLAGS = -std=gnu99 X@@ -275,6 +294,74 @@ X $(OBJDIR)/%.o: $(ARDUINO_CORE_PATH)/%.cpp X $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X X+# lib files X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/EEPROM/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/EEPROM/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Ethernet/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Ethernet/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Firmata/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Firmata/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/LiquidCrystal/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/LiquidCrystal/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Matrix/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Matrix/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Servo/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Servo/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/SoftwareSerial/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/SoftwareSerial/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Sprite/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Sprite/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Stepper/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Stepper/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Wire/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(ARDUINO_LIB_PATH)/Wire/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X+# local lib files X+$(OBJDIR)/%.o: $(LOCAL_LIB_PATH)/IRremote/%.c X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ X+ X+$(OBJDIR)/%.o: $(LOCAL_LIB_PATH)/IRremote/%.cpp X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ X+ X # various object conversions X $(OBJDIR)/%.hex: $(OBJDIR)/%.elf X $(OBJCOPY) -O ihex -R .eeprom $< $@ X@@ -364,13 +451,13 @@ X # stty on MacOS likes -F, but on Debian it likes -f redirecting X # stdin/out appears to work but generates a spurious error on MacOS at X # least. Perhaps it would be better to just do it in perl ? X-reset: X+reset: X for STTYF in 'stty --file' 'stty -f' 'stty <' ; \ X do $$STTYF /dev/tty >/dev/null 2>/dev/null && break ; \ X done ;\ X $$STTYF $(ARD_PORT) hupcl ;\ X (sleep 0.1 || sleep 1) ;\ X- $$STTYF $(ARD_PORT) -hupcl X+ $$STTYF $(ARD_PORT) -hupcl X X ispload: $(TARGET_HEX) X $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ISP_OPTS) -e \ 6bd31c959ef6d251f24cf8fd4cca7681 echo x - arduino-mk/files/Makefile sed 's/^X//' >arduino-mk/files/Makefile << 'de4f9b762917c2ea3355d4c4fc834977' X# @(#) $Id: Makefile 75 2011-04-03 00:15:10Z leres $ (XSE) X XTARGET= blink2 X XCPPFLAGS+= -Werror X XMCU= atmega328p XF_CPU= 16000000 XAVRDUDE_ARD_PROGRAMMER= arduino XAVRDUDE_ARD_BAUDRATE= 57600 XARDUINO_PORT= /dev/arduino X X XARDUINO_DIR= /usr/local/arduino XAVR_TOOLS_PATH= /usr/local/bin XAVRDUDE_CONF= /usr/local/etc/avrdude.conf X Xinclude /usr/local/arduino-mk/Arduino.mk de4f9b762917c2ea3355d4c4fc834977 echo x - arduino-mk/files/blink2.pde sed 's/^X//' >arduino-mk/files/blink2.pde << '3edf1311e573efc90ce5090258bed968' X#include <avr/io.h> X#include <util/delay.h> X X/* This is a example sketch that blinks the LED like a heartbeat */ X Xvoid Xsetup() X{ X /* set PORTB for LED output */ X DDRB = 0xFF; X} X Xvoid Xloop() X{ X while (1) { X /* set PORTB.6 high */ X PORTB = 0x20; X X delay(25); X X /* set PORTB.6 low */ X PORTB = 0x00; X X delay(50); X X /* set PORTB.6 high */ X PORTB = 0x20; X X delay(25); X X /* set PORTB.6 low */ X PORTB = 0x00; X X delay(900); X } X} 3edf1311e573efc90ce5090258bed968 echo x - arduino-mk/Makefile sed 's/^X//' >arduino-mk/Makefile << '569d5c63b963f28d96033288ef2ed8bf' X# New ports collection makefile for: arduino-mk X# Date created: 27 Feb 2011 X# Whom: Craig Leres <leres@ee.lbl.gov> X# X# $FreeBSD$ X# X XPORTNAME= arduino-mk XPORTVERSION= 0.4 XCATEGORIES= devel XMASTER_SITES= http://mjo.tc/atelier/2009/02/acli/ XDISTNAME= ${PORTNAME}_${PORTVERSION} X XMAINTAINER= leres@ee.lbl.gov XCOMMENT= Build Arduino sketches from the command line X X# Uses gmake at run time but not for building XRUN_DEPENDS= gmake:${PORTSDIR}/devel/gmake \ X avr-libc:${PORTSDIR}/devel/avr-libc X XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} X XNO_BUILD= yes X XPLIST_FILES= ${PORTNAME}/Arduino.mk XPLIST_DIRS= ${PORTNAME} X X.if !defined(NOPORTEXAMPLES) XPLIST_FILES+= ${EXAMPLESDIR_REL}/Makefile \ X ${EXAMPLESDIR_REL}/blink2.pde XPLIST_DIRS+= ${EXAMPLESDIR_REL} X.endif X Xdo-install: X ${MKDIR} ${PREFIX}/${PORTNAME} X ${INSTALL_DATA} ${WRKSRC}/Arduino.mk ${PREFIX}/${PORTNAME} X.if !defined(NOPORTEXAMPLES) X ${MKDIR} ${EXAMPLESDIR} X ${INSTALL_DATA} ${FILESDIR}/Makefile ${EXAMPLESDIR} X ${INSTALL_DATA} ${FILESDIR}/blink2.pde ${EXAMPLESDIR} X.endif X XLICENSE= LGPL21 X X.include <bsd.port.mk> 569d5c63b963f28d96033288ef2ed8bf echo x - arduino-mk/pkg-descr sed 's/^X//' >arduino-mk/pkg-descr << 'eb067cb6f699b1abb623b1b22a95dd07' XArduino from the command line X XThis is a makefile that makes it possible to build Arduino sketches Xwith gmake. An example sketch that is built from a makefile is Xinclude; it is installed in share/examples/arduino-mk X XWWW: http://mjo.tc/atelier/2009/02/arduino-cli.html eb067cb6f699b1abb623b1b22a95dd07 echo x - arduino-mk/distinfo sed 's/^X//' >arduino-mk/distinfo << '1348d74bd6af156be5aa4ec47e213d7a' XSHA256 (arduino-mk_0.4.tar.gz) = faa384a71c649d689b71241613227fc7b5f4c91920a002d0fb76ed47b269aae8 XSIZE (arduino-mk_0.4.tar.gz) = 13152 1348d74bd6af156be5aa4ec47e213d7a exit --------------060301010200070600090404 Content-Type: application/octet-stream; name="arduino-mk.shar.sig" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="arduino-mk.shar.sig" iEYEABECAAYFAk2XvksACgkQWxlAhAje3JskrwCggPzd4B7qhEuqWAifhascmd8h0O8Amwfu qPBz29il5E5r6HDcTqInz1mo --------------060301010200070600090404--
State Changed From-To: open->feedback can u please resend the pr seems that one is broken here.
State Changed From-To: feedback->closed patch appears broken. please resend and CC me
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > patch appears broken. please resend and CC me I just tried a cut-n-paste from: http://www.freebsd.org/cgi/query-pr.cgi?pr=156143 to a file and ran /bin/sh on it and it re-created all the files, undamaged. I used shar(1) to create it; how were you guys trying to unpack it? In the 9 months passed since I submitted this, arduino 1.0 came out and there have been two new versions of arduino-mk; please download an updated version (0.6) of the port from here: http://xse.com/leres/software/arduino/arduino-mk/arduino-mk-0.6.tar.gz http://xse.com/leres/software/arduino/arduino-mk/arduino-mk-0.6.tar.gz.asc Craig -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7+Y/cACgkQWxlAhAje3Jsq9wCgj/jMx2mQ5MCpESD2Cy4WfguY 4JIAnAogKvHXicZpeZLpfckSwQQd6vFX =1kZq -----END PGP SIGNATURE-----
State Changed From-To: closed->open Re-open, new feedback received
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I fixed a portlint warning, a bug in the conversion of .pde to .cpp files, updated the example sketch with more portable code and have posted a new tarchive: http://xse.com/leres/software/arduino/arduino-mk/arduino-mk-0.6-P1.tar.gz http://xse.com/leres/software/arduino/arduino-mk/arduino-mk-0.6-P1.tar.gz.asc Craig -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8u6qoACgkQWxlAhAje3JudEACfadfB8a7nBPdu+4MzvbarOWfl i0sAnAunqvk0+YEAZOdcQWpOkhhBBWFb =S3pm -----END PGP SIGNATURE-----
Responsible Changed From-To: freebsd-ports-bugs->scheidell I'll take it.
State Changed From-To: open->feedback ===> Patching for arduino-mk-0.6 98 ===> Applying FreeBSD patches for arduino-mk-0.6 99 cat: /usr/local/arduino/lib/version.txt: No such file or directory Please don't submit a whole new shar or tarball, can you post a patch to what you have to fix this?
Responsible Changed From-To: scheidell->freebsd-ports-bugs Back to pool
State Changed From-To: feedback->open No feedback
On 2/22/12 9:58 PM, Craig Leres wrote: > hot 53 % ls -l /usr/local/arduino/lib/version.txt > -rw-r--r-- 1 root wheel 3 Nov 28 16:56 > /usr/local/arduino/lib/version.txt > > I don't see any obvious problems and am not sure how to debug this. > > Craig build is done in a 'tinderbox' (you can use redports if you like) it starts with a clean 'jail', adds all the dependencies in BUILD_DEPENDS and LIB_DEPENDS, and then tries to build port, create a package, and then remove the package and checks for left over 'parts' it seems to fail, because arduino-mk needs the version.txt to PATCH, way ahead of the 'build' side. (you can deinstall arduino, make sure version.txt is missing, then in arduino-mk, do a: make patch to solve this, you add something like: PATCH_DEPENDS= ${LOCALBASE}/arduino/lib/version.txt:${PORTSDIR}/devel/arduino Q: you have arduino as a BUILD_DEPENDS, which does not mean that it is automatically a RUN_DEPENDS, did you mean for this to be needed to RUN arduino-mk also? if so, I can add it to RUN_DEPENDS. I have done both of the above, but you still have a problem with the port. you specified p5-YAML:${PORTSDIR}/textproc/p5-YAML p5-YAML is not an executable, (what happens when you type 'p5-YAML' ? does it run?) you need something like: ${SITE_PERL}/YAML/Any.pm:${PORTSDIR}/textproc/p5-YAML which I have added. based on the p5-YAML issue, there is actually no way this port would have built, unless you set the variable "FORCE_PKG_REGISTER" in your environment or the "make install" command line. I have added all of these above, and will be committing this new port shortly. You have another new port pending, my suggestion: ask that the existing pr for that new port be closed, start with a clean slate. join redports, test your new port with redports (does it depend on this one? might take 4 hours for redports to sync mirrors) once you know you have it right, use 'send-pr -a' (attachment) and open a new pr, with a proper shar in it. -- Michael Scheidell, CTO >*| * SECNAP Network Security Corporation d: +1.561.948.2259 w: http://people.freebsd.org/~scheidell
State Changed From-To: open->closed New port added with major changes to Makefile. Please update your local copy.
scheidell 2012-02-23 14:20:36 UTC FreeBSD ports repository Modified files: devel Makefile Added files: devel/arduino-mk Makefile distinfo pkg-descr devel/arduino-mk/files Makefile blink2.pde patch-Arduino.mk version.sh Log: Add port devel/arduino-mk: Arduino from the command line This is a makefile written by Martin Atelier that makes it possible to build Arduino sketches with gmake. An example sketch and Makefile; it is installed in share/examples/arduino-mk PR: ports/156143 Submitted by: Craig Leres <leres@ee.lbl.gov> (maintainer) Approved by: gabor (mentor, implicit) Feature safe: yes Revision Changes Path 1.4872 +1 -0 ports/devel/Makefile 1.1 +60 -0 ports/devel/arduino-mk/Makefile (new) 1.1 +2 -0 ports/devel/arduino-mk/distinfo (new) 1.1 +16 -0 ports/devel/arduino-mk/files/Makefile (new) 1.1 +30 -0 ports/devel/arduino-mk/files/blink2.pde (new) 1.1 +111 -0 ports/devel/arduino-mk/files/patch-Arduino.mk (new) 1.1 +23 -0 ports/devel/arduino-mk/files/version.sh (new) 1.1 +7 -0 ports/devel/arduino-mk/pkg-descr (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Responsible Changed From-To: freebsd-ports-bugs->scheidell Change to me since I committed last.