diff options
author | Tim Newsome <tim@sifive.com> | 2019-04-04 14:34:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-04 14:34:33 -0700 |
commit | 69a8b5d2cfc54c36c86b8733a1fbcdffe9811a94 (patch) | |
tree | 7a5ec2a8021c4fd69f78b11ddd90d386eb9876bd /spike_main | |
parent | 3e79495c38bf58df9c7b389205032b2eb3f45fb7 (diff) | |
download | spike-69a8b5d2cfc54c36c86b8733a1fbcdffe9811a94.zip spike-69a8b5d2cfc54c36c86b8733a1fbcdffe9811a94.tar.gz spike-69a8b5d2cfc54c36c86b8733a1fbcdffe9811a94.tar.bz2 |
Add --debug-no-abstract-csr (#267)
This is used to make sure that OpenOCD can work on targets that don't
support abstract access to CSR registers. It replaces a simpler hack,
which caused #266.
Diffstat (limited to 'spike_main')
-rw-r--r-- | spike_main/spike.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spike_main/spike.cc b/spike_main/spike.cc index 2bf8d28..b67ae2f 100644 --- a/spike_main/spike.cc +++ b/spike_main/spike.cc @@ -49,6 +49,7 @@ static void help(int exit_code = 1) fprintf(stderr, " --abstract-rti=<n> Number of Run-Test/Idle cycles " "required for an abstract command to execute [default 0]\n"); fprintf(stderr, " --without-hasel Debug module supports hasel\n"); + fprintf(stderr, " --debug-no-abstract-csr Debug module won't support abstract to authenticate\n"); exit(exit_code); } @@ -115,6 +116,7 @@ int main(int argc, char** argv) unsigned dmi_rti = 0; unsigned abstract_rti = 0; bool support_hasel = true; + bool support_abstract_csr_access = true; std::vector<int> hartids; auto const hartids_parser = [&](const char *s) { @@ -168,6 +170,8 @@ int main(int argc, char** argv) [&](const char* s){abstract_rti = atoi(s);}); parser.option(0, "without-hasel", 0, [&](const char* s){support_hasel = false;}); + parser.option(0, "debug-no-abstract-csr", 0, + [&](const char* s){support_abstract_csr_access = false;}); auto argv1 = parser.parse(argv); std::vector<std::string> htif_args(argv1, (const char*const*)argv + argc); @@ -179,7 +183,7 @@ int main(int argc, char** argv) sim_t s(isa, nprocs, halted, start_pc, mems, htif_args, std::move(hartids), progsize, max_bus_master_bits, require_authentication, - abstract_rti, support_hasel); + abstract_rti, support_hasel, support_abstract_csr_access); std::unique_ptr<remote_bitbang_t> remote_bitbang((remote_bitbang_t *) NULL); std::unique_ptr<jtag_dtm_t> jtag_dtm( new jtag_dtm_t(&s.debug_module, dmi_rti)); |