User Tools

Site Tools


build_mac

This is an old revision of the document!


Build environment on Mac OS X

1. Compiler

Using Mac OS X:
The CodeSourcery G++ package provides a GNU cross-compiler toolchain for ARM. The Mac OS X version is not distributed by CodeSourcery in binary form, but can be built from source code, or mainline gcc for arm-none-eabi can be installed via MacPorts.

Solution 1

  • This explains how to build the tool chain on a Mac: Git project: jsnyder / arm-eabi-toolchain
  • You will probably want to add this line to /etc/bashrc, so that the tools are always accessible when you open a new Terminal:
    export PATH=$HOME/arm-cs-tools/bin:$PATH

Solution 2

  • Install MacPorts
  • Don't forget
    sudo port sync

    (port is relatively new)

  • Install the port arm-none-eabi-gcc:
    sudo port install arm-none-eabi-gcc

Solution 3

  • Install Homebrew
  • Import the formulae for ppl, cloog-ppl and arm-none-eabi-gcc from here (overwrite the existing ppl formula, since cloog-ppl depends on the older one from this repository)
  • Install the formula arm-none-eabi-gcc:
    brew install arm-none-eabi-gcc
Another option: Installing Ubuntu Linux in a VirtualBox:

2. Source

3. Build

4. Deploy

Bring the r0ket into ISP-Mode: e.g. by using Method 1 (up to 30 seconds, but works always)

  • Power off r0ket
  • Press and hold button “Left”, power r0ket on
  • Connect r0ket via USB

Mac OS X will show a “CRP DISABLD” USB device.

Using the Mac OS X Terminal:
cp firmware.bin /Volumes/CRP\ DISABLD/

Note: Copying the firmware.bin over to the device in the Mac OS X Finder does not work.

Using the Ubunto Terminal in a VirtualBox:

Share the directory “CRP DISABLD” on the Mac OS X host with VirtualBox, e.g. using the name r0flash - it will be available on the Ubuntu guest at /media/sf_r0flash.

Copy the file firmware.bin to that directory:

cp firmware.bin /media/sf_r0flash/

9. Prepare a brand new r0ket

See main Build article (scoll to the bottom), or:

Bring the r0ket into ISP-Mode: e.g. by using Method 1 (up to 30 seconds, but works always)

  • Power off r0ket
  • Press and hold button “Left”, power r0ket on
  • Connect r0ket via USB

If you want to start from scratch:

rm /Volumes/CRP2\ ENABLD/*

Install the “initial” formatting firmware:

cd firmware
make APP=initial
cp firmware.bin /Volumes/CRP\ DISABLD/firmware.bin

The Data Flash will be formatted. Now the r0ket will present a flash file system called “NO NAME” over USB. Install the l0dables:

cd l0dable
make
cp *.c0d /Volumes/NO\ NAME/
cp *.int /Volumes/NO\ NAME/
cp *.nik /Volumes/NO\ NAME/
cd ..

Now install the Camp firmware (“final”):

make APP=final
cp firmware.bin /Volumes/CRP2\ ENABLD/firmware.bin

Example commands that worked for me

MacOSX, Lion, Up-to-date MacPorts - DanBUK

git clone git://github.com/r0ket/r0ket.git
cd r0ket
git checkout c583ddc7e3b6ecc2cdb94fe0a0474d52bcbb220b
cp SECRETS SECRETS.release
# Edit SECRETS.release
cd firmware
./release-all
make APP=initial
cp firmware.bin ../release/initial.bin
cd ../release/
# ISP Mode
mount | grep "CRP DISABLD"
# /dev/disk3      32Ki   32Ki    0Bi   100%    /Volumes/CRP DISABLD
cp initial.bin /Volumes/CRP\ DISABLD/firmware.bin
diskutil unmount "CRP DISABLD"
# power off
# power on
mount | grep "NO NAME"
# /dev/disk3 on /Volumes/NO NAME (msdos, local, nodev, nosuid, noowners)
# If you want to start completely empty:
# rm -Rf /Volumes/NO\ NAME/*
cp files/*.c0d /Volumes/NO\ NAME/
cp files/*.int /Volumes/NO\ NAME/
cp files/*.nik /Volumes/NO\ NAME/
diskutil unmount "NO NAME"
# press button (joypad middle)
mount | grep "CRP2 ENABLD"
# /dev/disk3 on /Volumes/CRP2 ENABLD (msdos, local, nodev, nosuid, noowners)
cp final.bin /Volumes/CRP2\ ENABLD/firmware.bin
diskutil eject "CRP2 ENABLD"
# power off
# power on
# Enjoy!
build_mac.1312991860.txt.gz · Last modified: by danbuk

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki