免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3374 | 回复: 0
打印 上一主题 下一主题

[AVR]搭建linux下AVR的开发环境(GCC+Uisp)上 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-12-08 15:37 |只看该作者 |倒序浏览

[AVR]搭建linux下AVR的开发环境(GCC+Uisp)上

      AVR 是Atmel公司继At89C51系列之后推出的8位RISC单片机,它是一个具有电擦写可编程只读存储器(EEPROM),随机访问存储器(RAM),模数转换器,大量的输入和输出线路,计时器,RS-232通讯接口UART以及其他很多功能的单片集成电路.
  最好的莫过于在Linux下具有一个可供利用的完整编程环境:你可以采用GCC对这种单片机进行C语言编程.本文我将向你讲述如何安装和使用GCC.我也将向你讲述如何把软件载入单片机.你所需要的只是一块ATMEGA8单片机,无需晶震,一些电缆和少量其它便宜的部件. 这篇文章只是一个简单介绍.在以后的文章种我们将会制作一个具有少数按键的LCD显示屏,模数输入,硬件狗和一些LED.我们的想法是做一个普通的Linux服务器的控制面板,不过我们先要学习怎么配置编程环境,这也是本文的主要内容.
START:
一、下载软件:
binutils-2.11.2.tar.bz2            
地址:
ftp://gatekeeper.dec.com/pub/GNU/binutils/
或者
http://public.planetmirror.com/pub/sourceware/binutils/releases/
(这里速度比较块)
gcc-core-3.3.6.tar.gz              
地址:
http://ftp.ntu.edu.tw/gnu/gnu/gcc/
avr-libc-1.5.1.20071029.tar.tar      
地址:
http://download.savannah.gnu.org/releases/avr-libc/
uisp-20020106.tar.gz            
地址:
http://www.amelek.gda.pl/avr/uisp/
二、安装
1、安装GNU binutils
这个binutils软件包提供建立目标文件所需要的所有低级工具.它包括一个AVR汇编器(avr-as),连接器(avr-ld),库处理工具(avr-ranlib,avr-ar),生成可载入单片机EEPROM目标文件的程序(avr-objcopy),反汇编器(avr-objdump)和象avr-strip和avr-size这类的工具软件.
  
  在linux(我使用的是RedHat 9)的 shell中运行下列命令编译安装binutils:
[root@localhost Atmel]# tar xzvf binutils-2.11.2.tar.gz
[root@localhost Atmel]# cd binutils-2.11.2
[root@localhost Atmel]# ./ configure --target=avr --prefix=/usr/local/atmel
[root@localhost Atmel]# make
[root@localhost Atmel]# make install
用vi打开/etc/ld.so.conf 在理面添加/usr/local/atmel/lib并保存再运行 ldconfig命令更新动态连接库
       [root@localhost Atme]# vi /etc/ld.so.conf
[root@localhost Atme]# ldconfig
2、安装AVR GCC编译器
   备注:为了能使用avr-libc-1.5.1版本的AVR C语言库所以这里GCC要选择3.3以上的版本,这里采用4.2.2(gcc 的有些版本是不太好用的,比较好用的版好像有2.95, 3.4.6, 4.2.1/4.2.2
   编译AVR GCC出现问题最多,主要是LIBRARY_PATH的问题,用configure配置的时候老是出现如下错误:
*** LIBRARY_PATH shouldn't contain the cu2rent directory when
*** LIBRARY_PATH shouldn't contain the current directory when
*** building gcc. Please change the environment variable
*** and run configure again.
用 echo $LIBRARY_PATH看发现我的LIBRARY_PATH变成了jepg库的路径(前几天刚装的)不知道为什么会形象他。然后我把在/etc/profile 里去掉jpeg库的查找路径,系统重启。问题少了很多,但是还是有一个错误:
*** This configuration is not supported in the following subdirectories:
target-libiberty
(Any other directories should still work fine.)
……
……
我找了很多资料都没有解决,后来我有试了几个GCC的版本直到我用gcc-core-3.0.3的时候没有错误,make也没有问题安装也是成功的。
但是不知道为什么用 gcc-core-3.3以上的版本就会出错,但是我也在网上看到别人用3.3以上版本编译成功的例子。后来在DSNC那里才找到了答案“gcc 的有些版本是不太好用的,比较好用的版好像有2.95, 3.4.6, 4.2.1/4.2.2”然后我就采用了4.2.2版本
[root@localhostAtmel]#configure --target=avr --prefix=/home/c/r/mymtom/local --disable-nls --enable-language=c
这样还会报无法编译libssp的错误,按照DSNC那里大侠的指点加上了--disalbe-libssp问题解决了。
下面是我的成功的步骤:
在linux shell里运行一下命令:
      [root@localhost Atmel]# tar zxvf gcc-core-4.2.2.tar.gz
[root@localhost Atmel]# cd gcc-core-3.3.6
[root@localhost Atmel]# ./configure --target=avr --prefix=/usr/local/atmel --disable-nls --enable-language=c --disable-libssp
   [root@localhost Atmel]# make
[root@localhost Atmel]# make install
   
3、安装AVR C语言库
   备注:为了能使用可以使用atmega48、atmega88、atmega168这些AVR的后起之秀所以要选择avr-libc的版本要1.4.0以上,所以这里采用了1.5.1
    先设置一些环境变量(bash语法):
[root@localhost Atmel]#export CC=avr-gcc
[root@localhost Atmel]#export AS=avr-as
[root@localhost Atmel]#export AR=avr-ar
[root@localhost Atmel]#export PATH=/usr/local/atmel/bin:${PATH}
     [root@localhost Atmel]#tar xjvf avr-libc-1.5.1.20071029.tar.tar
    [root@localhost Atmel]#cd avr-libc-1.5.1.20071029
[root@localhost Atmel]#./configure --prefix=/usr/local/atmel/avr --target=avr --enable-languages=c --host=avr
[root@localhost Atmel]#make
[root@localhost Atmel]#make install
4、安装uisp编程器
备注:只支持2.4的内核,在2.6内核编译时会出错,看uisp2002106/INSTAL文件里有说明,如果你是接着第三步做的话请新开一个shell因为在安装AVR c库的时候把CC设置了AVR-GCC,在安装uisp编译的时候是用的是GCC
     这个Linux下的uisp是一个非常好的编程器.可以直接用在Makefile里面.你只要添加"make load"规则,这样你就可以编译载入软件一次完成.
uisp按照下面这样安装:
[root@localhost Atmel]#tar zxvf uisp-20020106.tar.gz
[root@localhost Atmel]#cd uisp-20020106
[root@localhost Atmel]#./configure
[root@localhost Atmel]#cp /src/uisp /usr/local/atmel/bin
最后为了能用avr-gcc来编译程序我们配置一下它的PATH:
用vi编辑/etc/profile,找到pathmunge /usr/local/sbin 在其下面添加一行:
pathmunge /usr/local/atmel/bin     并保存。
再在shell中执行:export PATH=$PATH: /usr/local/atmel/bin
    这样基本上所有的软件已经全部安装完成,可以测试一下我们的环境是否可以工作,接下来就来测试一下吧。
三、测试
1、 编写main.c
    #include
#include  
//注:内部函数_delay_ms() 最高延时
[email=262.144mS@1MHz]262.144mS@1MHz[/email]

[email=32.768ms@8MHz]32.768ms@8MHz[/email]
//该函数可以实现较精确的定时 for()/while()指令很难计算延时时间
//为了使 _delay_ms()函数的延时正确,须在makefile中设定F_CPU为实际的系统时钟频
//本范例为1MHz内部RC振荡器 即 F_CPU=1000000
   int main(void)
{
unsigned char i,j,k;//定义变量
PORTA=0xFF;   
DDRA=0xFF;         //PA口设为输出高电平,灯灭
while(1)
{
i=1;
for (j=0;j
2、编写makefile
#这是一个简单makefile,仅用于初学者使用
#修改于WINAVR20050214所生成的makefile
#简单实验只需更改 [单片机类型][目标文件名][C源文件名][系统时钟频率]即可
#修改好参数后另存到单片机程序所在目录,然后执行[make all]命令
#生成 烧录FLASH的*.hex,烧录EEPROM的*.eep,调试用的*.elf 文件
#
#           
www.OurAVR.com
# MCU name
# 单片机类型 参考格式是:atmega8 / at90s2313 / attiny15
MCU = atmega8
# Processor frequency.
# 系统时钟频率(Hz),用于生成延时 _delay_us() _delay_ms() 见delay.h
#     This will define a symbol, F_CPU, in all source code files equal to the
#     processor frequency. You can then use this symbol in your source code to
#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
#     automatically to create a 32-bit value in your source code.
F_CPU = 1000000
# Target file name (without extension).
# 目标文件名(即生成的.hex/.eep/.elf的文件名)
TARGET = main
# List C source files here. (C dependencies are automatically generated.)
# C源文件名(不带路径)
# 多个文件名间用空格隔开 例如 SRC = file1.c file2.c file3.c
# 不需要加上 h头文件
SRC = $(TARGET).c
#**************后面内容基本不需要修改,除非你是老手*****************************#
# Output format. (can be srec, ihex, binary)
# 输出烧录文件格式
FORMAT = ihex
# Optimization level, can be [0, 1, 2, 3, s].
# 优化级别
#     0 = turn off optimization. s = optimize for size.
#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
OPT = s
# Debugging format.
# 输出调试格式
#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
#     AVR Studio 4.10 requires dwarf-2.
#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
DEBUG = dwarf-2
# List Assembler source files here.
# 汇编源文件名(不带路径,但扩展名 .sS 需大写,否则将会被make clean 所误删)
#     Make them always end in a capital .S. Files ending in a lowercase .s
#     will not be considered source files but generated files (assembler
#     output from the compiler), and will be deleted upon "make clean"!
#     Even though the DOS/Win* filesystem matches both .s and .S the same,
#     it will preserve the spelling of the filenames, and gcc itself does
#     care about how the name is spelled on its command-line.
ASRC =
# Hey Emacs, this is a -*- makefile -*-
#----------------------------------------------------------------------------
# WinAVR Makefile Template written by Eric B. Weddington, J鰎g Wunsch, et al.
#
# Released to the Public Domain
#
# Additional material for this makefile was written by:
# Peter Fleury
# Tim Henigan
# Colin O'Flynn
# Reiner Patommel
# Markus Pfaff
# Sander Pool
# Frederik Rouleau
#
#----------------------------------------------------------------------------
# On command line:
#
# make all = Make software.
#
# make clean = Clean out built project files.
#
# make coff = Convert ELF to AVR COFF.
#
# make extcoff = Convert ELF to AVR Extended COFF.
#
# make program = Download the hex file to the device, using avrdude.
#                Please customize the avrdude settings below first!
#
# make debug = Start either simulavr or avarice as specified for debugging,
#              with avr-gdb or avr-insight as the front end for debugging.
#
# make filename.s = Just compile filename.c into the assembler code only.
#
# make filename.i = Create a preprocessed source file for use in submitting
#                   bug reports to the GCC project.
#
# To rebuild project do "make clean" then "make all".
#----------------------------------------------------------------------------
# List any extra directories to look for include files here.
#     Each directory must be seperated by a space.
#     Use forward slashes for directory separators.
#     For a directory that has spaces, enclose it in quotes.
EXTRAINCDIRS =
# Compiler flag to set the C Standard level.
#     c89   = "ANSI" C
#     gnu89 = c89 plus GCC extensions
#     c99   = ISO C99 standard (not yet fully implemented)
#     gnu99 = c99 plus GCC extensions
CSTANDARD = -std=gnu99
# Place -D or -U options here
CDEFS = -DF_CPU=$(F_CPU)UL
# Place -I options here
CINCS =
#---------------- Compiler Options ----------------
# -g*:          generate debugging information
# -O*:          optimization level
# -f...:        tuning, see GCC manual and avr-libc documentation
# -Wall...:     warning level
# -Wa,...:      tell GCC to pass this to the assembler.
#    -adhlns...: create assembler listing
CFLAGS = -g$(DEBUG)
CFLAGS += $(CDEFS) $(CINCS)
CFLAGS += -O$(OPT)
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -Wall -Wstrict-prototypes
CFLAGS += -Wa,-adhlns=$(
#---------------- Assembler Options ----------------
# -Wa,...:   tell GCC to pass this to the assembler.
# -ahlms:    create listing
# -gstabs:   have the assembler create line number information; note that
#             for use in COFF files, additional information about filenames
#             and function names needs to be present in the assembler source
#             files -- see avr-libc docs [FIXME: not yet described there]
ASFLAGS = -Wa,-adhlns=$(
#---------------- Library Options ----------------
# Minimalistic printf version
PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
# Floating point printf version (requires MATH_LIB = -lm below)
PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
# If this is left blank, then it will use the Standard printf version.
PRINTF_LIB =
#PRINTF_LIB = $(PRINTF_LIB_MIN)
#PRINTF_LIB = $(PRINTF_LIB_FLOAT)
# Minimalistic scanf version
SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
# If this is left blank, then it will use the Standard scanf version.
SCANF_LIB =
#SCANF_LIB = $(SCANF_LIB_MIN)
#SCANF_LIB = $(SCANF_LIB_FLOAT)
MATH_LIB = -lm
#---------------- External Memory Options ----------------
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
# used for variables (.data/.bss) and heap (malloc()).
#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
# only used for heap (malloc()).
#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
EXTMEMOPTS =
#---------------- Linker Options ----------------
# -Wl,...:     tell GCC to pass this to linker.
#    -Map:      create map file
#    --cref:    add cross reference to map file
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
LDFLAGS += $(EXTMEMOPTS)
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
#---------------- Programming Options (avrdude) ----------------
# Programming hardware: alf avr910 avrisp bascom bsd
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
#
# Type: avrdude -c ?
# to get a full listing.
#
AVRDUDE_PROGRAMMER = stk500
# com1 = serial port. Use lpt1 to connect to parallel port.
AVRDUDE_PORT = com1    # programmer connected to serial device
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
# Uncomment the following if you want avrdude's erase cycle counter.
# Note that this counter needs to be initialized first using -Yn,
# see avrdude manual.
#AVRDUDE_ERASE_COUNTER = -y
# Uncomment the following if you do /not/ wish a verification to be
# performed after programming the device.
#AVRDUDE_NO_VERIFY = -V
# Increase verbosity level. Please use this when submitting bug
# reports about avrdude. See  
# to submit bug reports.
#AVRDUDE_VERBOSE = -v -v
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
#---------------- Debugging Options ----------------
# For simulavr only - target MCU frequency.
DEBUG_MFREQ = $(F_CPU)
# Set the DEBUG_UI to either gdb or insight.
# DEBUG_UI = gdb
DEBUG_UI = insight
# Set the debugging back-end to either avarice, simulavr.
DEBUG_BACKEND = avarice
#DEBUG_BACKEND = simulavr
# GDB Init Filename.
GDBINIT_FILE = __avr_gdbinit
# When using avarice settings for the JTAG
JTAG_DEV = /dev/com1
# Debugging port used to communicate between GDB / avarice / simulavr.
DEBUG_PORT = 4242
# Debugging host used to communicate between GDB / avarice / simulavr, normally
#     just set to localhost unless doing some sort of crazy debugging when
#     avarice is running on a different computer.
DEBUG_HOST = localhost
#============================================================================
# Define programs and commands.
SHELL = sh
CC = avr-gcc
OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump
SIZE = avr-size
NM = avr-nm
AVRDUDE = avrdude
REMOVE = rm -f
COPY = cp
WINSHELL = cmd
# Define Messages
# English
MSG_ERRORS_NONE = Errors: none
MSG_BEGIN = -------- begin --------
MSG_END = -------- end --------
MSG_SIZE_BEFORE = Size before:
MSG_SIZE_AFTER = Size after:
MSG_COFF = Converting to AVR COFF:
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
MSG_FLASH = Creating load file for Flash:
MSG_EEPROM = Creating load file for EEPROM:
MSG_EXTENDED_LISTING = Creating Extended Listing:
MSG_SYMBOL_TABLE = Creating Symbol Table:
MSG_LINKING = Linking:
MSG_COMPILING = Compiling:
MSG_ASSEMBLING = Assembling:
MSG_CLEANING = Cleaning project:
# Define all object files.
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
# Define all listing files.
LST = $(SRC:.c=.lst) $(ASRC:.S=.lst)
# Compiler flags to generate dependency files.
GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
# Combine all necessary flags and optional flags.
# Add target processor to flags.
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
# Default target.
all: begin gccversion sizebefore build sizeafter end
build: elf hex eep lss sym
elf: $(TARGET).elf
hex: $(TARGET).hex
eep: $(TARGET).eep
lss: $(TARGET).lss
sym: $(TARGET).sym
# Eye candy.
# AVR Studio 3.x does not check make's exit code but relies on
# the following magic strings to be generated by the compile job.
begin:
@echo
@echo $(MSG_BEGIN)
end:
@echo $(MSG_END)
@echo
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
ELFSIZE = $(SIZE) -A $(TARGET).elf
AVRMEM = avr-mem.sh $(TARGET).elf $(MCU)
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
$(AVRMEM) 2>/dev/null; echo; fi
sizeafter:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
$(AVRMEM) 2>/dev/null; echo; fi
# Display compiler version information.
gccversion :
@$(CC) --version
# Program the device.
program: $(TARGET).hex $(TARGET).eep
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
# Generate avr-gdb config/init file which does the following:
#     define the reset signal, load the target file, connect to target, and set
#     a breakpoint at main().
gdb-config:
@$(REMOVE) $(GDBINIT_FILE)
@echo define reset >> $(GDBINIT_FILE)
@echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
@echo end >> $(GDBINIT_FILE)
@echo file $(TARGET).elf >> $(GDBINIT_FILE)
@echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)
ifeq ($(DEBUG_BACKEND),simulavr)
@echo load >> $(GDBINIT_FILE)
endif
@echo break main >> $(GDBINIT_FILE)
debug: gdb-config $(TARGET).elf
ifeq ($(DEBUG_BACKEND), avarice)
@echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
@$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
$(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
@$(WINSHELL) /c pause
else
@$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
$(DEBUG_MFREQ) --port $(DEBUG_PORT)
endif
@$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
COFFCONVERT=$(OBJCOPY) --debugging \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000
coff: $(TARGET).elf
@echo
@echo $(MSG_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-avr $extcoff: $(TARGET).elf
@echo
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-ext-avr $# Create final output files (.hex, .eep) from ELF output file.
%.hex: %.elf
@echo
@echo $(MSG_FLASH) $@
$(OBJCOPY) -O $(FORMAT) -R .eeprom $%.eep: %.elf
@echo
@echo $(MSG_EEPROM) $@
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $# Create extended listing file from ELF output file.
%.lss: %.elf
@echo
@echo $(MSG_EXTENDED_LISTING) $@
$(OBJDUMP) -h -S $ $@
# Create a symbol table from ELF output file.
%.sym: %.elf
@echo
@echo $(MSG_SYMBOL_TABLE) $@
$(NM) -n $ $@
# Link: create ELF output file from object files.
.SECONDARY : $(TARGET).elf
.PRECIOUS : $(OBJ)
%.elf: $(OBJ)
@echo
@echo $(MSG_LINKING) $@
$(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
# Compile: create object files from C source files.
%.o : %.c
@echo
@echo $(MSG_COMPILING) $# Compile: create assembler files from C source files.
%.s : %.c
$(CC) -S $(ALL_CFLAGS) $# Assemble: create object files from assembler source files.
%.o : %.S
@echo
@echo $(MSG_ASSEMBLING) $# Create preprocessed source for use in sending a bug report.
%.i : %.c
$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $# Target: clean project.
clean: begin clean_list end
clean_list :
@echo
@echo $(MSG_CLEANING)
$(REMOVE) $(TARGET).hex
$(REMOVE) $(TARGET).eep
$(REMOVE) $(TARGET).cof
$(REMOVE) $(TARGET).elf
$(REMOVE) $(TARGET).map
$(REMOVE) $(TARGET).sym
$(REMOVE) $(TARGET).lss
$(REMOVE) $(OBJ)
$(REMOVE) $(LST)
$(REMOVE) $(SRC:.c=.s)
$(REMOVE) $(SRC:.c=.d)
$(REMOVE) .dep/*
# Include the dependency files.
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
# Listing of phony targets.
.PHONY : all begin finish end sizebefore sizeafter gccversion \
build elf hex eep lss sym coff extcoff \
clean clean_list program debug gdb-config
3、编译
    [root@localhost Atmel]make
      这样在当前目录上就生成了.hex文件 可以烧到芯片里了。(大功告成!)
摘自:http://hi.baidu.com/lazydoggie/blog/item/91324a88b1ca5297a5c27214.html


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/33617/showart_2114162.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP