概述
本文重点介绍win7环境下安装arm gcc编译器和scons编译系统的过程
注意:对于arm gcc和scons的介绍信息,请参考本博客《arm gcc简介》,《scons系统简介》
安装步骤
1. 安装gcc
这里采用launchapad的arm-none-eabi-gcc,官网https://launchpad.net/gcc-arm-embedded/
进入下载页面, 根据自己的系统,选择对应的版本,我这里下载32位最新版4.9gcc-arm-none-eabi-4_9-2015q3-20150921-win32.exe
点击安装,一路next,保持默认安装路径,安装完成界面,会有4个复选框,勾选
Add path to environment variable
Add registry information
点击完成,arm gcc安装完成
2. 安装python 2.xx
注意: 一定要安装2.xx版本的python
进入python下载页面https://www.python.org/downloads/release/python-2710/, 选择对应系统的python
这里选择32位2.7自安装包版本
https://www.python.org/ftp/python/2.7.10/python-2.7.10.msi
点击安装,一路next,保持默认安装路径和配置选项,直到安装完成
3. 安装scons
进入scons下载页面http://www.scons.org/download.php
下载2.4版本的windows安装包http://prdownloads.sourceforge.net/scons/scons-2.4.0-setup.exe
点击安装,一路next,保持默认安装路径和配置选项,直到安装完成
4. 更新环境变量
打开系统环境变量配置页
1
| 开始-》计算机-》属性-》高级系统设置-》环境变量-》系统变量-》Path-》编辑
|
检查Path是否有下面三项,没有则添加
1
| C:\Python27;C:\Python27\Scripts;C:\Program Files\GNU Tools ARM Embedded\4.9 2015q3\bin
|
注意: Path 用;
来分割路径
5. 测试系统
打开Cmd窗口,输入arm-none-eabi-gcc -v
, python -V
, scons -v
注意: python -V
中的V要大写
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| PS C:\Users> arm-none-eabi-gcc -v Using built-in specs. COLLECT_GCC=C:\Program Files\GNU Tools ARM Embedded\4.9 2015q3\bin\arm-none-eabi-gcc.exe COLLECT_LTO_WRAPPER=c:/program\ files/gnu\ tools\ arm\ embedded/4.9\ 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapp er.exe Target: arm-none-eabi Configured with: /home/build/work/GCC-4-9-build/src/gcc/configure --build=i686-linux-gnu --host=i686-w64-mingw32 --targe t=arm-none-eabi --prefix=/home/build/work/GCC-4-9-build/install-mingw --libexecdir=/home/build/work/GCC-4-9-build/instal l-mingw/lib --infodir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/info --mandir=/home/build /work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-9-build/install-mingw /share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libqu admath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gn u-as --with-gnu-ld --with-headers=yes --with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build /work/GCC-4-9-build/install-mingw/arm-none-eabi --with-libiconv-prefix=/home/build/work/GCC-4-9-build/build-mingw/host-l ibs/usr --with-gmp=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-mpfr=/home/build/work/GCC-4-9-build/b uild-mingw/host-libs/usr --with-mpc=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-isl=/home/build/work /GCC-4-9-build/build-mingw/host-libs/usr --with-cloog=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-li belf=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc+ +,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m ,cortex-m7,armv7-r Thread model: single gcc version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977] (GNU Tools for ARM Embedded Processors) PS C:\Users> python -V Python 2.7.10 PS C:\Users> scons -v SCons by Steven Knight et al.: script: v2.4.0.rel_2.4.0:3365:9259ea1c13d7, 2015/09/21 14:03:43, by bdbaddog on hpmicrodog engine: v2.4.0.rel_2.4.0:3365:9259ea1c13d7, 2015/09/21 14:03:43, by bdbaddog on hpmicrodog engine path: ['C:\\Python27\\scons-2.4.0\\SCons'] Copyright (c) 2001 - 2015 The SCons Foundation PS C:\Users>
|
至此,所有的系统配置已经完成