)GNUGCCCC++Objective-CFortranjavaAdafront-endback-endGCCGCCGCCAVRGCCGCC8WINDOWSWINAVRGCCAVRC/C++WINAVRATMELAVR1.GNUBinutilsGNUBinutilsWINAVRAVRAVR2.GNUGCCCC++3.AVR-LIBCAVR-LIBCAVRCCWINAVRWINAVRWINAVRWEB(void){unsignedchari,j,k,led=0;DDRB=0xFF;while(1){if(led)PORTB|=0X01;elsePORTB&=0XFE;led=!led;//for(i=0;i255;i++)for(j=0;j255;j++)k++;}}PB0LEDdemo1.c-“command”:avr-gcc–mmcu=at90s2313–cdemo1.c1-1MCU-mmcuat90s2313-c1-1–mmcu=at90s2313–odemo1.elfdemo1.odemo1.elfgccELF.elfELFavr-objcopyavr-objcopy-j.text-j.data-Oihexdemo1.elfdemo1.hexgcc.text.data–j–Oihex(intelHEXfile)90S2313FLASHdemo1.hexdemo1.hexPB0LEDgccCmakeMake()make.exemakemakefile1.3.1makeMakeMake[-ffilename][names]filenamemakeGNUmakefile.makefileMakefileWINDOWSnamesmakemakefilemakefileWINAVRMfilemakefilemakefile1.3.2Makefile.maketargetsMakefilemakemakemake***Notargetsspecifiedandnomakefilefound.Stop.1.all:D:\AVRGCC\TESTmakehello!2.(goal)makemake1D:\AVRGCC\TESTmakeone.makemakefileone2D:\AVRGCC\TESTmaketwotwo.two,makemakefile3D:\AVRGCC\TESTmakethreeonetwothree.one.[2…]:[:][1][2]…[]d:\avrgcc\testmaketwo.one.MakeoneoneTwoTwooneMakefilemakefile%.o:%.cavr-gcc-c$-o$@.o.c%.o%.c“%”–rC%makefilemakefile%.o:%.c$(CC)-c$-o$@make‘@’‘#’‘\’MAKEFIEL.makefile$@:$%:foo.a(bar.o)$@foo.a$%bar.o$:$?:^:1.3.3MfilemakefileWINAVRmakefilemfile1-2makefileMainfilename…OutputformatOptimizationleaveCsC/C++sourcefile(s)Assemblersourcefiles(s)CC++1-2mfilemakefilemakefileSRCMfilemakefileallmake“.s”“.s”1.4UltraEdit+WinAVRIDEUltraEditCUltraEditWinAVR(1)UltraEdit-,--4---(2)d:\devdirUltraEditdemo.cmfilemakefiled:\devdirUltraEdit-d:\devdirprjd:\devdirmakefiledemo.c3UltraEditmake-maked:\devdirUltraEditmake☺Ctrl+shift+0,UltraEdit-makefileSRC☺☺(RST)1PD0(RXD)2PD1(TXD)3PD2(INT0)4PD3(INT1)5PD4(T0)6VCC7GND8PB6(XT1/TS1)9PB7(XT2/TS2)10PD5(T1)11PD6(AIN0)12PD7(AIN1)13PB0(ICE)14PB1(OC1A)15PB2(OC1B/SS)16PB3(MOSI/OC2)17PB4(MISO)18PB5(SCK)19AVCC20AREF21GND22PC0(ADC0)23PC1(ADC1)24PC2(ADC2)25PC3(ADC3)26PC4(ADC4/SDA)27PC5(ADC5/SCL)28ATMEGA8S312345678161514131211109S612345678161514131211109S512345678161514131211109S1PC5PC4PC3PC2ADC1ADC0AREFPB5PB4PB3PB2LED_RPC6PD0PD1PD2PD3PD4PB6PB7PD5PD6LED_YRST_OMISO_OSCK_OMOSI_OAREFADIN0LED_RLED_YPC6PB5PB4PB3PD0PD1PD2PD3VCCGNDPB6PB7PB7PB6PD4PD5PB2PD6B2BELLR410KR25KR35KR7300Q18050S4S2Y2C1130pFC1230pF32768HzY1+C1047uF4MHzVCCERSGNDVCCVCCD2LED_REDD3LED_YELR6300VCCR85KQ38050R14100R155KSCK_INMISO_INMOSI_INRXDTXDSR_SERSR_RCKSR_SCKPC2PC3PC4PC5PD7VCCC13100nFR520KRSTAREF12J7RSTVin1GND2Vout3U1LM7805C4100nFC2100nF+C3470uF+C1470uF1234B1VCCD1LED_GRNR1300J19VACC1+1V+2C1-3C2+4C2-5V-6T2out7R2in8R2out9T2in10T1in11R1out12R1in13T1out14GND15VCC16MAX202C60.1uFC70.1uFC50.1uFC80.1uFC90.1uFTXDRXDVCC162738495J6DB9R135KZ15V1Z25V1R105KR95KR115KR125KQ28050VCCMISO_INMOSI_INSCK_INERSRS-232TOUARTSi_ProgSER14SRCLK11SRCLR10RCLK12E13O015O11O22O33O44O55O66O77Q79U274HC595SER14SRCLK11SRCLR10RCLK12E13O015O11O22O33O44O55O66O77Q79U374HC595abfcgdeDPY10985423abcdefg7dpdp6GNDQ4SEG1abfcgdeDPY10985423abcdefg7dpdp6GNDQ5SEG212345678161514131211109RP1500X812345678161514131211109RP2500X8DisplaySR_SERSR_SCKSR_RCKSR_SCKSR_RCKVCCVCCPower–mmcuioxxxx.hioxxxx.hSFRSFRPORTB=0XFF;Val=PINB;0x38PORTBAT90S2313SFRSRAMCPORTBPORTBvolatileC_BV(bit)I/Oavr-libcsfr_defs.h#define_BV(bit)(1(bit))=_BV(PB0)|_BV(PB1);//io.hPB0:0PB1:1DDRB=0X03;DDRB=0X03;DDRB=0X03;C(arrribute)SRAMSRAMint8_t1-128127uint8_t10255int16_t2-327683276