Merge pull request #130 from abacomartin/master

adding support for MachXO3D
This commit is contained in:
Gwenhael Goavec-Merou
2021-11-20 15:35:01 +01:00
committed by GitHub
7 changed files with 1038 additions and 75 deletions
+4 -2
View File
@@ -62,6 +62,7 @@ struct arguments {
int16_t altsetting;
uint16_t vid;
uint16_t pid;
string flash_sector;
};
int parse_opt(int argc, char **argv, struct arguments *args, jtag_pins_conf_t *pins_config);
@@ -77,7 +78,7 @@ int main(int argc, char **argv)
/* command line args. */
struct arguments args = {0, false, false, false, 0, "", "", "-", "", -1,
0, "-", false, false, false, false, Device::WR_SRAM, false,
false, false, "", "", "", -1, 0, false, -1, 0, 0};
false, false, "", "", "", -1, 0, false, -1, 0, 0, ""};
/* parse arguments */
try {
if (parse_opt(argc, argv, &args, &pins_config))
@@ -441,7 +442,7 @@ int main(int argc, char **argv)
args.prg_type, args.external_flash, args.verify, args.verbose);
} else if (fab == "lattice") {
fpga = new Lattice(jtag, args.bit_file, args.file_type,
args.prg_type, args.verify, args.verbose);
args.prg_type, args.flash_sector, args.verify, args.verbose);
} else {
printError("Error: manufacturer " + fab + " not supported");
delete(jtag);
@@ -553,6 +554,7 @@ int parse_opt(int argc, char **argv, struct arguments *args, jtag_pins_conf_t *p
cxxopts::value<unsigned int>(args->file_size))
("file-type", "provides file type instead of let's deduced by using extension",
cxxopts::value<string>(args->file_type))
("flash-sector","flash sector (Lattice parts only)", cxxopts::value<string>(args->flash_sector))
("fpga-part", "fpga model flavor + package", cxxopts::value<string>(args->fpga_part))
("freq", "jtag frequency (Hz)", cxxopts::value<string>(freqo))
("f,write-flash",