nakamu / serio-pj

Automatically exported from code.google.com/p/serio-pj
0 stars 0 forks source link

オフラインコンパイル mbed-OfflineCompile #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
mbedのオフラインコンパイルを行うスレ.

【ゴール】
無事にオフラインコンパイルができること

Original issue reported on code.google.com by hidekiyamada3452 on 13 May 2013 at 12:14

GoogleCodeExporter commented 9 years ago
【現状】

手順的には,以下でいけるらしい.
arm-none-eabiをmacports経由でインストール(makeレベルから入れ�
��いとダメ?)

(1) 
mbedのoffline-toolchainsオブジェクトを,対象のコードにインポ�
��トして,従来のmbedオブジェクトは削除.
http://mbed.org/handbook/Exporting-to-offline-toolchains
(2) GCC (Code Sourcery)でエクスポート
(3) "make"コマンドの実行.(cs-makeは使わない)

山田のの環境では,以下の重複エラー.
> newlib/libc/sys/arm/syscalls.c:230: `_read' 
が重複して定義されています.

newlibのコンパイルを"--disable-newlib-supplied-syscalls"にすればう��
�くいくらしい.
gcc-makeinstallは,さらに嵌りそうだからソースコンパイルし��
�くない(震え声)し,(josephさんところでは,arm-noneをmakei
nstallしてたらおとなしくやるが...macportsという話をこの
前聞いた記憶があるので,環境を再確認したいっす.)

まずは,gccのバージョンを教えて下さい.>josephさん.

Original comment by hidekiyamada3452 on 13 May 2013 at 12:21

GoogleCodeExporter commented 9 years ago
makeinstallというのは,sourceレベルからconfigureしてmake, 
makeinstallのことね.

Original comment by hidekiyamada3452 on 13 May 2013 at 12:23

GoogleCodeExporter commented 9 years ago
とりあえず環境を確認してみた。
やはりportだと思われ。

$ which arm-none-eabi-gcc
/opt/local/gcc-arm-none-eabi/bin/arm-none-eabi-gcc

$  arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/opt/local/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.
7.3/lto-wrapper
Target: arm-none-eabi
Configured with: 
/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/src/gcc/configure 
--target=arm-none-eabi 
--prefix=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/install-nat
ive 
--libexecdir=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/install
-native/lib 
--infodir=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/install-na
tive/share/doc/gcc-arm-none-eabi/info 
--mandir=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/install-nat
ive/share/doc/gcc-arm-none-eabi/man 
--htmldir=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/install-na
tive/share/doc/gcc-arm-none-eabi/html 
--pdfdir=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/install-nat
ive/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ 
--disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap 
--disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-lto 
--disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as 
--with-gnu-ld --with-newlib --with-headers=yes 
--with-python-dir=share/gcc-arm-none-eabi 
--with-sysroot=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/insta
ll-native/arm-none-eabi --build=x86_64-apple-darwin10 
--host=x86_64-apple-darwin10 
--with-gmp=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/build-nat
ive/host-libs/usr 
--with-mpfr=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/build-na
tive/host-libs/usr 
--with-mpc=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/build-nat
ive/host-libs/usr 
--with-ppl=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/build-nat
ive/host-libs/usr 
--with-cloog=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/build-n
ative/host-libs/usr 
--with-libelf=/Users/build/macbuild/gcc-arm-none-eabi-4_7-2012q4-20121208/build-
native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-lstdc++ -lm' 
--with-pkgversion='GNU Tools for ARM Embedded Processors' 
--with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.7.3 20121207 (release) [ARM/embedded-4_7-branch revision 194305] 
(GNU Tools for ARM Embedded Processors

$ port info arm-none-eabi-gcc                                                   

arm-none-eabi-gcc @4.6.2 (cross, devel)

Description:          The GNU compiler collection, including front ends for C, 
C++, Objective-C and Objective-C++ for cross development for arm-none-eabi.
Homepage:             http://gcc.gnu.org/

Build Dependencies:   gettext
Library Dependencies: arm-none-eabi-binutils, gmp, mpfr, libiconv, libmpc
Platforms:            darwin
License:              GPL-3+
Maintainers:          nomaintainer@macports.org

Original comment by joseph.s...@gmail.com on 13 May 2013 at 3:00

GoogleCodeExporter commented 9 years ago
ん?少しportとversionが合ってないような?

Original comment by joseph.s...@gmail.com on 13 May 2013 at 3:03

GoogleCodeExporter commented 9 years ago
http://www.macports.org/ports.php?by=name&substr=eabi

最新でも4.7.2だねぇ。
でも自前でbuildしたような気はしないのだけど…。

Original comment by joseph.s...@gmail.com on 13 May 2013 at 3:19

GoogleCodeExporter commented 9 years ago
.zsh_historyを漁っていたらありました。

https://github.com/adamgreen/gcc4mbed

こいつだと思われます。

Original comment by joseph.s...@gmail.com on 13 May 2013 at 3:20

GoogleCodeExporter commented 9 years ago
josephさん,Thanx.
うまく行った.

ここ(wiki)にきれいにまとめておきます.
http://code.google.com/p/serio-pj/wiki/mbedOfflineCompile?ts=1368487689&updated=
mbedOfflineCompile

本件をcloseします.

Original comment by hidekiyamada3452 on 13 May 2013 at 11:30