From 7c5f56c207a6efe2749cba82a5aeaf2af238b77f Mon Sep 17 00:00:00 2001 From: Franck Jullien Date: Wed, 20 May 2020 15:34:19 +0200 Subject: [PATCH] litex/sim: fix compiler warnings --- litex/build/sim/core/modules.c | 6 +++--- litex/build/sim/core/veril.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/litex/build/sim/core/modules.c b/litex/build/sim/core/modules.c index 60bec4c69..7c7a46430 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 0bbc5ff9a..d0708cdd5 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