- Timestamp:
- Aug 27, 2009, 2:37:55 PM (15 years ago)
- Location:
- trunk/FirmwareFX2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FirmwareFX2/dscr.a51
r4 r5 315 315 .db <str1, >str1 316 316 .db <str2, >str2 317 .db <str3, >str3318 317 _string_descriptors_end: 319 318 … … 335 334 str1: .db str1_end - str1 336 335 .db DSCR_STRING 337 .db 'F, 0 ; 16-bit unicode 338 .db 'Y, 0 339 .db 'N, 0 340 .db 'U, 0 336 .db 'A, 0 ; 16-bit unicode 337 .db 'l, 0 338 .db 't, 0 339 .db 'e, 0 340 .db 'r, 0 341 .db 'a, 0 341 342 str1_end: 342 343 … … 358 359 .db 'r, 0 359 360 str2_end: 360 361 SI_SERIAL = 3362 .even363 _str3::364 str3: .db str3_end - str3365 .db DSCR_STRING366 .db '0, 0367 .db '0, 0368 .db '0, 0369 .db '0, 0370 .db '0, 0371 .db '0, 0372 .db '0, 0373 .db '0, 0374 str3_end:375 -
trunk/FirmwareFX2/fx2/Makefile
r4 r5 19 19 CFLAGS+=-mmcs51 --no-xinit-opt -I. 20 20 CPPFLAGS+= 21 OBJS=delay.rel fx2utils.rel i2c.rel isr.rel timer.rel usb_common.rel 22 AR=sdcclib 21 23 22 %.rel : %.c 23 $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ 24 (%.rel) : %.c 25 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $*.rel 26 $(AR) -a $@ $*.rel 27 rm $*.rel 24 28 25 libfx2.lib: delay.rel fx2utils.rel i2c.rel isr.rel timer.rel usb_common.rel 26 rm -f $@ 27 touch $@ 28 for obj in $^ ; do basename $$obj .rel >> $@ ; done 29 libfx2.lib: libfx2.lib($(OBJS)) 29 30 30 31 clean: -
trunk/FirmwareFX2/readme.txt
r4 r5 2 2 =============================== 3 3 4 The code in this directory is for Cypress FX2 (e.g. CY7C68013A) and can be compiled with 5 the SDCC compiler (I tried version 2.6 as shipped with Ubuntu 6.10). Once I had a version 6 that could be compiled with Keil tools (until early 2007), but switched to SDCC because I 7 usually develop on a Linux host. 4 == General information == 8 5 9 No logic beside the FX2 itself and only a few external components are required for a basic 10 JTAG adapter. I don't have detailed schematics available; my test setup consists of a FX2 11 on a custom board where it's directly connected to a Cyclone FPGA. 6 The code in this directory is for Cypress FX2 (e.g. CY7C68013A) and can be 7 compiled with the SDCC compiler (I tried version 2.6 as shipped with Ubuntu 8 6.10). Once I had a version that could be compiled with Keil tools (until early 9 2007), but switched to SDCC because I usually develop on a Linux host. 10 11 No logic beside the FX2 itself and only a few external components are required 12 for a basic JTAG adapter. I don't have detailed schematics available; my test 13 setup consists of a FX2 on a custom board where it's directly connected to a 14 Cyclone FPGA. 12 15 13 16 ____________ … … 23 26 24 27 25 Similar eval boards are now available from fpga4fun.com - the boards named26 " Saxo-L" and "Xylo-EM" are pre-wired for use with an adapted version of my27 code, while"Saxo" and "Xylo" can be used after soldering 4 extra wires:28 Similar boards are available from fpga4fun.com - the boards named "Saxo-L" and 29 "Xylo-EM" are pre-wired for use with an adapted version of my code, while 30 "Saxo" and "Xylo" can be used after soldering 4 extra wires: 28 31 29 32 http://www.fpga4fun.com/board_Xylo.html 30 33 34 There's a discussion thread in the fpga4fun forum about this firmware: 35 36 http://www.fpga4fun.com/forum/viewtopic.php?t=483 37 38 39 == Adapting the code to your hardware == 31 40 32 41 As is, the code assumes the following pin assignment: … … 37 46 Port C.3: TMS 38 47 39 Other assignments are possible; you'll have to adapt the definitions in hardware.h and maybe 40 in hardware.c, too. 48 Other assignments are possible. If you have your signals connected to 49 bit-addressable I/O pins (port A,B,C or D), I suggest you make a copy of 50 hw_basic.c and adapt the definitions and ProgIO_Init() in it to your needs. 51 The file hw_saxo_l is even simpler to adapt if you want only JTAG and no AS/PS 52 mode. If your signals are not on bit-addressable I/Os (that is, you're using 53 port E), you could base your adaptation on the slower hw_xpcu_i.c. You may 54 specify the name of your adapted hardware-specific file when "make"ing, e.g.: 41 55 42 The USB identification data (vendor/product ID, strings, ...) can be modified in dscr.a51. My 43 firmware emulates the 128 byte EEPROM that usually holds configuration data for the FT245 and 44 which can be read from the host; its content is computed from the data in dscr.a51 as well. 56 make HARDWARE=hw_saxo_l 45 57 46 The WAKEUP pin should be high for the re-numeration to work reliably (thanks Jean/fpga4fun!)47 58 48 From this release on, there is new code to support running in the "Xilinx 49 Platform Cable USB". If you select HARDWARE=hw_xpcu_i or hw_xpcu_x at the top 50 of the Makefile, a firmware for the XPCU will be built. I've tested this only 51 with unmodified CPLD version 18 (0x12) on a Spartan-3E starter kit, as it was 52 programmed by my WebPack 8.2i. The code needs optimization; yet it is merely a 53 proof of concept. 59 The USB identification data (vendor/product ID, strings, ...) can be modified 60 in dscr.a51. The firmware emulates the 128 byte EEPROM that usually holds 61 configuration data for the FT245 and which can be read from the host; its 62 content (including checksum) is computed from the data in dscr.a51 as well. 63 64 The WAKEUP pin should be high for the re-numeration to work reliably (thanks 65 Jean/fpga4fun!). 66 67 68 == Using it with Xilinx JTAG cable == 69 70 There is code to support running in the "Xilinx Platform Cable USB". If you 71 select HARDWARE=hw_xpcu_i or hw_xpcu_x at the top of the Makefile, a firmware 72 for the XPCU will be built. I've tested this only with unmodified CPLD version 73 18 (0x12) on a Spartan-3E starter kit, as it was programmed by my WebPack 8.2i. 74 The code needs optimization; yet it is merely a proof of concept. 75 Compile for the XPCU with e.g. "make HARDWARE=hw_xpcu_x". 54 76 55 77 hw_xpcu_i: Access "internal" chain (the XPCU CPLD, IC3, itself) 56 78 hw_xpcu_x: Access "external" chain (the Spartan 3E, PROM, etc.) 79 80 81 == History == 82 83 Changes since previous release on 2007-02-15: 84 - Jean Nicolle contributed hw_saxo_l.c for the FX2 boards from fpga4fun.com 85 - fx2/Makefile fixed to build correct libfx2.lib even under Windows. 57 86 58 87 Changes since previous release on 2007-01-28: … … 60 89 - New FX2 code, based on USRP2 from the GNU Radio Project; 61 90 - Firmware can now be compiled using SDCC 2.6. No more Keil support. 62 - EEPROM content is automatically computed from d escriptors, including checksum.91 - EEPROM content is automatically computed from dscr.a51, including checksum. 63 92 64 93 Changes since initial release on 2006-04-23: 65 94 - added this readme.txt 66 - reorganized my project folder: diff isnow created from Subversion repository95 - reorganized my project folder: diff now created from Subversion repository 67 96 - stripped *.dist extension from eeprom.c and dscr.a51 68 97 - added unique proper product and vendor ID (thanks to Antti Lukats!)
Note:
See TracChangeset
for help on using the changeset viewer.