Linux????????????
??Щ???Linux??????????????????? ????????????Windows????????????????????????????й?????????й???????Windows????????????????????Windows???????????????????????????Windows???????????????????????????????????????Linux???????????????????????????????棬????51??е??????????????????????Linux???浥?????
??????????????????????????
?????
???????? ???51???????????(??????????к?????????150???????)???????о??????? ???????Atmel??AT89S52?? ???????STC??STC89C52RC ??USB??????????(????????STC??????)??USBISP?????????(AT89S52??????)??
??????
????????Ubuntu 11.04 (???2.6.38-10-generic)?? sdcc(?????C?????????)?? avrdude(AT????????????)??gSTCISP(STC????????????) ??objcopy(GUN ??????????? ????????Linux?????)
??????????????????
SDCC???????????????????????????/*SDCC???Windows?汾?????????????Linux????????????????????????Google???*/
???????????鷳???????????????????????ubuntu ?г??????(????????????????????apt-get?????????)??????????????????????
sudoapt-get install sdcc sdcc-doc
???AT89S52??????
????????AT89S52??????????????????ubuntu??????????
sudo apt-get install gcc-avr binutils-avr avrdude avr-libc
????avrdude.conf ?????avrdude????????51??????
sudo gedit/etc/avrdude.conf
??????????AT89s52????????(????JoyShuklaд??)
#------------------------------------------------------------
# Below chips by added by me .. Joy Shukla(joy_shukla@yahoo.in)
# these chips can be programmed with my usbasp programmer(changedatmega8 program)
# after adding avrdude support in this file ..
#------------------------------------------------------------
#------------------------------------------------------------
# AT89S52
#------------------------------------------------------------
part
id = "8052";
desc = "AT89S52";
signature = 0x1E 0x52 0x06;
chip_erase_delay = 20000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 0;
memory "flash"
size = 8192;
paged = no;
min_write_delay = 4000;
max_write_delay = 9000;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 0 0 1 0 0 0 0 0",
" x x x a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 0 1 0 0 0 0 0 0",
" x x x a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
mode = 0x21;
delay = 12;
;
memory "signature"
size = 3;
read = "0 0 1 0 1 0 0 0 x x x 0 0 0 a1 a0",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
;
#------------------------------------------------------------
????
???????????AT89S52????????,
??????
sudo avrdude -p 8052 -c usbasp -e -U flash:w:'??????.hex'
?????????? ???????????е?”??????.hex”??????????????
??????? ??????? ????? ??????????? makefile???????ɡ?
????????????
???????????????makefile???????????
###########??????#############
main??
sdcc liushui.c #????????????????п?????????Tab
packihxliushui.ihx>liushui.hex #SDCC????????????ihx ????????????hex
sudo avrdude -p 8052 -cusbasp -e -U flash:w:liushui.hex #????????????????????????ihx??????????
##########???????###############
??????? ?????????????????? make ???????? ???? ??? ?????λ???
/*???????????????????????????????????????????*/
????????????????STC?????
STC??????д ??????????????????????gSTCISP ò????????й???д?????????ν?????
gSTCISP ??????????
http://forum.ubuntu.org.cn/download/file.PHP?id=104628&sid=767b624faf73a36c71fcd4f8111773e
gSTCISP????????????bin ???????????????ν??Hex2bin ???? ?????? ?????? objcopy ?????? hex???????bin'??????????????????????
????hex???????????????hex????bin
objcopy -I ihex -Obinary liushui.hex liushui.bin # I ??O ?????д
??? ??gSTCISP (????????cp????/usr/bin???????????????????????gSTCISP??????)
???port(???) ?????/dev/ttyUSB0 ????????? ??????????bin??? ???DownLoad
????STC?????????????????? ????????д???????
??????Program OK Havealready encrypt.?????????????????
д?????
???????????С?????????????????α????????????Щ?????д?ú??????????????????????????Linux ???????????????????????????????ν????IDE(???????????)????迼?????????????????????????????????SDCC??windows Linux???????linuxд?????makefile ??windows?????????????? ????????????????á?????Linux???????????????????????usbisp?????? ??usb???????????????????????????????
????ο??????
?????ε????? /* ????????????????????? Linux ???????? */
http://hi.baidu.com/%B5%FB%CF%FE%C3%CE/blog/item/1aa1050958898c2e6a60fbd0.html
?? linux ????????????? /* ????????????? Linux ????????????????????? 51 ?? */
#######################################################
??д??: ????, ????????????, ??????linux??!

????admin ?????????2018-05-18