Skip to content

Instantly share code, notes, and snippets.

@y-yu
Created April 20, 2013 07:54
Show Gist options
  • Save y-yu/5425177 to your computer and use it in GitHub Desktop.
Save y-yu/5425177 to your computer and use it in GitHub Desktop.
GBA for Homebrew

HomebrewでGBA開発

主専攻実験のために、GBAを始めました。

homebrewの準備

ARM向けGCC

本家brewにはないのでサードパーティの奴を持ってくる。

https://github.com/pdixon/homebrew-arm

持ってくるには、

$ brew tap pdixon/arm

とすればよい。

ARM向けbinutils

いろいろ入っているみたいで、 これもないとコンパイル出来ない。 これは、pdixon/armに入っているのでこれを使う。

newlib

これも必要みたい。 わけ分からん奴を持ってくる。

https://github.com/darconeous/homebrew-embedded

こいつもbrew tapする。

$ brew tap darconeous/embedded

optusb

授業のフォルダ(/home/lecture/kumikomi/)のあたりから持ってくる。 あるいは僕がコンパイルしたバイナリを使う。

http://t.co/OVcRQdGSQ1

インストールなど

これで行けるはず。

$ brew install arm-none-eabi-gcc
$ brew install arm-none-eabi-binutils
$ brew install newlib

コンパイルなど

先生の奴とコマンド名が違うので、適宜読み変える。 例えば、

% cpp-arm rgb.s | as-arm -o rgb.o -
% ld-arm -o rgb.out -T gcc.ls rgb.o
% objcopy-arm -O binary rgb.out rgb.bin

は、

% arm-none-eabi-cpp rgb.s | arm-none-eabi-as -o rgb.o -
% arm-none-eabi-ld -o rgb.out -T gcc.ls rgb.o
% arm-none-eabi-objcopy -O binary rgb.out rgb.bin

と読みかえる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment