Hi everyone,
Previously we have been enabling CONFIG_CW_DEBUG option in the Kernel config when doing Linux kernel debugging on T4240RDB board using NXP CodeWarrior TAP. But now in the latest QoriQ SDK I am unable to locate this option in the kconfig file.
Has this option been removed ? If so, is there any alternative option that I need to enable for kernel debugging.
Thanks...
Hello Saqlain Raza,
The option CW_DEBUG is not needed in SDK 2.0 release, because CW_DEBUG is only required by e500v2 platforms, but e500v2 platforms have already been removed from SDK 2.0.
A short overview:
for e6500: you can debug the target with CW_DEBUG disabled, except the case where the target enters in idle mode (PW20 state I guess). From this state, due to HW design limitation, you can not use external debug.Therefore, if there is a way to disable this state from Linux, you should be able to debug e6500 without CW_DEBUG.
for e500mc and e5500: you can fully debug the target with CW_DEBUG disabled.
for e500v2: you must use CW_DEBUG to enable external debug flags from MSR. There no way you can Debug with probe without these flags set.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yiping,
Thanks for the response. Do you have any recomendation about how the idle mode for e6500 can be disabled in Linux kernel ?
Regards..
Hi Yiping,
When debugging SMP kernel with SDK 2.0 (i.e without CW_DEBUG) the debug session does start but resuming the target after a brekpoint hit or sometimes randomly doesn't resume the target . Though the debug session seems to be active however the target's serial console/terminal is not resumed. On suspending the target execution the debugger shows that most of the cores are executing in arch_spinlock routines.
Can you suggest that how the idle mode for e6500 cores can be disabled in the Linux kernel ? I do see some code
inside the idle task in arch/powerpc/kernel/idle.c . Is that the correct place to look into ?