diff --git a/Makefile b/Makefile index 64cce77..13e50e0 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -EXEC_NAME=cycloader +EXEC_NAME=openFPGALoader SRC= $(wildcard *.cpp) OBJS= $(SRC:.cpp=.o) LDFLAGS=-lm -g -Wall -std=c++11 $(shell pkg-config --libs libftdipp1 libudev) @@ -20,10 +20,10 @@ $(EXEC_NAME):$(OBJS) $(CC) $(CFLAGS) -o $@ -c $< install: - cp -f cycloader /usr/local/bin - mkdir -p /usr/local/share/cycloader - cp -f test_sfl.svf /usr/local/share/cycloader - cp -f spiOverJtag/*.bit /usr/local/share/cycloader + cp -f openFPGALoader /usr/local/bin + mkdir -p /usr/local/share/openFPGALoader + cp -f test_sfl.svf /usr/local/share/openFPGALoader + cp -f spiOverJtag/*.bit /usr/local/share/openFPGALoader clean: rm -rf *.o diff --git a/README.md b/README.md index 5fc7f98..3380c74 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# cycloader +# openFPGALoader Utility for programming Intel/Altera Cyclone Xilinx Serie 7 and Lattice MachXO3 __Current support:__ @@ -40,9 +40,9 @@ Currently, the install path is hardcoded to /usr/local ## Usage ```bash -cycloader --help -Usage: cycloader [OPTION...] BIT_FILE -cycloader -- a program to flash cyclone10 LP FPGA +openFPGALoader --help +Usage: openFPGALoader [OPTION...] BIT_FILE +openFPGALoader -- a program to flash cyclone10 LP FPGA -b, --board=BOARD board name, may be used instead of cable -c, --cable=CABLE jtag interface @@ -63,35 +63,35 @@ To have complete help With board name: ```bash -cycloader -b theBoard +openFPGALoader -b theBoard ``` With cable: ```bash -cycloader -c theCable +openFPGALoader -c theCable ``` With device node: ```bash -cycloader -d /dev/ttyUSBX +openFPGALoader -d /dev/ttyUSBX ``` **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. -**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, the *-d* option is the better solution #### Reset device ```bash -cycloader [options] -r +openFPGALoader [options] -r ``` #### load bitstream device (memory or flash) ```bash -cycloader [options] /path/to/bitstream.ext +openFPGALoader [options] /path/to/bitstream.ext ``` ### CYC1000 @@ -104,7 +104,7 @@ quartus_cpf -c -q -g 3.3 -n 12.0MHz p project_name.sof project_name.svf ``` file load: ```bash -cycloader -b cyc1000 project_name.svf +openFPGALoader -b cyc1000 project_name.svf ``` #### SPI flash: @@ -114,7 +114,7 @@ quartus_cpf -o auto_create_rpd=on -c -d EPCQ16A -s 10CL025YU256C8G project_name. ``` file load: ```bash -cycloader -b cyc1000 -r project_name_auto.rpd +openFPGALoader -b cyc1000 -r project_name_auto.rpd ``` **Note about SPI flash: @@ -137,7 +137,7 @@ task must be done to generates this bitstream. __file load:__ ```bash -cycloader -b arty *.runs/impl_1/*.bit +openFPGALoader -b arty *.runs/impl_1/*.bit ``` #### SPI flash: @@ -163,7 +163,7 @@ vivado -nolog -nojournal -mode batch -source script.tcl -tclargs myproject __file load:__ ```bash -cycloader -b arty *.runs/impl_1/*.mcs +openFPGALoader -b arty *.runs/impl_1/*.mcs ``` ### MachXO3 Starter Kit @@ -174,7 +174,7 @@ special must be done to generates this file. __file load__: ```bash -cycloader -b machXO3SK impl1/*.jed +openFPGALoader -b machXO3SK impl1/*.jed ``` ### Trenz GOWIN LittleBee (TEC0117) @@ -186,5 +186,5 @@ special must be done to generates this file. __file load__: ```bash -cycloader -b machXO3SK impl/pnr/*.fs +openFPGALoader -b machXO3SK impl/pnr/*.fs ``` diff --git a/altera.cpp b/altera.cpp index dad5318..65143cf 100644 --- a/altera.cpp +++ b/altera.cpp @@ -5,7 +5,7 @@ #define IDCODE 6 #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): Device(jtag, filename, verbose), _svf(_jtag, _verbose) diff --git a/main.cpp b/main.cpp index 9eb0607..9eab1f8 100644 --- a/main.cpp +++ b/main.cpp @@ -44,9 +44,9 @@ struct arguments { string board; }; -const char *argp_program_version = "cycloader 1.0"; +const char *argp_program_version = "openFPGALoader 1.0"; const char *argp_program_bug_address = ""; -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 error_t parse_opt(int key, char *arg, struct argp_state *state); static struct argp_option options[] = { diff --git a/xilinx.cpp b/xilinx.cpp index 83153b1..4969056 100644 --- a/xilinx.cpp +++ b/xilinx.cpp @@ -78,7 +78,7 @@ void Xilinx::program(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"; /* first: load spi over jtag */