Enable/Disable pr_debug in Linux Device Driver

By default, the pr_debug messages are disabled. Consider the below sample code:


Output:


You can see, pr_debug log was not displayed on the dmesg output.


To enable debugging output, build the appropriate file with -DDEBUG by adding
CFLAGS_[filename].o := -DDEBUG to the Makefile


Comments

Popular posts from this blog

Connecting Serial ports of two Ubuntu VMWare Virtual Machines

bb.utils.contains yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig