Forums: Open Discussion (Thread #6757)

eCosコンパイルについて (2005-01-09 19:00 by Anonymous #12479)

先日、毎日コミュニケーションズから発刊された「オープンソース組み込みシステムeCos」を見てeCosを秋月H8-3069ネットワークボードで動作させようとしているものです。

佐藤様が記述致しました文書を参考にさせて頂き、ターゲットクロス開発環境をCygwin上に作成しました。
gcc 3.1.1
binutils 2.12.1
gdb 5.2.1 (gdb/h8300_tdep.cに一部で宣言より前に実行文があったので修正が必要?)

cvs で最新の eCos スナップを取得し ecosconfig で aki3068net のツリーを作成しメイクしますが、 libsupc++.a がないと ld が言います。

どうもFAQのようなので色々な文書を検索したのですが、みなさんが具体的にどのように対処したのかがわかりませんでした。

大変初歩的な部分で申し訳ないのですが御助言頂ければ幸いです。

Reply to #12479×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: eCosコンパイルについて (2005-01-09 23:48 by ysato #12482)

gcc-3.1のころはlibsupc++.aが無かったような気がするので、
単純にlinkする対象から外すだけでいいと思います。

具体的には、ソースツリーにある install/lib/target.ld の
GROUP(libtarget.a libgcc.a libsupc++.a)

GROUP(libtarget.a libgcc.a)
にすれば見に行かなくなります。
Reply to #12479

Reply to #12482×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

ありがとうございます。 (2005-01-10 09:24 by Anonymous #12489)

コンパイル可能になりました。

h8300-elf-objcopy で srec に変換し書き込むところまで行きました。ありがとうございました。

でも、今度は redboot でシリアルコンソールからの入力を受け付けません。ブートメッセージを見ると RAM のアドレスがよく見る文書と異なるようです。

直ぐに聞いてしまうと忘れてしまうのでこれは自分で少しはまることにします。動けばきっと魅力的な環境です。今後ともよろしくお願い致します。
Reply to #12482

Reply to #12489×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: eCosコンパイルについて (2005-05-18 01:15 by kikuchan #14241)

菊池と申します。同じ件でハマってしまっております。

install/lib/target.ldのlibsupc++.aを削除すると
下記のようなエラーメッセーが出てしまいます。

/ecos-c/cygwin/home/M/proj/ecos-work/untitled_install/lib/libtarget.a(infra_diag.o): In function `.LM38':
infra_diag.o(.text+0x22b): undefined reference to `___umoddi3'
/ecos-c/cygwin/home/M/proj/ecos-work/untitled_install/lib/libtarget.a(infra_diag.o): In function `.LM40':
(・・・以下略)

ツールチェィンを作成するとき、ecosのホームページの
http://ecos.sourceware.org/build-toolchain.html
にしたがってnewlibを使う環境にはしていますが、
同じような状況になった方はいらしゃらないでしょうか?

ちなみにこのlibsupc++.aは
ecos-2.0\packages\hal\h8300\h8300h\v2_0\src\h8300_h8300h.ld
の中の
#if (__GNUC__ >= 3)
GROUP(libtarget.a libgcc.a libsupc++.a)
#else
GROUP(libtarget.a libgcc.a)
#endif
のコメントアウトでtarget.ldに反映されるので
ここを直してみたりもしたのですが、やはり同様
のエラーが出ています。

ソースはCVSから取得した最新のもの、ツールチェィン
はさきほどのHPの手順にecoscentricのパッチを当てています。
http://www.ecoscentric.com/devzone/h8300.shtml
どなたかお心あたりのあるかた、コメント頂ければ幸いです。
Reply to #12479

Reply to #14241×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: eCosコンパイルについて (2005-05-19 21:50 by ysato #14273)

これはlibsupc++.aとは関係なくて、libgcc.aの問題です。
sourceware.orgの説明は古いので、ここにあるgcc-3.3用のパッチを試してみてください。
作り方は同じです。
Reply to #14241

Reply to #14273×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: eCosコンパイルについて (2005-05-21 13:27 by kikuchan #14300)

アドバイスありがとうございました。GCC3.3.2でも
ご指摘のパッチを当てただけでは同じエラーが出ています。
(前略)
/gnutools/lib/gcc-lib/h8300-elf/3.3.2/../../../../h8300-elf/bin/ld: warning: no memory region specified for section .bss.channels'
/ecos-c/cygwin/home/M/proj/ecos-work/untitled_install/lib/libtarget.a(infra_diag
.o): In function `.LM31':
infra_diag.o(.text+0x3f9): undefined reference to `___umoddi3'
/ecos-c/cygwin/home/M/proj/ecos-work/untitled_install/lib/libtarget.a(infra_diag
.o): In function `.LM63':
infra_diag.o(.text+0x43f): undefined reference to `___udivdi3'
/ecos-c/cygwin/home/M/proj/ecos-work/untitled_install/lib/libtarget.a(infra_diag
.o): In function `.LM117':
(後略)
もう少し調べてみます。
Reply to #14273

Reply to #14300×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login