synlig icon indicating copy to clipboard operation
synlig copied to clipboard

How do I build in debug mode?

Open Rodrigodd opened this issue 5 months ago • 4 comments

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?

Rodrigodd avatar Jul 09 '25 00:07 Rodrigodd

You can use the alternate build system: https://github.com/chipsalliance/synlig/blob/2d838edc951fed056d2b5bf21a40ce1d161c24ba/cmake-makefile#L35

make -f cmake-makefile run-cmake-debug

alaindargelas avatar Jul 09 '25 03:07 alaindargelas

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.

Rodrigodd avatar Jul 09 '25 21:07 Rodrigodd

Correct, use yosys and ignore the warning. In yosys/Makefile you can also change the -03 into -g

alaindargelas avatar Jul 10 '25 00:07 alaindargelas

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.

Rodrigodd avatar Jul 11 '25 01:07 Rodrigodd