Changeset 5 for trunk/FirmwareFX2


Ignore:
Timestamp:
Aug 27, 2009, 2:37:55 PM (15 years ago)
Author:
demin
Message:

adapt to latest usb_jtag sources and altera drivers

Location:
trunk/FirmwareFX2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/FirmwareFX2/dscr.a51

    r4 r5  
    315315        .db        <str1, >str1
    316316        .db        <str2, >str2
    317         .db        <str3, >str3
    318317_string_descriptors_end:
    319318
     
    335334str1:   .db        str1_end - str1
    336335        .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
    341342str1_end:
    342343
     
    358359        .db        'r, 0
    359360str2_end:
    360 
    361         SI_SERIAL = 3
    362         .even
    363 _str3::
    364 str3:   .db        str3_end - str3
    365         .db        DSCR_STRING
    366         .db        '0, 0
    367         .db        '0, 0
    368         .db        '0, 0
    369         .db        '0, 0
    370         .db        '0, 0
    371         .db        '0, 0
    372         .db        '0, 0
    373         .db        '0, 0
    374 str3_end:
    375 
  • trunk/FirmwareFX2/fx2/Makefile

    r4 r5  
    1919CFLAGS+=-mmcs51 --no-xinit-opt -I.
    2020CPPFLAGS+=
     21OBJS=delay.rel fx2utils.rel i2c.rel isr.rel timer.rel usb_common.rel
     22AR=sdcclib
    2123
    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
    2428
    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
     29libfx2.lib: libfx2.lib($(OBJS))
    2930
    3031clean:
  • trunk/FirmwareFX2/readme.txt

    r4 r5  
    22===============================
    33
    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 ==
    85
    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.
     6The code in this directory is for Cypress FX2 (e.g. CY7C68013A) and can be
     7compiled with the SDCC compiler (I tried version 2.6 as shipped with Ubuntu
     86.10). Once I had a version that could be compiled with Keil tools (until early
     92007), but switched to SDCC because I usually develop on a Linux host.
     10
     11No logic beside the FX2 itself and only a few external components are required
     12for a basic JTAG adapter. I don't have detailed schematics available; my test
     13setup consists of a FX2 on a custom board where it's directly connected to a
     14Cyclone FPGA.
    1215
    1316        ____________
     
    2326
    2427
    25 Similar eval boards are now available from fpga4fun.com - the boards named
    26 "Saxo-L" and "Xylo-EM" are pre-wired for use with an adapted version of my
    27 code, while "Saxo" and "Xylo" can be used after soldering 4 extra wires:
     28Similar 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:
    2831
    2932        http://www.fpga4fun.com/board_Xylo.html
    3033
     34There'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 ==
    3140
    3241As is, the code assumes the following pin assignment:
     
    3746 Port C.3: TMS
    3847
    39 Other assignments are possible; you'll have to adapt the definitions in hardware.h and maybe
    40 in hardware.c, too.
     48Other assignments are possible. If you have your signals connected to
     49bit-addressable I/O pins (port A,B,C or D), I suggest you make a copy of
     50hw_basic.c and adapt the definitions and ProgIO_Init() in it to your needs.
     51The file hw_saxo_l is even simpler to adapt if you want only JTAG and no AS/PS
     52mode.  If your signals are not on bit-addressable I/Os (that is, you're using
     53port E), you could base your adaptation on the slower hw_xpcu_i.c. You may
     54specify the name of your adapted hardware-specific file when "make"ing, e.g.:
    4155
    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
    4557
    46 The WAKEUP pin should be high for the re-numeration to work reliably (thanks Jean/fpga4fun!)
    4758
    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.
     59The USB identification data (vendor/product ID, strings, ...) can be modified
     60in dscr.a51. The firmware emulates the 128 byte EEPROM that usually holds
     61configuration data for the FT245 and which can be read from the host; its
     62content (including checksum) is computed from the data in dscr.a51 as well. 
     63
     64The WAKEUP pin should be high for the re-numeration to work reliably (thanks
     65Jean/fpga4fun!).
     66
     67
     68== Using it with Xilinx JTAG cable ==
     69
     70There is code to support running in the "Xilinx Platform Cable USB". If you
     71select HARDWARE=hw_xpcu_i or hw_xpcu_x at the top of the Makefile, a firmware
     72for the XPCU will be built. I've tested this only with unmodified CPLD version
     7318 (0x12) on a Spartan-3E starter kit, as it was programmed by my WebPack 8.2i.
     74The code needs optimization; yet it is merely a proof of concept.
     75Compile for the XPCU with e.g. "make HARDWARE=hw_xpcu_x".
    5476
    5577 hw_xpcu_i: Access "internal" chain (the XPCU CPLD, IC3, itself)
    5678 hw_xpcu_x: Access "external" chain (the Spartan 3E, PROM, etc.)
     79
     80
     81== History ==
     82
     83Changes 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.
    5786
    5887Changes since previous release on 2007-01-28:
     
    6089  - New FX2 code, based on USRP2 from the GNU Radio Project;
    6190  - Firmware can now be compiled using SDCC 2.6. No more Keil support.
    62   - EEPROM content is automatically computed from descriptors, including checksum.
     91  - EEPROM content is automatically computed from dscr.a51, including checksum.
    6392
    6493Changes since initial release on 2006-04-23:
    6594  - added this readme.txt
    66   - reorganized my project folder: diff is now created from Subversion repository
     95  - reorganized my project folder: diff now created from Subversion repository
    6796  - stripped *.dist extension from eeprom.c and dscr.a51
    6897  - added unique proper product and vendor ID (thanks to Antti Lukats!)
Note: See TracChangeset for help on using the changeset viewer.