From: Wojciech A. K. <wk...@Fr...> - 2010-02-08 19:26:21
|
On Tue, Jan 19, 2010 at 05:15:01PM +0100, Uwe Bonnes wrote: > >>>>> "Wojciech" == Wojciech A Koszek <wk...@Fr...> writes: > > ... > Wojciech> Before I prepare a port of xc3sprog for FreeBSD, I'll probably > Wojciech> send you some more stuff. I want your xc3sprog to be > Wojciech> identified well (Author+project URL), so that there is no > Wojciech> confusion with Andrew Rogers' stuff and XUP code. > > Wojciech> Do they have something which your code doesn't have? > > I started from Rogers sources, so everything should be included. > > XUP uses a different firmware for the DLC9/10 dongles. No need for the a > different firmware with kawk's reverse engineering the Xilinx protocoll. I > didn't check if they added anythging else. > > >> I added the errno.h in the FreeBSD conditional path. (Rev 428) > >> > >> A CMAKE Toolchain File is only needed for crosscompiling. Did you > >> crosscompile? Or does CMAKE not work appropriate on FreeBSD? It's > >> added as Rev 429. > > Wojciech> I just assumed you pick one CMAKE file for one family of > Wojciech> systems. Can you use this string (system name) in the xc3sprog > Wojciech> output somehow? > > Normally you start "cmake" and it should configure for the running > system. Toolchainfiles only needed for crosscompiling. As I run on Suse > 64-bit, I needed the Toolchain-SUSE32.cmake to compile the 32-bit binary. Sorry for delay. Indeed 'cmake' works for me. I don't have a setup to try cross-compilation out.. Don't remove the file yet -- I'll keep you posted. Andrew Rogers, XUP people and your code share the same name. So if I say "xc3sprog" to someone new with those projects, we'll probably pick Andrew's code. My idea is to modify existing "hello message": Free software: If you contribute nothing, expect nothing! Please provide feedback on success/failure/enhancement requests! Check Sourceforge SVN for updates! To something more meaningful. Ideally, xc3sprog program would become 'xilprog' or similar to cut off the historical baggage, but it's probably too late. To help a bit, I propose this patch: http://freebsd.czest.pl/~wkoszek/fpga/xc3sprog.1.patch (hand-edited patch against revision 426). It generates: xc3sprog project (c) 2005-2010 Uwe Bonnes bo...@el... WWW: http://sourceforge.net/projects/xc3sprog Release: $Rev: 426 $ System: FreeBSD(i386): 9.0-CURRENT usage: xc3sprog [options] <bitfile> Possible options: -h Print this help. -c Choose programmer type [pp|ftdi|fx2|xpc]. -C Verify device against file (no programming). -e file EEPROM file. -f file File with fuse bits. -i Input file format (BIT|BIN|MCS|MCSREV|HEX). -I Work on connected SPI Flash (ISF Mode). (after 'bscan_spi' bitfile for device has been loaded). -j Detect JTAG chain, nothing else (default action). -L Program lockbits if defined in fusefile. -m <dir> Directory with XC2C mapfiles. -o Output file format (BIT|BIN|MCS|MCSREV|HEX). -p Possition in the JTAG chain. -r Read from device and write to file. -T val Test chain 'val' times (0 = forever) or 10000 times default. In ISF Mode, test the SPI connection. -v Verbose output. Programmer specific options: -d (pp only ) Parallel port device. -t (xpc only ) NONE or INT (Internal Chain , not for DLC10)) -s num (ftdi/fx only) Serial number string. -t type (ftdi/fx only) Type can be [NONE|IKDA|OLIMEX|FTDI_JTAG|AMONTEC]. -P pid (ftdi/fx only) Product ID. -S desc (ftdi/fx only) Product ID string. -V vid (ftdi/fx only) Vendor ID. Apart from that, it removes redundant ":" after 'T' and removes 'D' from getopt(), which isn't supported. I'd also stay away from falling back to parallel port and all sorts of autodetection. No -c given should be considered a mistake, IMO. > ... > Wojciech> At home I'll just comment it out and perform some tests with > Wojciech> small/big bitfiles and see if everything is more broken. > > Look at the -T0 option to keep JTAG busy. This is what I did: wkoszek@laptop:/media/Multimedia/fpga/XC3SPROG/xc3sprog/trunk/build# ./xc3sprog -T0 -c xpc /home/wkoszek/fpga/fbsd-prog/xup-0.0.2/w/wkoszek_leds/leds.bit Release $Rev: 426 $ Free software: If you contribute nothing, expect nothing! Please provide feedback on success/failure/enhancement requests! Check Sourceforge SVN for updates! usb_control_msg(0x42.1 Unknown error firmware version = 0x0404 (1028) CPLD version = 0x0012 (18) Reading ID_CODE 2147483647 times Sending 22 bits IDCODE Commands: 0x01fe09 Expecting 3 IDCODES : 0x06e5e093 0xf5046093 0x41c22093 This 'usb_control_msg(0x42.1 Unknown error' appears here as well. BTW, a friend of mine confirmed that he can program his S3ESK board under his FreeBSD 8 system without a problem with some of my random notes. -- Wojciech A. Koszek wk...@Fr... http://FreeBSD.czest.pl/~wkoszek/ |