| |
我要投稿 | 资讯 | 机械 | 电气 | 软件 | |
| 机电专业技术网>电子电气>单片机> |
使用GNU编译器GNU编译器是免费的编译器. 而且是交叉编译器. 支持mips arm, ppc, M680.Cygwin是一种linux仿真器, 可以使GNU在windows2000下运行. 有了这俩个, 应该, 不需要买什么编译器了. For more information about gcc, go to http://gcc.gnu.org/ For cygwin, go to http://www.cygwin.com/ Download GNU software ftp://ftp.gnu.org 我是用他来编译PPC的程序的. 安装步骤如下. 不过我用的是GCC-3.0.3版. 编译GCC我的机器是900Mhz PIII cpu 256M memory. 大约是3个小时. 如果, 你不是特别一定要用的话, 那可别玩. (以下是从网上拷贝的). Building a gcc crosscompiler for powerpc on win32 get cygwin, and source for binutils-2.10 gcc-2.95.2-core, gcc-2.85.2, newlib-1.82 Install cygwin [add instructions here] run cygwin. you"ll get a bash prompt (...oh my god it"s unix!) make a folder to do all the work in and cd to it (e.g. mkdir /cygdrive/d/gcc-win32, cd /cygdrive/d/gcc-win32 - this translates to d:/gcc-win32 in MS land) unzip binutils and gcc-core and gcc and newlib into there make a build directory (build-win32, say) mkdir build-win32/binutils cd build-win32/binutils ../../binutils-2.10/configure --prefix=/usr/target-powerpc --target=powerpc-unknown-eabi make make install 以上是生成powerpc的汇编编译器. export PATH=/usr/target-powerpc/bin:$PATH cd .. mkdir gcc-core cd gcc-core ../../gcc-2.95.2-core/configure --prefix=/usr/target-powerpc --target=powerpc-unknown-eabi --with-exeext=".exe" --with-newlib make make install 只有编译core. 如果现在就编译全部GCC的花, 回出错, 我的个人经验. for some reason the build produces a gcc spec file with CR/LF"s rather than LF line endings, so convert the line endings on /usr/target-powerpc/lib/gcc-lib/powerpc-unknown-eabi/2.95.2/spec [ NOTE: (if you dont have a suitable tool use the following shell script - create a file called dos2unix with this in and stick it in your /usr/local/bin) #!/bin/sh cat $1 | sed "s/^M\{1,\}$//" | sed "$ s/^Z//" > $2 ] 以上, 如果你mount disk的模式为bin mode的华, 不会出现. ----- these following stages are only useful if you want a standard c library or c++/java/chill ---- compile newlib cd .. mkdir newlib ../../newlib-1.82/configure --prefix=/usr/target-powerpc/ --target=powerpc-unknown-eabi make make install and finally build a full gcc 上一页12 下一页 上一篇:自制简易编程卡 下一篇:突显PL/M-96的关键字 编译   .  make  a  cd  and  编译   .  make  a  cd  and  |