sigrok:sigrok-firmware-fx2lafw.git
5 years agocypress-fx2: Use FX2 configuration instead of FX2LP build
Alexandru Gagniuc [Mon, 7 Jan 2013 08:36:44 +0000 (02:36 -0600)]
cypress-fx2: Use FX2 configuration instead of FX2LP

Change the memory layout of the cypress-fx2 firmware to the FX2 config. This
allows us to support FX2 non-LP chips, with their constrained memory space.

The firmware loads and runs on the FX2 without any detected issues. According
to the Technical Reference Manuals for the FX2 and FX2LP, there are no
differences in the context of fx2lafw (other than the memory size)

The Migration Guide (AN4078), references workarounds for the FX2 which are not
needed on the FX2LP:

1) Enumeration with 100mA current limit.
2) Disconnecting and reconnecting the USB layer after a hard reset.
3) Workaround for PID mismatch on isochronous IN transfers.

Issue 1 will need fixing, since the FX2 exits out of reset consuming more than
150 mA, thus being out of USB spec.

Issue 2 is of less concern, as few devices have a reset button.

Issue 3 has not (as of yet) been encountered.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
5 years agoFX2(non-LP): Add configuration for old FX2 chips
Alexandru Gagniuc [Mon, 7 Jan 2013 08:31:46 +0000 (02:31 -0600)]
FX2(non-LP): Add configuration for old FX2 chips

Add a configuration for older FX2 chips. The descriptors and vector tables are
moved to fit in the 8KB memory, and the high region at 0XE000 is used as the
data RAM. The amount of data RAM remains identical to the one used for FX2LP
parts, while freeing 512KB of low memory. This memory is used to increase the
available code memory, giving us (without descriptors), 7.5KB of usable code
memory.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
5 years agobuild: Allow default fx2lib configuration to be overridden
Alexandru Gagniuc [Mon, 7 Jan 2013 08:24:49 +0000 (02:24 -0600)]
build: Allow default fx2lib configuration to be overridden

The default fx2lib allows the memory configuration to be overridden by defining
the memory regions in an external makefile.

Move the FX2LP configuration in config/fx2lp.mk, and include it in every
makefile in hw/*/. The configuration itself is not changed, and thus the output
should stay the same.

Being able to customize the configuration without modifying fx2lib allows us to
seamlessly support chips with different RAM layouts (FX2 vs FX2LP).

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
5 years agobuild: Do not recompile files if not needed
Alexandru Gagniuc [Mon, 7 Jan 2013 07:09:31 +0000 (01:09 -0600)]
build: Do not recompile files if not needed

The use of .PHONY targets meant that every target in hw/ would be recompiled
every time make was run, even if recompilation was not needed, and even if no
modification was performed from the lase 'make'.

Drop the use of .PHONY targets, and use real targets instead. This fixes the
needless recompilation issue.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
5 years agobuild: Simplify makefile
Alexandru Gagniuc [Sun, 6 Jan 2013 21:01:09 +0000 (15:01 -0600)]
build: Simplify makefile

Don't declare each target in several places (build, clean, install, .PHONY,
etc). This is error-prone.

Declare a all targets in one variable, TARGETS, and work with $(TARGETS) instead
of hardcoded target names throughout the makefile.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
5 years agoUse makebin if objcopy is not available. master
Uwe Hermann [Thu, 22 Nov 2012 22:16:41 +0000 (23:16 +0100)]
Use makebin if objcopy is not available.

Some systems might not have objcopy (e.g. on Mac OS it might not be
available per default). We use objcopy if it is found, otherwise we try
to use the 'makebin' utility (shipped with sdcc) instead.

Thanks 'Harble' on IRC for the report.

5 years agoFix #include guard names.
Uwe Hermann [Tue, 16 Oct 2012 13:28:41 +0000 (15:28 +0200)]
Fix #include guard names.

5 years agoAdd a HACKING file.
Uwe Hermann [Tue, 16 Oct 2012 13:24:29 +0000 (15:24 +0200)]
Add a HACKING file.

5 years agoMakefile: Update repo URL.
Uwe Hermann [Wed, 10 Oct 2012 22:53:54 +0000 (00:53 +0200)]
Makefile: Update repo URL.

5 years agoREADME: Add status, update URL, add more info.
Uwe Hermann [Wed, 10 Oct 2012 21:58:33 +0000 (23:58 +0200)]
README: Add status, update URL, add more info.

5 years agoAdd basic support for USBee DX and clones
Ivan Fedorov [Tue, 31 Jul 2012 20:26:54 +0000 (00:26 +0400)]
Add basic support for USBee DX and clones

5 years agoAdd .gitignore
Ivan Fedorov [Tue, 31 Jul 2012 20:24:16 +0000 (00:24 +0400)]
Add .gitignore

5 years agoMakefile: Add a 'distbin' target.
Uwe Hermann [Tue, 24 Jul 2012 19:04:50 +0000 (21:04 +0200)]
Makefile: Add a 'distbin' target.

This creates a sigrok-firmware-fx2lafw-bin-x.y.z.tar.gz tarball which
only contains pre-built *.fw files (and some docs), but no source code
of fx2lafw.

This tarball can be provided as a convenience download for users who do
not want to mess with building their own firmware files from source.

5 years agoNEWS: Add today's date as release date for 0.1.0.
Uwe Hermann [Tue, 24 Jul 2012 14:36:30 +0000 (16:36 +0200)]
NEWS: Add today's date as release date for 0.1.0.

5 years agoMakefile.include: Fix build on MinGW/Windows.
Uwe Hermann [Tue, 24 Jul 2012 14:35:06 +0000 (16:35 +0200)]
Makefile.include: Fix build on MinGW/Windows.

The trailing slash causes issues on MinGW/Windows, apparently.

5 years agoUpdate install instructions.
Uwe Hermann [Mon, 23 Jul 2012 13:40:25 +0000 (15:40 +0200)]
Update install instructions.

5 years agoDrop fx2lib files we don't really need.
Uwe Hermann [Mon, 23 Jul 2012 13:20:05 +0000 (15:20 +0200)]
Drop fx2lib files we don't really need.

Document the origins and license of the fx2lib code more precisely.

5 years agoDon't ship the .git/ directory in the tarball.
Uwe Hermann [Mon, 23 Jul 2012 12:55:04 +0000 (14:55 +0200)]
Don't ship the .git/ directory in the tarball.

5 years agoFix 'make clean'.
Uwe Hermann [Sun, 22 Jul 2012 16:29:48 +0000 (18:29 +0200)]
Fix 'make clean'.

Things like "rm -f *.{asm,ihx,lnk,lst,map,mem,rel,rst,sym,adb,cdb,lib}"
aren't really portable or work everywhere.

Also, invoke fx2lib's clean upon an fx2lafw clean.

5 years agoMakefiles: Add missing "2>/dev/null" in some places.
Uwe Hermann [Sun, 22 Jul 2012 16:22:15 +0000 (18:22 +0200)]
Makefiles: Add missing "2>/dev/null" in some places.

5 years agos/make/$(MAKE)/ to fix build on FreeBSD.
Uwe Hermann [Sun, 22 Jul 2012 16:19:15 +0000 (18:19 +0200)]
s/make/$(MAKE)/ to fix build on FreeBSD.

On FreeBSD (and possibly) elsewhere you'd invoke the build via "gmake",
thus hardcoded "make" invokations in our Makefiles will break the build.

Use $(MAKE) everywhere, which always does the right thing.

5 years agoAdd initial NEWS file.
Uwe Hermann [Wed, 18 Jul 2012 17:27:18 +0000 (19:27 +0200)]
Add initial NEWS file.

5 years agoAdd 'dist' target which creates a tarball.
Uwe Hermann [Wed, 18 Jul 2012 17:15:13 +0000 (19:15 +0200)]
Add 'dist' target which creates a tarball.

5 years agoMakefile: Add a 'ChangeLog' target.
Uwe Hermann [Wed, 18 Jul 2012 17:05:42 +0000 (19:05 +0200)]
Makefile: Add a 'ChangeLog' target.

5 years agoMakefile: Add an 'install' target.
Uwe Hermann [Wed, 18 Jul 2012 17:02:29 +0000 (19:02 +0200)]
Makefile: Add an 'install' target.

This installs all *.fw files into /usr/local/share/sigrok-firmware,
which can be overridden via DESTDIR, like this:

 make install DESTDIR=/tmp/foo

5 years agoRemove obsolete and unused DEBUG code.
Uwe Hermann [Wed, 18 Jul 2012 16:52:59 +0000 (18:52 +0200)]
Remove obsolete and unused DEBUG code.

5 years agoCosmetics, update docs.
Uwe Hermann [Tue, 17 Jul 2012 15:47:56 +0000 (17:47 +0200)]
Cosmetics, update docs.

5 years agoAdd missing #include guards.
Uwe Hermann [Wed, 18 Jul 2012 10:49:43 +0000 (12:49 +0200)]
Add missing #include guards.

Without them there will be issues sooner or later, and the build _is_
broken already on MinGW without them.

5 years agoFix a left-over __data in our fx2lib copy.
Uwe Hermann [Wed, 18 Jul 2012 10:34:32 +0000 (12:34 +0200)]
Fix a left-over __data in our fx2lib copy.

5 years agoUpdate fx2lafw code to work with recent sdcc.
Uwe Hermann [Wed, 18 Jul 2012 10:24:26 +0000 (12:24 +0200)]
Update fx2lafw code to work with recent sdcc.

5 years agoSupport old and new sdcc/sdas8051/asx8051 versions.
Uwe Hermann [Wed, 18 Jul 2012 10:16:21 +0000 (12:16 +0200)]
Support old and new sdcc/sdas8051/asx8051 versions.

Tested on Debian with old and new sdcc (2.9.0 and 3.1.0).

Testers for Fedora and other distros are welcome!

5 years agoImport fx2lib into fx2lafw directly.
Uwe Hermann [Wed, 18 Jul 2012 09:31:24 +0000 (11:31 +0200)]
Import fx2lib into fx2lafw directly.

We want a local fx2lib copy in fx2lafw for various reasons, e.g. to make
life simpler for all distros (none of which ship any fx2lib packages,
and neither would it make sense to do so really), and as we'll want/need
local changes to fix build issues and possibly other stuff anyway.

This copy of fx2lib is not the main upstream version from

  git://github.com/mulicheng/fx2lib.git

which has been last updated in 2010, but rather from

  git://github.com/ubixum/fx2lib.git

The only difference is that the latter contains one patch which fixes
some issues with more recent sdcc versions (interrupt vs. __interrupt,
_asm vs. __asm, xdata vs. __xdata__, and many others).

The imported fx2lib copy is "416c104cbd" from Feb 12, 2012.

5 years agoREADME: Update usage instructions.
Uwe Hermann [Mon, 25 Jun 2012 23:47:27 +0000 (01:47 +0200)]
README: Update usage instructions.

6 years agoCosmetics.
Uwe Hermann [Thu, 10 May 2012 21:55:33 +0000 (23:55 +0200)]
Cosmetics.

6 years agoSupport wide sampling
Joel Holdsworth [Mon, 7 May 2012 14:58:04 +0000 (15:58 +0100)]
Support wide sampling

6 years agoAdded support for 100kHz and 50kHz sampling
Joel Holdsworth [Mon, 7 May 2012 11:42:45 +0000 (12:42 +0100)]
Added support for 100kHz and 50kHz sampling

6 years agoRemoved a magic number
Joel Holdsworth [Fri, 20 Apr 2012 18:56:11 +0000 (19:56 +0100)]
Removed a magic number

6 years agoMade the DP state the DATA sample state
Joel Holdsworth [Thu, 19 Apr 2012 20:02:50 +0000 (21:02 +0100)]
Made the DP state the DATA sample state

6 years agoMoved GPIF state generator code into helper functions
Joel Holdsworth [Thu, 19 Apr 2012 20:00:16 +0000 (21:00 +0100)]
Moved GPIF state generator code into helper functions

6 years agofx2lafw: Support for querying REVID.
Uwe Hermann [Sun, 6 May 2012 17:47:04 +0000 (19:47 +0200)]
fx2lafw: Support for querying REVID.

6 years agofx2lafw: Add Braintechnology USB-LPS support.
Uwe Hermann [Sun, 6 May 2012 15:10:23 +0000 (17:10 +0200)]
fx2lafw: Add Braintechnology USB-LPS support.

6 years agocypress-fx2/Makefile: Add missing 'fx2lafw-' prefix.
Uwe Hermann [Wed, 18 Apr 2012 22:45:29 +0000 (00:45 +0200)]
cypress-fx2/Makefile: Add missing 'fx2lafw-' prefix.

Otherwise the generated .fw filename will be incorrect.

6 years agoAdded support for Default Cypress FX2 without EEPROM
Joel Holdsworth [Wed, 18 Apr 2012 21:25:15 +0000 (22:25 +0100)]
Added support for Default Cypress FX2 without EEPROM

6 years agoAdded dscr.inc to reduce duplication in dscr.a51 files
Joel Holdsworth [Wed, 18 Apr 2012 21:22:33 +0000 (22:22 +0100)]
Added dscr.inc to reduce duplication in dscr.a51 files

6 years agoCosmetics, coding style.
Uwe Hermann [Tue, 10 Apr 2012 20:16:25 +0000 (22:16 +0200)]
Cosmetics, coding style.

6 years agoImplemented CMD_GET_FW_VERSION
Joel Holdsworth [Tue, 10 Apr 2012 17:30:46 +0000 (18:30 +0100)]
Implemented CMD_GET_FW_VERSION

6 years agoCorrected a typo in the root makefile
Joel Holdsworth [Sat, 7 Apr 2012 16:39:57 +0000 (17:39 +0100)]
Corrected a typo in the root makefile

6 years agoRemoved unneeded declarations
Joel Holdsworth [Sat, 24 Mar 2012 12:46:29 +0000 (12:46 +0000)]
Removed unneeded declarations

6 years agoAdded missing command to clean rule
Joel Holdsworth [Sat, 24 Mar 2012 12:36:41 +0000 (12:36 +0000)]
Added missing command to clean rule

6 years agoMoved main() into fx2lafw.c
Joel Holdsworth [Sat, 24 Mar 2012 12:29:25 +0000 (12:29 +0000)]
Moved main() into fx2lafw.c

6 years agoRemoved debug script
Joel Holdsworth [Sat, 24 Mar 2012 12:25:35 +0000 (12:25 +0000)]
Removed debug script

6 years agoUpsized EP2 FIFO to 4x 1024
Joel Holdsworth [Wed, 14 Mar 2012 22:21:13 +0000 (22:21 +0000)]
Upsized EP2 FIFO to 4x 1024

6 years agoRemoved debug routines - they turned out not to be so useful, and occupy valuable...
Joel Holdsworth [Wed, 14 Mar 2012 21:44:08 +0000 (21:44 +0000)]
Removed debug routines - they turned out not to be so useful, and occupy valuable FIFO space

6 years agoReplaced gpif-capture with gpif-acquisition saleae-logic/Makefile
Joel Holdsworth [Tue, 13 Mar 2012 18:34:09 +0000 (18:34 +0000)]
Replaced gpif-capture with gpif-acquisition saleae-logic/Makefile

6 years agoAdded support for USBee SX
Joel Holdsworth [Mon, 12 Mar 2012 22:13:20 +0000 (22:13 +0000)]
Added support for USBee SX

6 years agoAdded rules to Makefile to convert firmware to binary
Joel Holdsworth [Mon, 12 Mar 2012 22:07:33 +0000 (22:07 +0000)]
Added rules to Makefile to convert firmware to binary

6 years agoReset EP2 when GPIF acquisition completes
Joel Holdsworth [Sun, 11 Mar 2012 20:52:53 +0000 (20:52 +0000)]
Reset EP2 when GPIF acquisition completes

6 years agoFixed GPIF waveform branch, and annotated population code
Joel Holdsworth [Sun, 11 Mar 2012 15:36:03 +0000 (15:36 +0000)]
Fixed GPIF waveform branch, and annotated population code

6 years agoNot need to SYNCDELAY after writing to GPIF_WAVE_DATA
Joel Holdsworth [Sun, 11 Mar 2012 15:03:52 +0000 (15:03 +0000)]
Not need to SYNCDELAY after writing to GPIF_WAVE_DATA

6 years agoNo need to populate reserved words
Joel Holdsworth [Sun, 11 Mar 2012 15:03:06 +0000 (15:03 +0000)]
No need to populate reserved words

6 years agoSpecify that one transaction will occur in each acquisition
Joel Holdsworth [Sun, 11 Mar 2012 14:38:59 +0000 (14:38 +0000)]
Specify that one transaction will occur in each acquisition

6 years agoCorrected EP2FIFOCFG setup
Joel Holdsworth [Sat, 10 Mar 2012 22:46:25 +0000 (22:46 +0000)]
Corrected EP2FIFOCFG setup

6 years agoEnsure GPIF is idle before reconfiguration
Joel Holdsworth [Sat, 10 Mar 2012 22:46:00 +0000 (22:46 +0000)]
Ensure GPIF is idle before reconfiguration

6 years agoDo not read-modify-write IFCONFIG
Joel Holdsworth [Sat, 10 Mar 2012 22:45:16 +0000 (22:45 +0000)]
Do not read-modify-write IFCONFIG

6 years agoDo not change device id after firmware download
Joel Holdsworth [Sun, 4 Mar 2012 18:01:25 +0000 (18:01 +0000)]
Do not change device id after firmware download

6 years agoRenamed fx2lafw_run to fx2lafw_poll
Joel Holdsworth [Sun, 4 Mar 2012 14:50:28 +0000 (14:50 +0000)]
Renamed fx2lafw_run to fx2lafw_poll

6 years agoImplemented sample rate control
Joel Holdsworth [Sun, 4 Mar 2012 14:13:27 +0000 (14:13 +0000)]
Implemented sample rate control

6 years agoRemoved CMD_STOP and renumbered commands
Joel Holdsworth [Sat, 3 Mar 2012 17:04:25 +0000 (17:04 +0000)]
Removed CMD_STOP and renumbered commands

6 years agoMoved command definitions into command.h
Joel Holdsworth [Sat, 3 Mar 2012 16:21:57 +0000 (16:21 +0000)]
Moved command definitions into command.h

6 years agoRemoved CMD_SET_SAMPLRATE
Joel Holdsworth [Sat, 3 Mar 2012 15:00:27 +0000 (15:00 +0000)]
Removed CMD_SET_SAMPLRATE

6 years agoGenerate GPIF WAVEDATA on demand
Joel Holdsworth [Sat, 3 Mar 2012 10:15:46 +0000 (10:15 +0000)]
Generate GPIF WAVEDATA on demand

6 years agoMoved gpif code out to separate source file
Joel Holdsworth [Wed, 29 Feb 2012 20:45:02 +0000 (20:45 +0000)]
Moved gpif code out to separate source file

6 years agoUpdate README.
Uwe Hermann [Wed, 22 Feb 2012 23:26:10 +0000 (00:26 +0100)]
Update README.

6 years agoMove dscr.a51 to individual project subdirs.
Uwe Hermann [Wed, 22 Feb 2012 23:18:48 +0000 (00:18 +0100)]
Move dscr.a51 to individual project subdirs.

6 years agoMove individual firmware projects to hw/ subdir.
Uwe Hermann [Wed, 22 Feb 2012 23:16:44 +0000 (00:16 +0100)]
Move individual firmware projects to hw/ subdir.

6 years agoAdd saleae-logic/ subdir/project.
Uwe Hermann [Wed, 22 Feb 2012 23:13:26 +0000 (00:13 +0100)]
Add saleae-logic/ subdir/project.

6 years agoAdd top-level Makefile.
Uwe Hermann [Wed, 22 Feb 2012 22:54:30 +0000 (23:54 +0100)]
Add top-level Makefile.

Also, rename fx2lafw.mk to Makefile.include.

6 years agoVarious cosmetics and bugfixes.
Uwe Hermann [Wed, 22 Feb 2012 22:30:13 +0000 (23:30 +0100)]
Various cosmetics and bugfixes.

6 years agoMoved includes into a common include directory
Joel Holdsworth [Sat, 18 Feb 2012 17:08:25 +0000 (17:08 +0000)]
Moved includes into a common include directory

6 years agoMoved main() in cwav-usbeeax
Joel Holdsworth [Sat, 18 Feb 2012 17:05:42 +0000 (17:05 +0000)]
Moved main() in cwav-usbeeax

6 years agoAdded root as an include directory
Joel Holdsworth [Sat, 18 Feb 2012 17:06:14 +0000 (17:06 +0000)]
Added root as an include directory

6 years agoAdded autovector include to fx2lafw header. Software will crash without it
Joel Holdsworth [Sat, 18 Feb 2012 18:05:25 +0000 (18:05 +0000)]
Added autovector include to fx2lafw header. Software will crash without it

6 years agoAdded first device specific directory for the CWAV USBee AX
Joel Holdsworth [Sat, 18 Feb 2012 17:00:19 +0000 (17:00 +0000)]
Added first device specific directory for the CWAV USBee AX

6 years agoRearranged main() in preparation for split according to device versions
Joel Holdsworth [Sat, 18 Feb 2012 16:43:25 +0000 (16:43 +0000)]
Rearranged main() in preparation for split according to device versions

6 years agoImplemented _assert
Joel Holdsworth [Sat, 18 Feb 2012 09:29:34 +0000 (09:29 +0000)]
Implemented _assert

6 years agoAdded INFO, WARN and ERR macros
Joel Holdsworth [Sat, 18 Feb 2012 09:29:04 +0000 (09:29 +0000)]
Added INFO, WARN and ERR macros

6 years agoAdded a debug client
Joel Holdsworth [Sat, 18 Feb 2012 12:52:24 +0000 (12:52 +0000)]
Added a debug client

6 years agoAdded basic debugf for sending debug messages over USB
Joel Holdsworth [Sat, 18 Feb 2012 08:50:24 +0000 (08:50 +0000)]
Added basic debugf for sending debug messages over USB

6 years agoAllow path to fx2lib to be set with a variable
Joel Holdsworth [Wed, 15 Feb 2012 20:12:37 +0000 (20:12 +0000)]
Allow path to fx2lib to be set with a variable

6 years agoDraft how commands could be implemented.
Uwe Hermann [Tue, 21 Feb 2012 00:44:50 +0000 (01:44 +0100)]
Draft how commands could be implemented.

6 years agoEliminate EP1, commands should use EP0.
Uwe Hermann [Tue, 21 Feb 2012 00:30:33 +0000 (01:30 +0100)]
Eliminate EP1, commands should use EP0.

The protocol should be implemented using control requests of type
'vendor-specific' (bmRequestType[6:5] = 2).

6 years agoDocument USB language identifier document location.
Uwe Hermann [Tue, 21 Feb 2012 00:15:07 +0000 (01:15 +0100)]
Document USB language identifier document location.

6 years agoUse #defines for REVCTL bits.
Uwe Hermann [Tue, 21 Feb 2012 00:12:03 +0000 (01:12 +0100)]
Use #defines for REVCTL bits.

6 years agoFirst somewhat working GPIF waveform and setup code.
Uwe Hermann [Mon, 20 Feb 2012 23:55:23 +0000 (00:55 +0100)]
First somewhat working GPIF waveform and setup code.

This samples data forever, and has no mechanism to detect or report lost
samples. This is just for testing purposes, do not use productively!

6 years agoFirst attempt at a sampling GPIF waveform (untested!).
Uwe Hermann [Sat, 18 Feb 2012 20:40:29 +0000 (21:40 +0100)]
First attempt at a sampling GPIF waveform (untested!).

6 years agoREADME: Add git repo URL.
Uwe Hermann [Tue, 14 Feb 2012 20:40:54 +0000 (21:40 +0100)]
README: Add git repo URL.

6 years agoInitial version (work in progress).
Uwe Hermann [Tue, 14 Feb 2012 20:22:55 +0000 (21:22 +0100)]
Initial version (work in progress).

This does not work, yet.