Hello:
I’m sure there is a simple explanation for this, but I compiled the template sdk example and it works fine when I make it with “make”. If I add printf statements to the kernel function, and use “make emu=1”, it compiles fine and runs fine, but there is no printout from the printf command. I realize that the new executable is in the emurelease folder.
Also, how do I get the template makefiles to compile with the -cubin flag so that I can look at the cubin file?
Lastly, can anyone suggest how the debug mode is best used? Do you need a separate program to make use of the debug mode?
Are you sure the code where the printf is is being called?
I believe it is make keep=1. If that doesn’t work, the solution was in a post a few days ago.
Debug mode is the same as the debug mode for any application. Load up the executable in the debugger (gdb or your favorite GUI interface to gdb like ddd) and you can set breakpoints, inspect variables and step through code line by line. For debugging kernels, compile with both debug and emu and you can set breakpoints in your kernels to debug them.