[Raspberry Pi] Build up toolchain in ubuntu 10.04
Install package
sudo apt-get install make git-core ncurses-dev
Download lastest toolchain
git clone https://github.com/raspberrypi/tools.git
remote: Reusing existing pack: 17273, done.
remote: Total 17273 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (17273/17273), 311.52 MiB | 343 KiB/s, done.
Resolving deltas: 100% (11698/11698), done.
Checking out files: 100% (15860/15860), done.
Edit .bashr
vi ~/.bashrc
export PATH=$HOME/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
write a simple program to hello.c
vi hello.c
#include
int main()
{
printf(“hello, world\n”);
return 0;
}
Compile this program
arm-linux-gnueabihf-gcc hello.c -o hello-arm
Send hello-arm to Board then excute program.
Show “hello, world” mean successfully.
Reference
1.Development Environment for the Raspberry Pi using a Cross Compiling Toolchain and Eclipse
1.[進階] 安裝 Raspberry Pi 的 Toolchain
0 意見:
張貼留言