]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blob - fx2lib/examples/NOTES
Import fx2lib into fx2lafw directly.
[sigrok-firmware-fx2lafw.git] / fx2lib / examples / NOTES
1 The examples here show various firmware examples and also various ways to
2 start new firmware projects as well as various ways to start communicating with your device.
3 In addition, you can look at the fx2.mk include and the example project Makefiles
4 to see how you might set up your own project.
5
6 For simple examples, you can ignore the link warnings. (Those pertain to the usb jump table
7 and device descriptor areas and are not used for all examples)
8
9 You can move up the food chain of programming languages pretty quickly if you like:
10
11       C:    Program Your Firmware
12     C++:    Write a libusb driver
13  Python:    Write Bindings for your driver so you can test things interactively!
14
15 fx2:
16  An example firmware loader and basic firmware terminal using the above strategy.
17  Requires libusb-1.0, Python 2.5
18
19  Installation:
20   cd fx2
21   python setup.py install
22
23
24  Use the fx2load w/ reset_bix function to load firmware onto a device.
25  Example:
26   python
27   > from fx2load import *
28   > openfx2()
29   > reset_bix('<path to bix file>')
30   > f.do_usb_command (.....
31   > f.ep_bulk(......
32  
33  There is also an fx2load script for doing the same thing with the command line.
34
35 eeprom:
36  Simple firmware for reading and writing information from the eeprom.  The client.py
37  file contains a function to read an existing prom image.
38
39
40 lights:
41  A really simple program that cycles the lights on the CY3864 development board.
42
43 bulkloop:
44  Demonstrations:
45   * looping data on endpoints.
46   * Custom device descriptor.
47   * Vendor commands.
48   * Usb jump table.
49   * serial IO
50
51 i2c:
52  A port of the Cypress i2c example.
53
54 reset:
55  Shows writing to the eeprom on the dev board.  The included iic data is the default data
56  on the dev board and you can use this program to reset your board back to the default 
57  state if you happen to write a non-working iic file to the device.  You shouldn't 
58  probably use this on a real board unless you really know what you're doing :)
59
60
61 serial:
62  A simple terminal echo firmware.  Echos whatever you type back to the serial terminal.
63
64 timers:
65  Demonstrates setting up timers t0, t1, and t2 to be 16 bit counters and also demonstrates
66  installing interrupts to process the timer overlow.
67