szp人贩子 发表于 2012-10-10 13:27:36

关于AVR Studio 在GCC环境下的编译问题

Build started 10.10.2012 at 13:23:24
mmcu=atmega128 -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT LED2.o -MF dep/LED2.o.d-c../LED2.c
"D:/avr studio/WinAVR/utils/bin/sh.exe": -Wall: command not found
make: Error 127 (ignored)
mmcu=atmega128 -Wl,-Map=LED2.map LED2.o   -o LED2.hex
"D:/avr studio/WinAVR/utils/bin/sh.exe": -Wl,-Map=LED2.map: command not found
make: Error 127 (ignored)
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex LED2.hex LED2.eep || exit 0
d:\avr studio\WinAVR\bin\avr-objcopy.exe: 'LED2.hex': No such file
   avr-objdump -h -S LED2.hex > LED2.lss
d:\avr studio\WinAVR\bin\avr-objdump.exe: 'LED2.hex': No such file
make: *** Error 1
Build failed with 2 errors and 0 warnings...

szp人贩子 发表于 2012-10-10 13:28:15

刚开始熟悉编译环境就出这么个岔子,纠结了好几天。。。

szp人贩子 发表于 2012-10-10 13:28:48

求指点啊,谢谢了

szp人贩子 发表于 2012-10-10 13:29:48

附上编译例程:
#include<avr/io.h>
int main(void)
{
        unsigned char i,j,LED=0;
        DDRE=0XFF;
        while(1)
        {
                if(LED)
                        PORTE|=0X01;
                else
                        PORTE&=0XFE;
                LED=!LED;
                for(i=0;i<255;i++)
                        for(j=0;j<255;j++);
        }
}
页: [1]
查看完整版本: 关于AVR Studio 在GCC环境下的编译问题