How do I build in debug mode?
I am trying to investigate #2767 with the help of a debugger, but for that I need to build the project in debug mode.
From #2045, it appears that I would need to add CFG_BUILD_TYPE := debug to buildconfig.user.mk, but I believe that since then this build type has been removed. Now there is only:
override ALL_ALLOWED_BUILD_TYPES := release asan plugin pysynlig
Any of those options correspond to the debug build? or there is any other way to configure the build in debug mode?
You can use the alternate build system: https://github.com/chipsalliance/synlig/blob/2d838edc951fed056d2b5bf21a40ce1d161c24ba/cmake-makefile#L35
make -f cmake-makefile run-cmake-debug
Thanks!
Just to clarify, this alternate build system does not generate the synlig binary, right?
Do I need to use out/current/bin/yosys -m systemverilog (or plugin -i systemverilog in the Yosys REPL), despite this warning?
yosys> plugin -i systemverilog
Warning: Using synlig as a Yosys plugin is deprecated. It is recommended to build synlig as a standalone binary.
Correct, use yosys and ignore the warning. In yosys/Makefile you can also change the -03 into -g
I also notice that the yosys binary installed in out/ is stripped. So I create a symlink at third_party/yosys/share/plugins/systemverilog.so pointing to out/current/share/yosys/plugins/systemverilog.so.1.82, and run yosys from third_party/yosys/yosys.