Random Ranting (196) · Gadgets & Tech (15) · Anime & Otaku (11) · Watches & Horology (46) · Movies & TV (6) · Photography (3)



Latest Posts Recent Comments Comrades


My blog is worth $4,516.32.
How much is your blog worth?


AVR Toolchain on OS X

UPDATE: Get the AVR MacPack instead of running the script below here.

AVR MacPack is a development environment for Atmel’s AVR microcontrollers running on Apple’s Mac OS X, similar to WinAVR for Windows. It consists of the GNU compiler suite, a C library for the AVR, the AVRDUDE uploader and several other useful tools.

Here is the important bit from the modified script,

#
#	13/11/2006
#	Michael de Silva
#	mike@bsodmike.com
#
#	This is a modified version of the script located at,
#	http://www.harbaum.org/till/macavr/index.html
#
#	Initially this script would download the files from the
#	two repositories and proceed to compile the toolchain.
#	However, I experienced problems with this script in its
#	original condition, hence this update.
#
#	This script now requires the user to download the source
#	packages as follows,
#
#	ftp://ftp.gnu.org/pub/gnu
#	-binutils
#	-gcc
#	-gdb
#
#	http://savannah.nongnu.org/download
#	-avr-libc
#	-uisp
#	-avrdude
#
#	...and place these in ~/src.  The script will halt if these
#	are not located.
#
#	The 'toolchain definitions' listed below should match the
#	versions of the downloaded files.

# 	updated for latest versions on 13 November 2006
BINUTILS=binutils-2.17
BINUTILS_PACKAGE=${BINUTILS}.tar.bz2

GCC=gcc-4.1.1
GCC_PACKAGE=${GCC}.tar.bz2

GDB=gdb-6.5
GDB_PACKAGE=${GDB}.tar.bz2

AVRLIBC=avr-libc-1.4.5
AVRLIBC_PACKAGE=${AVRLIBC}.tar.bz2

UISP=uisp-20050207
UISP_PACKAGE=${UISP}.tar.gz

AVRDUDE=avrdude-5.2
AVRDUDE_PACKAGE=${AVRDUDE}.tar.gz

#	Proceed to install,
#		-wget
#		-bison
#		-flex
#
#	...by utilising the following command-line,
#	$ sudo fink install wget bison flex

And after running this script I had this output confirming what was installed,

---------------------------------------------------------------------------
These are the current installed versions of the avr tool chain:

--binutils--
GNU ld version 2.17
GNU assembler 2.17

--gcc--
4.1.1

--gdb--
GNU gdb 6.5

--avrlibc--
4.1.1

--uisp--
uisp version 20050207

--avrdude--
avrdude: Version 5.2, compiled on Nov 13 2006 at 09:13:01
--------------------------------------------------------------------------------
Make sure to have /usr/local/avr/bin in your PATH
You can do this by adding the following
line to your /Users/michaeldesilva/.bashrc file:
    export PATH=$PATH:/usr/local/avr/bin

And for manpages, add the following line:
    export MANPATH=$MANPATH:/usr/local/avr/man

--------------------------------------------------------------------------------

This script maybe downloaded here.


Google Search


RSS/Meta Articles