mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-31 10:16:11 +02:00
propagate jtag_pins_conf_t and add support for bitbang mode
This commit is contained in:
+6
-2
@@ -86,6 +86,7 @@ void displaySupported(const struct arguments &args);
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
cable_t cable;
|
||||
jtag_pins_conf_t *pins_config = NULL;
|
||||
|
||||
/* command line args. */
|
||||
struct arguments args = {false, false, false, 0, "", "-", "-", "-",
|
||||
@@ -100,6 +101,9 @@ int main(int argc, char **argv)
|
||||
|
||||
/* if a board name is specified try to use this to determine cable */
|
||||
if (args.board[0] != '-' && board_list.find(args.board) != board_list.end()) {
|
||||
/* set pins config */
|
||||
pins_config = &board_list[args.board].pins_config;
|
||||
/* search for cable */
|
||||
auto t = cable_list.find(board_list[args.board].cable_name);
|
||||
if (t == cable_list.end()) {
|
||||
args.cable = "-";
|
||||
@@ -124,9 +128,9 @@ int main(int argc, char **argv)
|
||||
/* jtag base */
|
||||
Jtag *jtag;
|
||||
if (args.device == "-")
|
||||
jtag = new Jtag(cable, 6000000, false);
|
||||
jtag = new Jtag(cable, pins_config, 6000000, false);
|
||||
else
|
||||
jtag = new Jtag(cable, args.device, 6000000, false);
|
||||
jtag = new Jtag(cable, pins_config, args.device, 6000000, false);
|
||||
|
||||
/* chain detection */
|
||||
vector<int> listDev;
|
||||
|
||||
Reference in New Issue
Block a user