cycloader -> openFPGALoader

This commit is contained in:
Gwenhael Goavec-Merou 2019-12-06 11:51:47 +01:00
parent decb76d41d
commit 873b073423
5 changed files with 25 additions and 25 deletions

View File

@ -1,4 +1,4 @@
EXEC_NAME=cycloader EXEC_NAME=openFPGALoader
SRC= $(wildcard *.cpp) SRC= $(wildcard *.cpp)
OBJS= $(SRC:.cpp=.o) OBJS= $(SRC:.cpp=.o)
LDFLAGS=-lm -g -Wall -std=c++11 $(shell pkg-config --libs libftdipp1 libudev) LDFLAGS=-lm -g -Wall -std=c++11 $(shell pkg-config --libs libftdipp1 libudev)
@ -20,10 +20,10 @@ $(EXEC_NAME):$(OBJS)
$(CC) $(CFLAGS) -o $@ -c $< $(CC) $(CFLAGS) -o $@ -c $<
install: install:
cp -f cycloader /usr/local/bin cp -f openFPGALoader /usr/local/bin
mkdir -p /usr/local/share/cycloader mkdir -p /usr/local/share/openFPGALoader
cp -f test_sfl.svf /usr/local/share/cycloader cp -f test_sfl.svf /usr/local/share/openFPGALoader
cp -f spiOverJtag/*.bit /usr/local/share/cycloader cp -f spiOverJtag/*.bit /usr/local/share/openFPGALoader
clean: clean:
rm -rf *.o rm -rf *.o

View File

@ -1,4 +1,4 @@
# cycloader # openFPGALoader
Utility for programming Intel/Altera Cyclone Xilinx Serie 7 and Lattice MachXO3 Utility for programming Intel/Altera Cyclone Xilinx Serie 7 and Lattice MachXO3
__Current support:__ __Current support:__
@ -40,9 +40,9 @@ Currently, the install path is hardcoded to /usr/local
## Usage ## Usage
```bash ```bash
cycloader --help openFPGALoader --help
Usage: cycloader [OPTION...] BIT_FILE Usage: openFPGALoader [OPTION...] BIT_FILE
cycloader -- a program to flash cyclone10 LP FPGA openFPGALoader -- a program to flash cyclone10 LP FPGA
-b, --board=BOARD board name, may be used instead of cable -b, --board=BOARD board name, may be used instead of cable
-c, --cable=CABLE jtag interface -c, --cable=CABLE jtag interface
@ -63,35 +63,35 @@ To have complete help
With board name: With board name:
```bash ```bash
cycloader -b theBoard openFPGALoader -b theBoard
``` ```
With cable: With cable:
```bash ```bash
cycloader -c theCable openFPGALoader -c theCable
``` ```
With device node: With device node:
```bash ```bash
cycloader -d /dev/ttyUSBX openFPGALoader -d /dev/ttyUSBX
``` ```
**Note:** for some cable (like *digilent* adapters) signals from the converter **Note:** for some cable (like *digilent* adapters) signals from the converter
are not just directly to the FPGA. For this case, the *-c* must be added. are not just directly to the FPGA. For this case, the *-c* must be added.
**Note:** when -d is not provided, *cycloader* will opens the first *ftdi* **Note:** when -d is not provided, *openFPGALoader* will opens the first *ftdi*
found, if more than one converter is connected to the computer, found, if more than one converter is connected to the computer,
the *-d* option is the better solution the *-d* option is the better solution
#### Reset device #### Reset device
```bash ```bash
cycloader [options] -r openFPGALoader [options] -r
``` ```
#### load bitstream device (memory or flash) #### load bitstream device (memory or flash)
```bash ```bash
cycloader [options] /path/to/bitstream.ext openFPGALoader [options] /path/to/bitstream.ext
``` ```
### CYC1000 ### CYC1000
@ -104,7 +104,7 @@ quartus_cpf -c -q -g 3.3 -n 12.0MHz p project_name.sof project_name.svf
``` ```
file load: file load:
```bash ```bash
cycloader -b cyc1000 project_name.svf openFPGALoader -b cyc1000 project_name.svf
``` ```
#### SPI flash: #### SPI flash:
@ -114,7 +114,7 @@ quartus_cpf -o auto_create_rpd=on -c -d EPCQ16A -s 10CL025YU256C8G project_name.
``` ```
file load: file load:
```bash ```bash
cycloader -b cyc1000 -r project_name_auto.rpd openFPGALoader -b cyc1000 -r project_name_auto.rpd
``` ```
**Note about SPI flash: **Note about SPI flash:
@ -137,7 +137,7 @@ task must be done to generates this bitstream.
__file load:__ __file load:__
```bash ```bash
cycloader -b arty *.runs/impl_1/*.bit openFPGALoader -b arty *.runs/impl_1/*.bit
``` ```
#### SPI flash: #### SPI flash:
@ -163,7 +163,7 @@ vivado -nolog -nojournal -mode batch -source script.tcl -tclargs myproject
__file load:__ __file load:__
```bash ```bash
cycloader -b arty *.runs/impl_1/*.mcs openFPGALoader -b arty *.runs/impl_1/*.mcs
``` ```
### MachXO3 Starter Kit ### MachXO3 Starter Kit
@ -174,7 +174,7 @@ special must be done to generates this file.
__file load__: __file load__:
```bash ```bash
cycloader -b machXO3SK impl1/*.jed openFPGALoader -b machXO3SK impl1/*.jed
``` ```
### Trenz GOWIN LittleBee (TEC0117) ### Trenz GOWIN LittleBee (TEC0117)
@ -186,5 +186,5 @@ special must be done to generates this file.
__file load__: __file load__:
```bash ```bash
cycloader -b machXO3SK impl/pnr/*.fs openFPGALoader -b machXO3SK impl/pnr/*.fs
``` ```

View File

@ -5,7 +5,7 @@
#define IDCODE 6 #define IDCODE 6
#define IRLENGTH 10 #define IRLENGTH 10
#define BIT_FOR_FLASH "/usr/local/share/cycloader/test_sfl.svf" #define BIT_FOR_FLASH "/usr/local/share/openFPGALoader/test_sfl.svf"
Altera::Altera(FtdiJtag *jtag, std::string filename, bool verbose): Altera::Altera(FtdiJtag *jtag, std::string filename, bool verbose):
Device(jtag, filename, verbose), _svf(_jtag, _verbose) Device(jtag, filename, verbose), _svf(_jtag, _verbose)

View File

@ -44,9 +44,9 @@ struct arguments {
string board; string board;
}; };
const char *argp_program_version = "cycloader 1.0"; const char *argp_program_version = "openFPGALoader 1.0";
const char *argp_program_bug_address = "<gwenhael.goavec-merou@trabucayre.com>"; const char *argp_program_bug_address = "<gwenhael.goavec-merou@trabucayre.com>";
static char doc[] = "cycloader -- a program to flash cyclone10 LP FPGA"; static char doc[] = "openFPGALoader -- a program to flash FPGA";
static char args_doc[] = "BIT_FILE"; static char args_doc[] = "BIT_FILE";
static error_t parse_opt(int key, char *arg, struct argp_state *state); static error_t parse_opt(int key, char *arg, struct argp_state *state);
static struct argp_option options[] = { static struct argp_option options[] = {

View File

@ -78,7 +78,7 @@ void Xilinx::program(unsigned int offset)
void Xilinx::program_spi(unsigned int offset) void Xilinx::program_spi(unsigned int offset)
{ {
std::string bitname = "/usr/local/share/cycloader/spiOverJtag_"; std::string bitname = "/usr/local/share/openFPGALoader/spiOverJtag_";
bitname += fpga_list[idCode()].family + ".bit"; bitname += fpga_list[idCode()].family + ".bit";
/* first: load spi over jtag */ /* first: load spi over jtag */