PS3Hax Network - Playstation 3 Hacks and Mods

PS3Hax Network - Playstation 3 Hacks and Mods (http://www.ps3hax.net/forums.php)
-   PS3 | PSGroove (http://www.ps3hax.net/forumdisplay.php?f=125)
-   -   Atmel AVR SDK for Mac OS X (http://www.ps3hax.net/showthread.php?t=13425)

ScottishCpt 09-17-2010 12:22 PM

Atmel AVR SDK for Mac OS X
 
Greetings to all.

Figured I'd post this, maybe someone else has a use for it.

This is the SDK I use to build my own hex files from the psgroove source, for Atmel's 8-bit AVR MCUs. You will require a modern day Macintosh running 10.6 (Core 2 Duo processor or higher, since this is x86_64 strictly), and any recent copy of the Xcode Developer tools to run it (since make, autoconf, automake, aclocal, etc aren't included here- these come from the Xcode devtools package, which is free from Apple). Either the OS X or iOS version of Xcode will work.

Chances are, if you're looking to compile your own AVR code, you already have some variant of Xcode installed.

How this works is really simple. Double click the AVR8_SDK.dmg file, and it will mount and show up on your desktop and in the finder as usual. Navigate to the "Applications" directory inside the mounted disk image volume, and double-click on "SDK Terminal". Terminal.app should open up, and you'll see two lines like this appear:

Adding /Volumes/AVR8_SDK/usr/bin to PATH...
Adding /Volumes/AVR8_SDK/usr/sbin to PATH...

That's it! Now you're good to go. You should have full access to all the avr-gcc related stuff from the command line, as well as access to avarice (AVR GDB debugger plugin), avrdude, and dfu-programmer. Just change directory to your AVR project and type `make`. In the case of psgroove, it will immediately start compiling and you'll have a *.hex file in about 15 seconds flat, which you can write to any AT90USB (or others?) equipped USB board using either avrdude or dfu-programmer. Make sure you've changed the psgroove makefile so your MCU, BOARD, and CPU clock are all setup per whatever AVR 'board you're compiling for (read the psgroove readme for more details).

When you're done with the SDK, just eject the disk volume. There is no installation required and the SDK leaves zero traces of it's presence when unmounted. You can use it on any Macintosh that meets the above requirements. Just mount the dmg when you need the SDK, then launch "SDK Terminal".

Here's a list of everything you get (in compiled, operational form):

avarice-2.10
avrdude-5.10
avr-libc-1.7.0
binutils-2.20
dfu-programmer-0.5.2
gcc-4.5.1
gdb-7.2
gmp-5.0.1
libusb-0.1.12
mpc-0.8.2
mpfr-2.4.2

Everything was compiled by hand targeting the 8-bit AVR platform(s). You do not need to override CPPFLAGS or LDFLAGS when building AVR projects that include files from the included avr-libc library. The C preprocessor is hardcoded (this happens when you're running `configure` on GCC) to look in the relevant directories for any headers that you might have included via #include <avr/somefile.h>.

Build log of all commands used to create this SDK is included in the Documents folder as "Build Log.txt" (creative name, eh?).

And before anyone else asks "But why would you do this?", the answer is simple- I hate MacPorts/Fink/DarwinPorts. Especially the ones that want sudo. They're messy and spam redundant crap everywhere in /opt or /usr/local (or wherever), and I can't stand non-portable stuff like that. Nor can I trust them not to @#$% something up with sudo. I like to have my toolchains available on-hand, which means in my private SVN server, so I can pull them down and use them on any of my computers whenever required (and always have the latest version of that SDK disk image as a result), without waiting for MacPorts/Fink/DarwinPorts to pull down 500mb of random garbage and compile it all first.

Link (~36MB dmg file):
http://www.sendspace.com/file/4c6blx

I'll try and answer any questions you might have. I cannot, however, teach you how to use `make` or what 'avr-gcc' is or how to use `dfu-programmer` or `avrdude`. You should already know that if you want to compile your own hex files. Likewise, man will automatically retrieve the relevant man pages if you've launched a Terminal.app window by double-clicking on "SDK Terminal", so you can always type "man dfu-programmer" or "man avrdude" to pull up the relevant manuals.

Latest Teensy programmer is also included, found in the same folder you found "SDK Terminal". There is also some additional documentation in "Documents", mostly for avrdude and AVR Libc.

Bon appetite!

-SC


All times are GMT -5. The time now is 07:56 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.