[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ltib] Forcing DEBUG for pr_debug in kernel driver through LTIB
From: |
Franz Trierweiler |
Subject: |
[Ltib] Forcing DEBUG for pr_debug in kernel driver through LTIB |
Date: |
Mon, 23 Nov 2009 18:28:43 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
Hello everybody
Freescale has just issued a new PDK (PDK 1.6) for the iMX25 3-stack
evalboard. I have hardwired a SIM interface to my evalboard so that I
can scope all electrical signals coming from that cell. The fact is that
I am trying to debug the mxc_sim.c source file for this SIM interface.
mxc_sim is a SIM driver. In order to achieve this, I would like to
enable pr_debug (...) output to my console when this driver is running
and watch all debug messages displayed.
The kernel.h shows the pr_debug macro like this:
/* If you are writing a driver, please use dev_dbg instead */
#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
#define pr_debug(fmt, ...) do { \
dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
} while (0)
#elif defined(DEBUG)
#define pr_debug(fmt, ...) \
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#else
#define pr_debug(fmt, ...) \
({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
#endif
There seems that if I #define DEBUG somewhere then I will have the
messages displayed (or logged) somewhere.
Is there a way of doing this properly in the LTIB configuration when
recompiling the kernel ?
Or should I simply #define DEBUG in kernel.h? (This really does not
sound the right way).
Or should I simply put DEBUG=ON (or something like this) in the LTIB
perl script? (sounds also very dirty).
I really would like to make this in a clean way.
Regards,
Franz
- [Ltib] Forcing DEBUG for pr_debug in kernel driver through LTIB,
Franz Trierweiler <=