⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 安装配置.txt

📁 三份GCC中文教学文档
💻 TXT
📖 第 1 页 / 共 2 页
字号:
首先声明:
尽管GCC是免费软件,但双龙公司仍提供了一定的技术支持。
但毕竟是非商业软件,支持终将是有限的。

-------------------------------------------------------------------------

Win32 build of avr-gcc 3.3,  [11.8M] Apr.23, 2003

WinAVR (pronounced "whenever") is a suite of open source software development tools for the Atmel AVR series of RISC microprocessors for the Windows platform. It includes the GCC compiler for C and C++. WinAVR contains: WinAVR contains:
GNU Binutils: Binary utilities for AVR target (including assembler, linker, etc.) 
GCC: C and C++ compiler for AVR target. 
avr-libc: C Standard Library for AVR. 
objtool: ELF to COFF converter. 
avrdude: User-extensible programmer software. 
GNU Debugger (GDB): Debugger. 
AVaRICE: Software to interface Atmel JTAG ICE with GDB. 
Programmers Notepad: Editor and IDE. 
SRecord: Utilities to manipulate load files. 
Documentation for: Binutils, GCC, avr-libc, as, ld, make, avrdude, GDB, and AVaRICE. 
Many native Win32 GNU programs and utilities. 
Examples with source code from the avr-libc project. 
Sample makefile to use in your project. 
Batch files for use with AVR Studio. 
--------------------------------------------------------------------------

新的winavr.更方便了。
现在安装一步到位,不用手动添加路径了。新的PN也可以支持命令行编译了(不过还是没有UE方便)。
又加了许多新东东。

Announcing WinAVR 20030312

WinAVR (pronounced "whenever") is a suite of executable, open source 
software development tools for the Atmel AVR series of RISC 
microprocessors hosted on the Windows platform. It includes the
GNU GCC compiler for C and C++.

WinAVR can be found at http://sourceforge.net/projects/winavr/


Below is just a sample of what's new.

- The installer now automatically writes the WinAVR directories to 
your PATH environment variable and checks to see if they already 
exist.
  
- avrdude 4.0.0 is now included. avrdude is an open source programmer 
software that is user extensible. It is the former avrprog by Brian 
Dean now renamed and cross-platform.

- GNU Debugger (GDB) 5.3 for the AVR target (avr-gdb) is now 
included.

- AVaRICE 2.0 is now included. AVaRICE is a program for interfacing 
the Atmel JTAG ICE to GDB so users can debug their AVR.

- SRecord 1.14 is now included. SRecord is a collection of utilities 
to manipulate load files in different formats and various ways.

- New version of Programmers Notepad 2. You can now call command-line 
tools. (And without any batch files to do it!)

- avr-libc supports new devices: AT76C711, AT86RF401, AT43USB35x, and 
AT43USB32x.

- Added a small package, tofrodos, to the utilities to convert Unix / 
DOS line endings.
  
- More changes and corrections to the sample makefile.


For more information see the README.txt file that comes in the binary
installation.

Eric Weddington
------------------------------------------------------------------------

Announcing WinAVR 20030115

WinAVR (pronounced "whenever") is a suite of executable, open source 
software development tools for the Atmel AVR series of RISC 
microprocessors hosted on the Windows platform. It includes the
GNU GCC compiler.

WinAVR can be found at http://sourceforge.net/projects/winavr/


Below is just a sample of what's new.

- Corrected sample makefile.

- Added to the sample makefile automatic C file dependency 
generation.

- Added more documentation: binutils, make, as (GNU assembler), 
  ld (GNU linker), and GCC. Now there's no excuse not to RTFM!

- Refactored the utilities. Added bash.

- Added editor: Programmer's Notepad 2. This is in early stages and 
will develop into an IDE in the near future. This editor includes the 
Scintilla editor component.

- Note that GNU GCC 3.3 is no longer labeled experimental and is now 
labeled as prerelease. The tentative release date for GCC 3.3 is mid-
February 2003.

- This version of WinAVR includes GNU Binutils 2.13.2.1 which is the 
latest released version. Previous versions of WinAVR included 
Binutils 2.14 experimental versions.
  
- AVRLibC now includes an experimental scanf library thanks to J鰎g 
Wunsch.
  
- AVRLibC has completely new rewrites of the trigonometrical 
functions asin(), atan() and atan2() that feature a better (for some 
argument ranges even much better) accuracy than the previous 
versions. Note that since acos() uses asin(), it also benefits from 
this. These were contributed by Reiner Patommel.

- Two example projects with source code are included. These are from 
AVRLibC. Look under <InstallDir>\doc\examples. These examples also 
include different kinds of makefiles than in the sample directory.


For more information see the README.txt file that comes in the binary
installation.

Eric Weddington

---------------------------------------------------------------------

WinAvr 的makefile 做得不好 

得把makefile模板重写。

你可以增加几个target,如:
dump:
<tab> avr-objdump -S -h $(TARGRT).elf >dump.txt
<tab> notepad dump.txt

install :
<tab> 根据你的下载器指定uisp 参数,可以并口STK 200 dongle、串口avrisp等,甚至可以是Altera ByteBlaste 下载电缆。

这样,编译完以后
make install 直接下载代码到avr。 
make dump  反汇编原代码到dumop.txt,并自动用记事本打开。

------------------------------------------------------------------------

下载及安装最新的gcc3.3版本 (注:这个版本已不是最新的了)

在www.avrfreaks.net上下载最新的3.3版本(20021209)。直接安装,默认为winavr目录。然后在autoexec.bat里加上:
C:\WINAVR\bin;C:\WINAVR\utils\bin

安装后注意sample里的makefile文件有点问题,需要修改一下!否则不能运行。

问题(1):将size改为sizebefore
# Default target.
.PHONY : all
all: begin gccversion sizebefore $(TARGET).elf $(TARGET).cof $(TARGET).hex $(TARGET).eep sizeafter finished end

问题(2):将HEXSIZE该为ELFSIZE:
# Display size of file.
.PHONY : sizebefore
sizebefore:
    @echo "Size before:"
    -$(ELFSIZE)

.PHONY : sizeafter
sizeafter:
    @echo "Size after:"
    $(ELFSIZE)

该版本的cof文件转换采用objtool,在studio下调用,可配合仿真器,很好用。

-------------------------------------------------------------------------------

AVRGCC 能不能为 AT90S1200、ATTiny 系列进行 C 语言编程?

答案是肯定的!只不过,需要一些技巧……

首先,需要在 makefile 的项目中,把 MCU = 后面的内容改成 avr2,
其次,需要在程序所在的 c 文件中,把
#include <io.h>
改成
#include <iotn15.h>
#include <iomacros.h>
如此,即可以直接将编译后的代码用于该两类 MCU 上,不过,还需要注意的是,由于该两
类 MCU 没有软件堆栈和 RAM,所以,程序中*禁止*使用全局变量、局部静态变量以及中断
处理以外的函数(其实在 GCC 中,中断处理程序叫做“信号”,不叫函数),并且,在中
断处理过程中,最好不要开放中断,否则会引起数据错误(并非不可以,但需要一些技
巧)。

由此可见,使用 AVRGCC,可以完全的代替其它的 AVR 程序开发工具——甚至可以直接扔掉
汇编语言。

---------------------------------------------------------------------------------

AVRGCC只支持AVR TINY系列中的TINY26 :
因为目前只有TINY26有RAM,对于其它TINY,在GCCAVR中只能用汇编
至于AVRGCC的include里带了不少的tiny的库,对那些.h文件,你都能在里面找到这样一行:
#ifndef __ASSEMBLER__
#  warning "MCU not supported by the C compiler"
#endif
当然有人提出能用一些变通的方法实现TINY的C编译(用-mmcu=avr2选项编译,并避免一些涉及RAM和堆栈的操作),但毕竟受很大限制。
其它的TINY只支持汇编。
目前支持没有RAM的TINY的C编译器基本只有ICCTINY,ICCTINY的DEMO软件可在www.imagecraft.com下载。
 
----------------------------------------------------------------------------------

与AVR-GCC配套的编程器-:) 
命令行方式工作的,估计GNU阵营的会觉得比PonyProg2000好用-:)
http://www.xs4all.nl/~sbolt/e-spider_prog.html
现在能支持DOS、Win9x、WinNT/2000/XP、Linux平台了。 
 
avrdude 也可以,在makefile最后加一句就可以了。 
最新版的20030312版的噢:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -