I'm not finding CodeWarrior Debugging support in SDK2.0 for Power ( T1040 ).
I don't see it listed as an option under Kernel Hacking in menuconfig, and I don't see CONFIG_DEBUG_CW in the source.
Please advise on how to set up debugging for Power QorIQ using the SDK2.0 and / or provide a kernel patch.
Thank you
Bob
I probably should have pointed out that I'm working from the SDK2.0 source ISO and not one of the prebuilt cache archives.
Do you have "Compile the kernel with debug info" option in under Kernel Hacking in menuconfig? If yes, use that option for building the linux image.
Adrian
Thank you for the reply Adrian,
If I run CodeWarrior with "Compile the kernel with debug info" set, then I do see some debug functionality, but it seems unstable (e.g., kernel oops, illegal instruction reported on the console, breakpoints can't be set in the debug shell, etc. ).
In the CodeWarrior Infocenter documentation->CodeWarrior Development Studio for Power Architecture Technology->Configuring the Linux Kernel, there is instruction to
Select Kernel hacking.
Select Include CodeWarrior kernel debugging by pressing Y. Enabling this option allows the CodeWarrior debugger to debug the target.
In previous releases, I know that selecting "CodeWarrior kernel debugging" would define the CONFIG_DEBUG_CW flag, and this flag would enable various source lines to set things like MSR_DE for the MSR register and prevent ppc_md.power_save() from being called during idle.
Can you please confirm that the current documentation in the infocenter is wrong and that the CONFIG_DEBUG_CW flag ( and associated kernel patch ) is no longer required? If this is the case, I'll have to figure out why debugging seems unstable and may require additional help.
Thank you
Bob
PS, I'm debugging with a T1040RDB and using CW 10.5.2 on Ubuntu 14.04 & SDK2.0.
It is possible that current documentation from infocenter to be wrong.If using "Compile the kernel with debug info" is unstable, try to not use optimization when build kernel.
Adrian
Hi Adrian,
You wrote "It is possible that current documentation from infocenter to be wrong."
Is the documentation in the infocenter wrong?
In prior releases of the SDK kernel for Power, setting "CodeWarrior kernel debugging" in kernel hacking would properly set the flags: (CFLAGS += -g2 -gdwarf-2, AFLAGS_KERNEL += -Wa,-gdwarf2)
Unless you confirm that the infocenter documentation is wrong, I'm still wondering whether the SDK2.0 kernel is missing a patch.
Thank you
Bob
Hello Rob,
There is no need for CW_DEBUG flag
A short overview:
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you for the insight Yiping and this does seem to match my own testing.
I still use a p1010rdb to work with Linux mainline, and I do apply my own maintained codewarrior (CW_DEBUG) patch to the mainline source so I can use CodeWarrior. I realize that p1010rdb is no longer supported in SDK2.0; however, e500v2 is still supported in the SDK2.0 yocto machine configuration files (e.g., meta-freescale/machine/include/e500v2.inc ), so I'm thinking the CW_DEBUG patch should be available in SDK2.0.
Also, I want to point out that the infocenter documentation on codewarrior debugging does need to be updated.
Thanks again
Bob