安装 avr-gcc 编程软件出错?

软件和网站开发以及相关技术探讨
回复
qchen10
帖子: 16
注册时间: 2006-01-13 13:29

安装 avr-gcc 编程软件出错?

#1

帖子 qchen10 » 2006-01-16 0:24

Hi:
最近使用ubuntu, 感觉很不错,但是它是新的linux,不像readhat那样有很多系统的学习资料。最近安装avr_gcc编程软件时,出现了下面的问题,请help(参考附图)

安装步骤:
1. tar jxvf binutils-2.15.tar.tar
2. 设置好环境变量PATH=$PATH:/usr/local/AVR
3. echo $PATH , OK后进行下一步
4. cd binutils-2.15
5. ./configure --prefix=/usr/local/AVR/bin --target=avr

"You must set the environment variable CC to a working compiler." 奇怪,环境变量PATH不是已经设置好了吗?

请各们高人help

先前安装avr-insight时,也报错,说是gcc 检测到,但没有启动? 但是在readhat9.0下安装binutils2.15和insight6.1都是正常的。是不是2.4内核与2.6内核有不同,但应该2.6可以向下兼容2.4吧!
附件
Screenshot.png
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

#2

帖子 oneleaf » 2006-01-16 8:43

源中应该带了avr吧

$ apt-cache search avr|grep avr
avr-libc - Standard C library for Atmel AVR development
avra - Assembler for Atmel AVR microcontrollers
avrp - Programmer for Atmel AVR microcontrollers
avrprog - Programmer for Atmel AVR microcontrollers
binutils-avr - Binary utilities that support Atmel's AVR targets.
gcc-avr - The GNU C compiler (cross compiler for avr)
gdb-avr - The GNU Debugger for avr
simulavr - Atmel AVR simulator
qchen10
帖子: 16
注册时间: 2006-01-13 13:29

avr-gcc 單獨安裝

#3

帖子 qchen10 » 2006-01-16 13:52

因為avr的gnu_tools suc as gcc , gdb, binutils 各版本有兼容性題,比較成熟的組合的版本都比較低,我想單獨安裝在一個file下, 避免与系統的gcc gdb 相沖突. 因此沒有用apt安裝,但用tar包安裝,又出錯誤! 是不是基本系統不能編譯tar包? 那要安裝些什么才可以編譯tar包?

我用apt-get install gcc 后, 查看/usr/bin/下, 有as gcc
ld, gdb 工具, 但編譯始終有錯.
qchen10
帖子: 16
注册时间: 2006-01-13 13:29

give a help!

#4

帖子 qchen10 » 2006-01-19 13:25

give a hep , please!
qchen10
帖子: 16
注册时间: 2006-01-13 13:29

请问编译tar包要安装什么软件包

#5

帖子 qchen10 » 2006-01-21 21:02

Hi All:
按照后面所附的方法安装软件包后,仍出现下列错误:(参考附件)
请问究竟编译tar包要安装什么软件包?

loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... avr-unknown-none
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... (cached) /usr/bin/install -c
*** This configuration is not supported in the following subdirectories:
target-libiberty
(Any other directories should still work fine.)
checking for i686-pc-linux-gnu-ar... no
checking for ar... (cached) ar
checking for i686-pc-linux-gnu-as... no
checking for as... (cached) as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... (cached) dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... (cached) ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... (cached) nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... (cached) ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... (cached) windres
checking for i686-pc-linux-gnu-objcopy... no
checking for objcopy... (cached) objcopy
checking for i686-pc-linux-gnu-objdump... no
checking for objdump... (cached) objdump
checking for avr-ar... no
checking for avr-as... no
checking for avr-dlltool... no
checking for avr-ld... no
checking for avr-nm... no
checking for avr-ranlib... no
checking for avr-windres... no
checking whether to enable maintainer-specific portions of Makefiles... no
creating ./config.status
creating Makefile
root@ub:/home/cq/AVR/gnu_tools/binutils/binutils-2.15#



安装下列软件包:

或者你可以试试我以前在hoary 下用的C/C++ 编译环境安装脚本!
可以解决大部分问题。

1) 切换到root
代码:
sudo -s -H

2) 运行以下脚本安装anjuta集成开发环境
代码:
#!/bin/bash
#=============================================================
# 此脚本用于在ubuntu5.04下配置gtk+开发环境
#
apt-get install anjuta
apt-get install anjuta-common
apt-get install apache
apt-get install at-spi-doc
apt-get install autobook
apt-get install autoconf
apt-get install autoconf2.13
apt-get install autoconf-archive
apt-get install autogen
apt-get install automake
apt-get install bison
apt-get install ctags
apt-get install cvs
apt-get install devhelp
apt-get install devhelp-books
apt-get install exuberant-ctags
apt-get install flex
apt-get install g++
apt-get install g77
apt-get install gcc
apt-get install gcj
apt-get install gda2-freetds
apt-get install gda2-mysql
apt-get install gda2-odbc
apt-get install gda2-postgres
apt-get install gda2-sqlite
apt-get install glade-2
apt-get install glade-doc-2
apt-get install glade-gnome-2
apt-get install gnome-devel
apt-get install gnu-standards
apt-get install gnutls-bin
apt-get install httpd
apt-get install indent
apt-get install libcompress-zlib-perl
apt-get install libgail-doc
apt-get install libglib2.0-doc
apt-get install libgnome2-dev
apt-get install libgnome2-doc
apt-get install libgnomecanvas2-doc
apt-get install libgnomemm2.0-dev
apt-get install libgnomeui-doc
apt-get install libgtk2.0-dev
apt-get install libgtk2.0-doc
apt-get install libgtkmm2.0-dev
apt-get install libgtkmm2.0-doc
apt-get install libhtml-format-perl
apt-get install libio-socket-ssl-perl
apt-get install libltdl3-dev
apt-get install libmailtools-perl
apt-get install libpango1.0-doc
apt-get install libpcre3
apt-get install libstdc++5-3.3-doc
apt-get install libtool
apt-get install libtool-doc
apt-get install manpages-dev
apt-get install menu
apt-get install orbit2
apt-get install stl-manual
apt-get install shared-mime-info
apt-get install ttf-thryomanes
附件
Screenshot.png
头像
huangjiahua
帖子: 3294
注册时间: 2005-03-30 0:27
联系:

#6

帖子 huangjiahua » 2006-04-20 12:09

sudo apt-get build-dep gcc-avr
跃过无数的时间断层,只为了在
qchen10
帖子: 16
注册时间: 2006-01-13 13:29

单独安装

#7

帖子 qchen10 » 2006-04-20 15:51

因為avr的gnu_tools suc as gcc , gdb, binutils 各版本有兼容性題,比較成熟的組合的版本都比較低,我想單獨安裝在一個file下, 避免与系統的gcc gdb 相沖突. 因此沒有用apt安裝,但用tar包安裝,又出錯誤! 是不是基本系統不能編譯tar包? 那要安裝些什么才可以編譯tar包?

我用apt-get install gcc 后, 查看/usr/bin/下, 有as gcc
ld, gdb 工具, 但編譯始終有錯.
头像
huangjiahua
帖子: 3294
注册时间: 2005-03-30 0:27
联系:

#8

帖子 huangjiahua » 2006-04-22 3:24

请看我的上一个帖子

apt-get build-dep 是安装编译环境
跃过无数的时间断层,只为了在
chenyu
帖子: 80
注册时间: 2006-02-27 18:06
来自: FZU

Re: 安装 avr-gcc 编程软件出错?

#9

帖子 chenyu » 2006-05-17 15:00

qchen10 写了:Hi:
最近使用ubuntu, 感觉很不错,但是它是新的linux,不像readhat那样有很多系统的学习资料。最近安装avr_gcc编程软件时,出现了下面的问题,请help(参考附图)

安装步骤:
1. tar jxvf binutils-2.15.tar.tar
2. 设置好环境变量PATH=$PATH:/usr/local/AVR
3. echo $PATH , OK后进行下一步
4. cd binutils-2.15
5. ./configure --prefix=/usr/local/AVR/bin --target=avr

"You must set the environment variable CC to a working compiler." 奇怪,环境变量PATH不是已经设置好了吗?

请各们高人help

先前安装avr-insight时,也报错,说是gcc 检测到,但没有启动? 但是在readhat9.0下安装binutils2.15和insight6.1都是正常的。是不是2.4内核与2.6内核有不同,但应该2.6可以向下兼容2.4吧!
我服了你了,提示明明写着"You must set the environment variable CC to a working compiler."

你设置PATH有什么用? export CC=gcc就行了
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#10

帖子 eexpress » 2006-05-17 21:45

export而已。
看我帖子。sdcc的。支持多种uC的。也试试
● 鸣学
elecboy
帖子: 15
注册时间: 2006-03-01 13:05

#11

帖子 elecboy » 2006-05-25 7:09

ubuntu里的avr相关软件版本比较老,建议用Debian unstable,avr-gcc 是4.1,avr-libc 是1.4.4-2(俺正在用,没发现啥问题,代码效率似乎比gcc-3.4.4高些).大概是用ubuntu的人用这些专业软件的人少吧.
你也可以下载debian的avr工具源码,编译成deb这样编译估计不容易出错.
lpzgbd
帖子: 52
注册时间: 2007-02-14 13:56
来自: swust

#12

帖子 lpzgbd » 2007-06-13 11:05

我的看法是这样的哈,不知对不对:
楼主用量PATH=$PATH:/usr/local/AVR 设置环境变量后,以前的环境变量不是就变了吗,系统在你的这个:/usr/local/AVR 下查找gcc命令怎么会找到呢?
我是用apt安装的avr-gcc,你可以到我的空间看看哈http://www.eetop.cn/blog/?57446/action_spaceli ... _blog.html
有问题可以加QQ:756306162
回复