Logic Sniffer: OLS-loader utility
From DP
This utility is used to load new bitstreams for the FPGA. A bitstream update changes the logic that captures and stores samples.
Contents |
Latest Version for this Document
Logic Sniffer ROM loader v0.3 (September 30, 2010)
Options
- list of -flags and options
parameters: --port PORT - port of Logic Sniffer, needs to be specified. Same as -p Port --speed SPEED - sets speed of the serial port. Same as -s Speed --wH FILE - HEX file to be uploaded to OLS --wB FILE - BIN file to be uploaded to OLS --rH FILE - HEX file to be downloaded from OLS --rB FILE - BIN file to be downloaded from OLS --l X or -l X - send only first X paged commands: --erase - erases Flash, also same as using -e --write - writes data to Flash, as -w --read - reads data from Flash, same as -r --ignore_jedec - ignore jedec id, same as -i --run - enter run mode after finished, same as -r --status - get OLS status, same as -s --boot - enter bootloader mode - ignore other commands, same as -b --selftest - run self-test - ignore other commands
When no command specified, program will check FW version, and Flash ID
Usage examples
Notes on command parameters
This version supports the standard long and short option commandline parameters: the short option uses a single dash ('-') followed by a single character parameter, e.g -p while a long option uses double dash ('--') followed by single word or string e.g. --port the parameters 'wH', 'wR' uses only the long option parameter e.g. --wH filename
Windows
to Get help on parameters:
ols-loader ols-loader -h ols-loader --help ols-loader error-in-cmdline-parameters
to read the ols.hex file, OLS on COM3:
ols-loader --port COM3 --rH OLS.hex --read
its the same as
ols-loader -p COM3 --rH OLS.hex -r
To erase and write flash, data in BIN file 'OLS.bin', OLS on COM2:
ols-loader --port COM2 --wB OLS.hex --write --erase
or for the short options parameters:
ols-loader -p COM2 --wB OLS.hex -w -e
To get status, and jump to run mode, OLS on COM2:
ols-loader --port COM2 --run --status
or for the short option parameters:
ols-loader -p COM2 -r -s
Jump to bootloader
ols-loader --boot ols-loader -b
Run selftest (long commandline option parameter only)
ols-loader --selftest
Linux
The ols-loader code compiles without complain on debian5 build.
Commands and syntax are same with windows except for the port option which uses the /dev/ttySx
To read Flash to HEX file 'OLS.hex' from OLS on /dev/ttyS1:
./ols-loader --port /dev/ttyS1 --rH OLS.hex --read or ./ols-loader -p /dev/ttyS1 --rH OLS.hex -r
OSx
Not tested
Update Notes
This utility works similar in feature with the previous version (September 3, 2010) except that the commandline parameters was modified to follow the standard syntax.
1. The code now use the get_opt_long, which use the '--' (double dash) and also use the '-' (single dash) to specify command parameters.
2. The command line no longer use the colon ':' because of the use of get_opt_long function. eg. -port:com3 should now be --port com3 or -p com3.
3. Single dash use is always followed by single character, as opposed to double dash which use a string.
4. #define DPwrite write etc when not on _WIN32 os, instead of copy/pasting same functions as 'write' etc.
The code compiles without complain in both debian and Windows, under Code::Blocks 10.05
