PC版 SYSLAB blog  http://syslab.asablo.jp/blog/......

FRK-FM3 (2) Keil μVision3 + GCC の準備 (2)
2012-03-04


禺画像]
さて、project を作成してコンパイルしてみよう。

プロジェクト名は mb9bf61xt_template オリジナルのままでよいだろう。
いつものようにデバイスを選択して(MB9BF618T)プロジェクトにファイルを追加する。
追加するファイルは
startup_mb9bf61x.s
main.c
system_mb9bf61x.c
次に Options for Target の設定、先ずは出力ディレクトリを指定する。 禺画像]

続いて CCタブ、注意する点は Include Paths に
C:/Keil/ARM/CMSIS/Include/
を追加する事、 μVision4 では必要ないが μVision3 には必要だ。 禺画像]

同様にアセンブラでも CMSIS ディレクトリを Include Paths に含める。 禺画像]

最後はリンカーの設定 禺画像]

そしてコンパイル。
あれ、エラーが出てリンクできない。
Build target 'MB9BF618T_Release'
compiling system_mb9bf61x.c...
compiling main.c...
../source/main.c(44): warning: return type of 'main' is not 'int'
assembling startup_mb9bf61x.s...
linking...
c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-init.o): In function `__libc_init_array':
init.c:(.text+0x38): undefined reference to `_init'
collect2: ld returned 1 exit status
Target not created
それではと 以前コンパイル動作確認済みのプロジェクト(LPC1114用)をコンパイルしてみる。
同じエラーだ。
はて...

なぜ??

環境:Keil μVision3 + GCC
[ARM]
[マイコン]

コメント(全2件)
コメントをする


記事を書く
powered by ASAHIネット