zoukankan      html  css  js  c++  java
  • windows 版 armelfgcc(转)

    为了能在windows下使用gcc的编译器,一直想在cygwin先编译arm-elf-gcc,但是搞了一个多月最后还是失败了,不会linux啊。想去改编译错误都不知道从那里下手。为了主要的事情能够快点开始,还是用GNU ARM现成的工具链吧。
      介绍几个网站:
             www.gnuarm.com    下载GNU ARM的工具链,里面有newlib,可以直接使用标准C库
             www.steve.org.uk    下载windows下面的make
             unxutils.sourceforge.net 下载bash,以前的脚本都是在cygwin下写的,所以需要一个bash,否则cp,rm等等都用不了。其实steve也提供bash,但是他的cp的参数和cygwin下的不一样,为了不改脚本就找了这个。
        1.download install tools link:
    GNU ARM: http://www.gnuarm.com/bu-2.15_gcc-3.4.3-c-c++-java_nl-1.12.0_gi-6.1.exe
    Make: http://www.steve.org.uk/Software/make/make.zip
    Bash: http://unxutils.sourceforge.net/UnxUtils.zip
        2.install tool

    GNU ARM:直接安装,我的安装路径为C:/GNUARM
    Make:将make.zip中的make.exe解压缩到C:\GNUARM\bin
    Bash:将UnxUtils.zip\usr\local\wbin中的所有文件解压缩到C:\GNUARM\bin
        3.note
    为了防止以后编译不出以外,安装路径最好不要有空格。
    暂时不要使用GCC-4.1 toolchain,没有cygwin的情况下会gcc提示缺少dll
    暂时不要使用GCC-4.0 toolchain,测试的时候不认-mapcs-32,但又不知道默认的到底是多少
    GNU ARM下面有用newlib编译好的用于arm的libc可以直接使用,但是编译时候的用到里面的一些和内存有关的函数,必须要在ld文件中为其留出参考。

    我在使用printf的时候直接就报错c:/GNUARM/arm-elf/lib/libc.a(syscalls.o) (.text+0x69c): In `_sbrk':http://www.cnblogs.com/http://www.cnblogs.com/http://www.cnblogs.com/newlib-1.12.0/newlib/libc/sys/arm/syscalls.c:508: undefined reference to `end'

    在ld脚本中做如下改动就ok了
    .bss :
     {
      __bss_start = .;
      *(.bss) *(COMMON);
      PROVIDE (end = .);
      __bss_end = .;
     }




    http://blog.21ic.com/user1/2983/archives/2008/53368.html

    http://www.gnuarm.com/

    http://sourceforge.net/projects/unxutils

    http://unxutils.sourceforge.net/
  • 相关阅读:
    面向对象的继承关系体现在数据结构上时,如何表示
    codeforces 584C Marina and Vasya
    codeforces 602A Two Bases
    LA 4329 PingPong
    codeforces 584B Kolya and Tanya
    codeforces 584A Olesya and Rodion
    codeforces 583B Robot's Task
    codeforces 583A Asphalting Roads
    codeforces 581C Developing Skills
    codeforces 581A Vasya the Hipster
  • 原文地址:https://www.cnblogs.com/WuCountry/p/1380584.html
Copyright © 2011-2022 走看看