上野家のホームページ
ナーマル,マリン,ココ
[
新規
|
一覧
|
検索
|
最新
|
ヘルプ
]
開発/toolchain/ARM
をテンプレートにして作成
資料室
開発/toolchain/ARM をテンプレートにして作成
[
差分
|
バックアップ
|
リロード
]
[ ]
開始行:
#topicpath
#contents
* ARM用GCC
[[ARM(Advanced RISC Machines)>http://www.arm.com/]]と呼...
身近なところではほとんどのスマホに搭載されているCPUはARM...
Raspberry PiでもARMが使われています。
WindowsマシンでRaspberry pi用のプログラムを開発する場合,...
このようなtoolchainに[[GNU C Compiler Collection>https://...
** Raspberry Pi用 ARM GCCをインストール
SysProgsの[[Windows toolchain for Raspberry Pi>http://gnu...
ダウンロードしたファイルをダブルクリックしてインストール。~
デフォルトでC:\SysGCC\Raspberryにインストールされ,C:\Sys...
このツールチェーン以外にも,ARM用ツールチェーンはいろいろ...
[[armDevelopper>https://developer.arm.com/downloads/-/gnu...
* サンプルプログラムを作成してみる
HelloWorld.cppのソースファイルを作成する。
#include <cstdio>
int add(int x, int y) {
return x + y;
}
int main() {
int a = 5;
int b = 4;
int c = add(a, b);
std::printf("Hello World %d\n", c);
return 0;
}
Makefileを以下の内容で作成する。
CROSS_COMPILE=arm-linux-gnueabihf-
TARGET=HelloWorld
all: $(TARGET)
$(TARGET): HelloWorld.cpp
$(CROSS_COMPILE)gcc -O0 -g -o $@ $<
clean:
rm -rf $(TARGET) *.o
rebuild: clean $(TARGET)
** コンパイルしてみる
> make
> ls -la
total 17
drwxr-xr-x 2 yueno Administrators 4096 Mar 17 16:50 .
drwxr-xr-x 3 yueno Administrators 0 Mar 17 16:46 ..
-rw-r--r-- 1 yueno Administrators 10324 Mar 17 16:50 Hel...
-rw-r--r-- 1 yueno Administrators 179 Mar 17 16:47 Hel...
-rw-r--r-- 1 yueno Administrators 203 Mar 17 16:50 Mak...
HelloWorldという実行ファイルが無事作成された。
出来た実行ファイルHelloWorldをRaspberry piにコピーして実...
終了行:
#topicpath
#contents
* ARM用GCC
[[ARM(Advanced RISC Machines)>http://www.arm.com/]]と呼...
身近なところではほとんどのスマホに搭載されているCPUはARM...
Raspberry PiでもARMが使われています。
WindowsマシンでRaspberry pi用のプログラムを開発する場合,...
このようなtoolchainに[[GNU C Compiler Collection>https://...
** Raspberry Pi用 ARM GCCをインストール
SysProgsの[[Windows toolchain for Raspberry Pi>http://gnu...
ダウンロードしたファイルをダブルクリックしてインストール。~
デフォルトでC:\SysGCC\Raspberryにインストールされ,C:\Sys...
このツールチェーン以外にも,ARM用ツールチェーンはいろいろ...
[[armDevelopper>https://developer.arm.com/downloads/-/gnu...
* サンプルプログラムを作成してみる
HelloWorld.cppのソースファイルを作成する。
#include <cstdio>
int add(int x, int y) {
return x + y;
}
int main() {
int a = 5;
int b = 4;
int c = add(a, b);
std::printf("Hello World %d\n", c);
return 0;
}
Makefileを以下の内容で作成する。
CROSS_COMPILE=arm-linux-gnueabihf-
TARGET=HelloWorld
all: $(TARGET)
$(TARGET): HelloWorld.cpp
$(CROSS_COMPILE)gcc -O0 -g -o $@ $<
clean:
rm -rf $(TARGET) *.o
rebuild: clean $(TARGET)
** コンパイルしてみる
> make
> ls -la
total 17
drwxr-xr-x 2 yueno Administrators 4096 Mar 17 16:50 .
drwxr-xr-x 3 yueno Administrators 0 Mar 17 16:46 ..
-rw-r--r-- 1 yueno Administrators 10324 Mar 17 16:50 Hel...
-rw-r--r-- 1 yueno Administrators 179 Mar 17 16:47 Hel...
-rw-r--r-- 1 yueno Administrators 203 Mar 17 16:50 Mak...
HelloWorldという実行ファイルが無事作成された。
出来た実行ファイルHelloWorldをRaspberry piにコピーして実...
ページ名:
Counter: 0, today: 0, yesterday: 0
Copyright©2008 Yuji Ueno All Rights Reserved.
ログイン
ユーザ名:
パスワード:
IDとパスワードを記憶
パスワード紛失
メインメニュー
ホーム
でぶlog
資料室
最新ページ一覧
全ページ一覧
ヘルプ
フォーラム
お問い合わせ