by on osx-avr

I have still not released an equivalent to the early summer release of WinAvr however people seem to be getting along pretty well with the January release. I am moving and I am once again without a functioning Intel system so I will probably not have a new release until thanksgiving. In the mean time I am working on automating a ports to packages script which will be used to expedite the process of building the next release.

by on osx-avr

Tack #1

Write script to download and patch FreeBSD sources.

#!/bin/bash
function getfiles ()
{
for fname in $FILES ; do
echo "GETTING ----- $fname -----"
case ${fname##*.} in
  bz2)
     echo "GETTING ----- $fname ----- using bunzip "
     curl ftp://ftp2.freebsd.org/pub/FreeBSD/distfiles/$fname 
      |bunzip2 -dc|tar -xf -
     ;;
  gz|tgz)
     echo "GETTING ----- $fname ----- using gunzip "
     curl ftp://ftp2.freebsd.org/pub/FreeBSD/distfiles/$fname 
      |gzip -dc|tar -xf -
     ;;
esac
done

}

function patchfiles () {
PORTNAME=`cat $port/Makefile |grep ^PORTNAME|cut -f2`
PORTVERSION=`cat $port/Makefile |grep ^PORTVERSION|cut -f2`
ocd=`pwd`
cd $PORTNAME-$PORTVERSION*
echo "-------- PATCHING HERE `pwd`  ------"
for p in $ocd/$port/files/patch* ; do
   patch -p0 -u <$p
done
cd $ocd

}

function makeit () {
PREFIX=/usr/local
LOCALBASE=/usr/local
CONFIGURE_ARGS=`cat $port/Makefile |grep ^CONFIGURE_ARGS|sed 's/^CONFIGURE_ARGS=t//'`
MAKE_ARGS=`cat $port/Makefile |grep ^MAKE_ARGS|sed 's/^MAKE_ARGS=t//'`
PORTNAME=`cat $port/Makefile |grep ^PORTNAME|cut -f2`
PORTVERSION=`cat $port/Makefile |grep ^PORTVERSION|cut -f2`
ocd=`pwd`
cd $PORTNAME-$PORTVERSION*
echo "-------- CONFIGURING HERE `pwd`  ------"
echo "$CONFIGURE_ENV ./configure $CONFIGURE_ARGS "
export `cat $port/Makefile |grep ^CONFIGURE_ENV|sed 's/t/ /g'|sed 's/^CONFIGURE_ENV=//'`
./configure $CONFIGURE_ARGS >config.out
echo "$MAKE_ENV make $MAKE_FLAGS && $MAKE_ENV make $MAKE_FLAGS install"
export `cat $port/Makefile |grep ^MAKE_ENV|sed 's/t/ /g'|sed 's/^MAKE_ENV=//'`
make $MAKE_FLAGS && make $MAKE_FLAGS install
# make $MAKE_FLAGS distclean
cd $ocd
}

for port in avr-binutils avr-gcc avr-libc avr-gdb avarice simulavr ; do
curl  "http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/$port/$port.tar.gz?tarball=1"|gzip -dc|tar -xvf -
export FILES=`grep MD5 $port/distinfo|cut -d( -f2|cut -d) -f1`
getfiles "$FILES"
patchfiles "$port" "$FILES"
makeit "$port" "$FILES"
done

Tack #2

Work with the ports tree, bsdmake and the .mk files to try to get the download, build and packaging to work as they do in the ports.

by on electronics

Two months ago fellow PARTs person and DorkbotPDXer Mark Gross gave me a $100 gift certificate from Sunstone Circuits from last years PDXBot. Sunstone circuits is a local (oregon) board fabrication company who makes a windows based design to board solution called pcb123.  Since i am Mac based I had been putting off the board design until the last possible minute. I had several ideas which I have been laying out and fabbing by hand and a lot of other things on my plate. I had planned to select a design and work on the boards the week of after the arduno cult indoctrination but after spending the weekend frantically building 27 ftdi based boards and then finding that the design in process needed to be simplified if it was to be unleased on the general public. I instead focused on learning cocoa and leaving any new hardware design on the backburner.  I did spend a few hours redesigning my ftdi based boards and then used that work to make a single purpose board based on the benito 5 programmer that I built and have been developing with monty goodson of bittybot.   

by on osx-avr

I have been really busy. So of course I have to start all over from srcatch. If you build gdb for either avarice or simulavr along with avra then scripting this environment goes out the obscening window. As usual however I start with the distfiles and the ports. In general the process goes like

  1. grab the “files” for the port
  2. grab the ftp://ftpx.freebsd.org/ports/disfiles/zzzz referenced in the files/<zzzz>/distinfo file (this could be automated)
  3. unpack and apply all of the patches in <zzzz>/files/patch-*. (except for the goober that I have to chase down with Joerge in gdb this could be automated).
  4. Then pull out the config args and the other compilation arguments from the make file. (Except that every other port has this done slightly differently this might be automatable)
  5. configure && make && make install (at this point the process becomes adaptive and frustraiting because the software is disparate and of varying quality, some of it requires you to upgrade Xcode (Avarice), Some of it wont obcening compile at all (Simulavr), and some of it is not as broken as it used to be but still doesnt have any of the new devices (avra)).
    1. So deal with it and a few days later…
  6. reinstall into a staging directory
  7. find all of the bin directories and run strip on the executables
  8. copy and adapt the package maker files to the new versions.
  9. repackage them using PackageMaker (this is automatable)
  10. make a folder
  11. build a readwrite uncompressed dmg from the folder
  12. mount dmg ajust the background and layout of the folder.
  13. test mount and install.
  14. convert dmg to compressed dmg.
  15. repeat for intel.
  16. release and pray.

by on Dorkbot

This just went into a second rev so the initial boards are going for super cheep. I plan to buy some on monday.

http://www.nkcelectronics.com/arduino-runtime-board-pcb-.html

by on Dorkbot

I have been working on stripping the arduino down to something that should cost about $6 by pulling the power and the serial off of the board.
The pic above is a dip version. If I went to olimex I could probably get the board cost to about 6 bucks for the board. So I thought about smt and eliminating the headers (which cost about a buck all told) This is where I am heading but it is not quite done.

This would be an 1″x1″ square with stk500 compatible ports on their sides like a card edge. You could solder directly or you could solder the headers on them. The power and the serial are consolidated into a header along with the reset. This will probably wind up reworked slightly.

If you want to monkey with it or finish the routing the eagle files are at.
http://www.digithink.com/embedded/hardware/gen-z/smt.brd
http://www.digithink.com/embedded/hardware/gen-z/smt.sch

by on Dorkbot

void setup(void)
{
...
TCCR1A = 0×00; // sets timer control bits to PWM Phase and Frequency Correct mode
TCCR1B = 0×12; // sets timer control bits to Prescaler N = 8
ICR1 = 0×07d0; // Upper Timer Limit = 2000 (in hex) equals 2ms
}

//after which you can analogWrite to pins 9 and 10

by on Dorkbot

Amazing link.

windcatcher http://www.answers.com/topic/windcatcher via alexis turner

Not sure how to comment.
(still Not entirely sold on the delic.i.urwierdness.)

by on Dorkbot

Feeling those doubles today.

Links from conversations:

open JTAG: http://openocd.berlios.de/web/

LED BALL: http://ledeffects.net/pages/?id=16

HArd DRive Speakers: http://www.afrotechmods.com/cheap/hdspeakers/hdspeakers.htm
, http://home.insightbb.com/~stephenwmoore/Speakers/Hard_Drive_Speaker.htm