huilai 发表于 2007-2-12 20:08:03

请教:AVRStudio+GCC编译简单程序出错问题

刚学AVR,用AVRStudio(4.12 460版)+GCC(2006-4-21版)编译例程

#include <avr/io.h>

int main(void)

{

    unsigned char i,j,k,led=0;

        DDRB=0xFF;

        while(1)

        {

          if(led)

                     PORTB|=0x01;

          else

                     PORTB&=0xFE;

                led=!led;

               

                //延时

                for(i=0;i<255;i++)

                  for(j=0;j<255;j++)

                          k++;

        }

}                                  



编译结果:

AllocationBase 0x0, BaseAddress 0x71590000, RegionSize 0x480000, State 0x10000

d:\WinAVR\utils\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 487

avr-gcc.exe -I"D:\WinAVR\avr\include"-mmcu=atmega16 -Wall -gdwarf-2    -DF_CPU= 4000000UL       -O0 -fsigned-char -MD -MP -MT gccAVRdemo1.o -MF dep/gccAVRdemo1.o.d-c../gccAVRdemo1.c

AllocationBase 0x0, BaseAddress 0x71590000, RegionSize 0x480000, State 0x10000

d:\WinAVR\utils\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 487

make: *** Error 1

Build succeeded with 0 Warnings...



http://cache.amobbs.com/bbs_upload782111/files_6/armok01144522.gif



请高手帮忙看看,先谢了

huilai 发表于 2007-2-13 09:30:26

装了AVRStudio,WinAVR最新的版本,还是不行

huilai 发表于 2007-2-14 18:27:50

是不是太菜了我?

zhouyh 发表于 2007-2-14 20:25:12

不要急,慢慢来.编译应该没问题

huilai 发表于 2007-2-14 21:16:14

谢谢 zhouyh 的回复

用AVRStudio+WinAVR的朋友,你们的机器装没装杀毒软件,装的什么杀毒软件

huilai 发表于 2007-2-16 00:15:51

用AVRStudio+WinAVR的很少?

testcode 发表于 2007-2-16 00:40:06

测试没有问题,用AVRStudio(4.13版)+GCC(20070122版)

估计是AVRStudio的设置问题。

AllocationBase 0x0, BaseAddress 0x71590000, RegionSize 0x480000, State 0x10000

huilai 发表于 2007-2-19 17:29:43

testcode 你的机器装得什么杀毒软件?

huilai 发表于 2007-2-26 08:40:48

testcode还没看到?

kenII 发表于 2007-2-26 10:10:35

LZ还没搞定?

这个问题应该是WINAVR的一个运行库msys-1.0.dll分配运行地址时和其他DLL冲突了。

这个DLL是用来在WIN下模拟LINUX环境的,GCC没了它自然运行不起来。

解决方法网上有,用rebase.exe工具把msys-1.0.dll的运行地址重新分配一下就OK了。

rebase.exe在VC6.0里面有,如果你装VC的话。

没有就到网上找吧。

找到了执行DOS命令:

rebase -b 0x76000000 /winavr/utils/bin/msys-1.0.dll

kenII 发表于 2007-2-26 10:12:22

另外,这不一定是和什么杀毒软件冲突的问题。

我以前也出现过这个问题,把能卸的软件卸的差不多了都没解决。

cpu100 发表于 2007-2-26 13:07:44

碰到过 中毒造成的 可以在msconfig里把系统服务关了

huilai 发表于 2007-3-2 04:24:45

谢谢 kenII按照你的方法,编译通过!

感谢回复的TX,谢谢

qiguibao 发表于 2014-2-27 15:04:24

    也有可能是winavr安装目录的问题,可以尝试默认安装。
页: [1]
查看完整版本: 请教:AVRStudio+GCC编译简单程序出错问题