shmit Posted July 22, 2007 Posted July 22, 2007 точка приказала долго жить, подключил к ней jtag вроди работает но неполучается ничего на нее зашить, может кто-то уже сталкивался с такой проблемой? вот что выдает jtag jtag> include athsx Initializing Xilinx DLC5 JTAG Parallel Cable III on parallel port at 0x378 IR length: 5 Chain length: 1 Device Id: 00000000000000000000000000000001 Manufacturer: Atheros Part: ar2312 Stepping: 1 Filename: /usr/local/share/jtag/atheros/ar2312/ar2312 ImpCode=01000000010000000100000000000000 EJTAG version: 2.6 EJTAG Implementation flags: R4k ASID_8 NoDMA MIPS32 dev ID=00c8 man ID=001f Found Atmel AT49xV322x flash, size = 4194304 bytes. Query identification string: Primary Algorithm Command Set and Control Interface ID Code: 0x0002 (AM /Fujitsu Standard Command Set) Alternate Algorithm Command Set and Control Interface ID Code: 0x0000 ( ull) Query system interface information: Vcc Logic Supply Minimum Write/Erase or Write voltage: 0 mV Vcc Logic Supply Maximum Write/Erase or Write voltage: 0 mV Vpp [Programming] Supply Minimum Write/Erase voltage: 0 mV Vpp [Programming] Supply Maximum Write/Erase voltage: 0 mV Typical timeout per single byte/word program: 0 us Typical timeout for maximum-size multi-byte program: 0 us Typical timeout per individual block erase: 0 ms Typical timeout for full chip erase: 0 ms Maximum timeout for byte/word program: 0 us Maximum timeout for multi-byte program: 0 us Maximum timeout per individual block erase: 0 ms Maximum timeout for chip erase: 0 ms Device geometry definition: Device Size: 4194304 B (4096 KiB, 4 MiB) Flash Device Interface Code description: 0x0001 (x16) Maximum number of bytes in multi-byte program: 0 Number of Erase Block Regions within device: 2 Erase Block Region Information: Region 0: Erase Block Size: 8192 B (8 KiB) Number of Erase Blocks: 8 Region 1: Erase Block Size: 65536 B (64 KiB) Number of Erase Blocks: 63 No. Manufacturer Part Stepping Instruction Register ------------------------------------------------------------------------------- ------------- 0 Atheros ar2312 1 EJTAG_DATA EJDATA Active bus: *0: EJTAG compatible bus driver via PrAcc (JTAG part No. 0) start: 0x00000000, length: 0x20000000, data width: 8 bit start: 0x20000000, length: 0x20000000, data width: 16 bit start: 0x40000000, length: 0x20000000, data width: 32 bit jtag> flashmem 0x1fc00000 bootloader.bin program blocks: Chip: AMD Flash Manufacturer: Atmel Chip: AT49BV322A Protected: 0090 flash_unlock_block 0x1FC00000 IGNORE block 0 unlocked flash_erase_block 0x1FC00000 ................................................................................ ................................................................................ ........................................flash_erase_block 0x1FC00000 FAILED erasing block 0 to program 8192 bytes, status: 99 addr: 0x1FC00000 и так далее, сообщения вида flash_erase_block 0xXXXXXXXX FAILED. поставльте на правильный путь! Вставить ник Quote
shmit Posted July 22, 2007 Author Posted July 22, 2007 аналогичная ситуация описывается в http://vbm.lan23.ru/books/JTAG_dwl_2100ap.pdf но из-за незнания итальянкого языка я так ничего и непонял, promt выдал бредни сумашедшего ;) Вставить ник Quote
tchern Posted July 23, 2007 Posted July 23, 2007 Если вы пользуетесь jtag-brecis-ok В файле jtag-brecis-ok/libbrux/flash/AMD.c замените if (amdstatus( bus, adr, 0xffff )) { printf( "flash_erase_block 0x%08X DONE\n", adr ); amd_flash_read_array( cfi_array ); /* AMD reset */ return 0; на if (amdstatus( bus, adr, 0xff )) { printf( "flash_erase_block 0x%08X DONE\n", adr ); amd_flash_read_array( cfi_array ); /* AMD reset */ return 0; потому что вы стираете в однобайтном режиме но в принципе все и так работает хотя и ругается Вставить ник Quote
shmit Posted July 23, 2007 Author Posted July 23, 2007 (edited) Если вы пользуетесь jtag-brecis-ok В файле jtag-brecis-ok/libbrux/flash/AMD.c замените if (amdstatus( bus, adr, 0xffff )) { printf( "flash_erase_block 0x%08X DONE\n", adr ); amd_flash_read_array( cfi_array ); /* AMD reset */ return 0; на if (amdstatus( bus, adr, 0xff )) { printf( "flash_erase_block 0x%08X DONE\n", adr ); amd_flash_read_array( cfi_array ); /* AMD reset */ return 0; потому что вы стираете в однобайтном режиме но в принципе все и так работает хотя и ругается имено его и использую но он у меня нехочет собираться $ make make all-recursive make[1]: Entering directory `/tmp/jtag-brecis-ok' Making all in libbrux make[2]: Entering directory `/tmp/jtag-brecis-ok/libbrux' make all-recursive make[3]: Entering directory `/tmp/jtag-brecis-ok/libbrux' Making all in po make[4]: Entering directory `/tmp/jtag-brecis-ok/libbrux/po' make libbrux.pot-update make[5]: Entering directory `/tmp/jtag-brecis-ok/libbrux/po' /usr/bin/xgettext --default-domain=libbrux --directory=.. \ --add-comments=TRANSLATORS: --keyword=_ --keyword=N_ \ --files-from=./POTFILES.in \ --copyright-holder='ETC s.r.o.' \ --msgid-bugs-address='marcel@telka.sk' test ! -f libbrux.po || { \ if test -f ./libbrux.pot; then \ sed -f remove-potcdate.sed < ./libbrux.pot > libbrux.1po && \ sed -f remove-potcdate.sed < libbrux.po > libbrux.2po && \ if cmp libbrux.1po libbrux.2po >/dev/null 2>&1; then \ rm -f libbrux.1po libbrux.2po libbrux.po; \ else \ rm -f libbrux.1po libbrux.2po ./libbrux.pot && \ mv libbrux.po ./libbrux.pot; \ fi; \ else \ mv libbrux.po ./libbrux.pot; \ fi; \ } make[5]: Leaving directory `/tmp/jtag-brecis-ok/libbrux/po' test -z "" || make touch stamp-po make[4]: Leaving directory `/tmp/jtag-brecis-ok/libbrux/po' make[4]: Entering directory `/tmp/jtag-brecis-ok/libbrux' if gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include/openwince -I/usr/local /include/openwince/device -I/usr/local/include/openwince/arm -I./../include -g -O2 -Wall -MT cmd_detectflash.o -MD -MP -MF ".deps/cmd_detectflash.Tpo" -c -o cm d_detectflash.o `test -f 'cmd/cmd_detectflash.c' || echo './'`cmd/cmd_detectflas h.c; \ then mv -f ".deps/cmd_detectflash.Tpo" ".deps/cmd_detectflash.Po"; else rm -f ".deps/cmd_detectflash.Tpo"; exit 1; fi cmd/cmd_detectflash.c: In function `cmd_detectflash_run': cmd/cmd_detectflash.c:49: warning: passing arg 2 of `cmd_get_number' from incomp atible pointer type cmd/cmd_detectflash.c:52: error: too many arguments to function `detectflash' make[4]: *** [cmd_detectflash.o] Error 1 make[4]: Leaving directory `/tmp/jtag-brecis-ok/libbrux' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/tmp/jtag-brecis-ok/libbrux' make[2]: *** [all] Error 2 make[2]: Leaving directory `/tmp/jtag-brecis-ok/libbrux' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/jtag-brecis-ok' make: *** [all] Error 2 root@shmit /tmp/jtag-brecis-ok $ может выложите собраный с вашим патчем? Edited July 23, 2007 by shmit Вставить ник Quote
tchern Posted July 23, 2007 Posted July 23, 2007 http://wifitst2007.narod.ru/jtag_bin.zip Вставить ник Quote
shmit Posted July 23, 2007 Author Posted July 23, 2007 (edited) собрал я эту штуку с патченым jtag-brecis-ok/libbrux/flash/AMD.c на под cigwin(под freebsd несобралась а больше ничего нету) ситуация такая jtag> flashmem 0x1fc00000 redboot.bin program blocks: Chip: AMD Flash Manufacturer: Atmel Chip: AT49BV322A Protected: 0090 flash_unlock_block 0x1FC00000 IGNORE block 0 unlocked flash_erase_block 0x1FC00000 ................................................................................ ................................................................................ ........................................flash_erase_block 0x1FC00000 FAILED erasing block 0 to program 8192 bytes, status: 99 ejtag.c(132) Reset occurred, ctrl=11111111111111111100000000001000 ejtag.c(139) No processor access, ctrl=00000000000000000000000000000001 ................................................................................ ................................................................................ ........................................ flash error jtag> Edited July 23, 2007 by shmit Вставить ник Quote
shmit Posted July 23, 2007 Author Posted July 23, 2007 заметил что ругань идет кадрые 2 тысячи сначала 0x1FC00000 потом 0x1FC02000 итд Вставить ник Quote
tchern Posted July 23, 2007 Posted July 23, 2007 goblin# jtag JTAG Tools 0.6-cvs-20051228 Copyright © 2002, 2003 ETC s.r.o. JTAG Tools is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for JTAG Tools. Warning: JTAG Tools may damage your hardware! Type "quit" to exit! Type "help" for help. jtag> cable parallel 0x378 WIGGLER Initializing Macraigor Wiggler JTAG Cable on parallel port at 0x378 jtag> detect IR length: 5 Chain length: 1 Device Id: 00000000000000000000000000000001 Unknown manufacturer! chain.c(110) Part 0 without active instruction chain.c(133) Part 0 without active instruction chain.c(110) Part 0 without active instruction jtag> include atheros/ar2312/ar2312 jtag> poke 0x58400000 0x000e3ce1 ImpCode=01000000010000000100000000000000 EJTAG version: 2.6 EJTAG Implementation flags: R4k ASID_8 NoDMA MIPS32 jtag> detectflash 0x1fc00000 dev ID=0049 man ID=0001 Using CFI flash chip detection, not jedec Query identification string: Primary Algorithm Command Set and Control Interface ID Code: 0x0002 (AMD/Fujitsu Standard Command Set) Alternate Algorithm Command Set and Control Interface ID Code: 0x0000 (null) Query system interface information: Vcc Logic Supply Minimum Write/Erase or Write voltage: 2700 mV Vcc Logic Supply Maximum Write/Erase or Write voltage: 3600 mV Vpp [Programming] Supply Minimum Write/Erase voltage: 0 mV Vpp [Programming] Supply Maximum Write/Erase voltage: 0 mV Typical timeout per single byte/word program: 16 us Typical timeout for maximum-size multi-byte program: 0 us Typical timeout per individual block erase: 1024 ms Typical timeout for full chip erase: 0 ms Maximum timeout for byte/word program: 512 us Maximum timeout for multi-byte program: 0 us Maximum timeout per individual block erase: 16384 ms Maximum timeout for chip erase: 0 ms Device geometry definition: Device Size: 2097152 B (2048 KiB, 2 MiB) Flash Device Interface Code description: 0x0002 (x8/x16) Maximum number of bytes in multi-byte program: 1 Number of Erase Block Regions within device: 4 Erase Block Region Information: Region 0: Erase Block Size: 16384 B (16 KiB) Number of Erase Blocks: 1 Region 1: Erase Block Size: 8192 B (8 KiB) Number of Erase Blocks: 2 Region 2: Erase Block Size: 32768 B (32 KiB) Number of Erase Blocks: 1 Region 3: Erase Block Size: 65536 B (64 KiB) Number of Erase Blocks: 31 jtag> flashmem 0x1fc00000 2100.boot program blocks: Chip: AMD Flash Manufacturer: AMD Chip: AM29LV160DB Protected: 0000 flash_unlock_block 0x1FC00000 IGNORE block 0 unlocked flash_erase_block 0x1FC00000 ............................................................................flas h_erase_block 0x1FC00000 DONE erasing block 0 to program 16384 bytes, status: 0 flash_unlock_block 0x1FC04000 IGNORE block 1 unlocked flash_erase_block 0x1FC04000 ..............................................................................fl ash_erase_block 0x1FC04000 DONE erasing block 1 to program 8192 bytes, status: 0 ^Cdr: 0x1FC04CC0 goblin# работает и во freebsd собрано под debian Вставить ник Quote
shmit Posted July 24, 2007 Author Posted July 24, 2007 (edited) наконец мне удалось прошить точку через jtag, несмотря на вылетающие ошибки ;) чтобы зашить bootloader у меня шуло часа 3, страшно падумать сколько будит шиться вся флэшка в 4 мегабайта! может можно как-то побыстрее? сейчас буду пробывать зашить redboot ;) Edited July 24, 2007 by shmit Вставить ник Quote
yKpon Posted December 8, 2007 Posted December 8, 2007 (edited) http://forum.nag.ru/forum/index.php?showto...39798&st=20 Edited December 11, 2007 by yKpon Вставить ник Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.