From: Franck Jullien Date: Wed, 20 May 2020 13:34:19 +0000 (+0200) Subject: litex/sim: fix compiler warnings X-Git-Tag: 24jan2021_ls180~311^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c5f56c207a6efe2749cba82a5aeaf2af238b77f;p=litex.git litex/sim: fix compiler warnings --- diff --git a/litex/build/sim/core/modules.c b/litex/build/sim/core/modules.c index 60bec4c6..7c7a4643 100644 --- a/litex/build/sim/core/modules.c +++ b/litex/build/sim/core/modules.c @@ -50,7 +50,7 @@ int litex_sim_load_ext_modules(struct ext_module_list_s **mlist) tinydir_file file; dylib_ref lib; int (*litex_sim_ext_module_init)(int (*reg)(struct ext_module_s *)); - char name[100]; + char name[300]; if (tinydir_open(&dir, "./modules/") == -1) { ret = RC_ERROR; @@ -122,7 +122,7 @@ int litex_sim_find_ext_module(struct ext_module_list_s *first, char *name , stru if(!first || !name || !found) { ret = RC_INVARG; - eprintf("Invalid first:%s arg:%s found:%p\n", first, name, found); + eprintf("Invalid first:%s arg:%s found:%p\n", first->module->name, name, found); goto out; } @@ -144,7 +144,7 @@ int litex_sim_find_module(struct module_s *first, char *name , struct module_s * if(!first || !name || !found) { ret = RC_INVARG; - eprintf("Invalid first:%s arg:%s found:%p\n", first, name, found); + eprintf("Invalid first:%s arg:%s found:%p\n", first->name, name, found); goto out; } diff --git a/litex/build/sim/core/veril.h b/litex/build/sim/core/veril.h index 0bbc5ff9..d0708cdd 100644 --- a/litex/build/sim/core/veril.h +++ b/litex/build/sim/core/veril.h @@ -17,6 +17,7 @@ void litex_sim_eval(void *vdut); void litex_sim_init_tracer(void *vdut); void litex_sim_tracer_dump(); int litex_sim_got_finish(); +void litex_sim_init_cmdargs(int argc, char *argv[]); #if VM_COVERAGE void litex_sim_coverage_dump(); #endif