sim/erc32: File loading via command line did not work

* sis.c (main) load binary file from argv parameters
This commit is contained in:
Jiri Gaisler 2015-02-19 23:31:25 +01:00 committed by Mike Frysinger
parent 96d6709579
commit e26473a140
1 changed files with 4 additions and 1 deletions

View File

@ -171,6 +171,7 @@ main(argc, argv)
char *cmdq[HIST_LEN];
int cmdi = 0;
int i;
int lfile = 0;
cfile = 0;
for (i = 0; i < 64; i++)
@ -219,7 +220,7 @@ main(argc, argv)
exit(1);
}
} else {
last_load_addr = bfd_load(argv[stat]);
lfile = stat;
}
stat++;
}
@ -241,6 +242,8 @@ main(argc, argv)
reset_all();
init_bpt(&sregs);
init_sim();
if (lfile)
last_load_addr = bfd_load(argv[lfile]);
#ifdef STAT
reset_stat(&sregs);
#endif