"#ifdef ENABLE_DEBUG" is not enabled

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
YukiOgawa
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi,

This is an inquiry with Audio_sink in the sample code.

I have "ENABLE_EBUG?=1" as below, but it doesn't recognize ENABLE_DEBUG as 1.
I do a make clean and make ENABLE_DEBUG=1 program. but it has no effect.

How do I get ENABLE_DEBUG to be 1?

YukiOgawa_0-1663213345379.png

Best regard,Yuki

 

0 Likes
1 Solution

I mean, if you use this option, you should prepare the rest of the settings, like openOCD/GDB/J-Link, on your own.

Please note: AIRoC products don't support all the features of hardware debug. And we don't recommend you rely on hardware debug as always.

BTW, the IDE just didn't recognize the variable ENABLE_DEBUG correctly on your screenshot as well as many other machines, because we use a complex build system. It worked indeed.

Some useful links:
https://community.infineon.com/t5/AIROC-Bluetooth/Can-t-debug-on-CYBT-423028-EVAL/m-p/330823
https://community.infineon.com/t5/Studio-Bluetooth/Debugging-using-Segger-Jlink/m-p/278256
https://infineon.github.io/btsdk-docs/BT-SDK/AIROC-Hardware-Debugging.pdf

Best regards

View solution in original post

0 Likes
9 Replies
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

Your configuration is correct.

Are you going to enable hardware debug? Please confirm you are examing the settings according to hardware debug standard, not software debug standard, and confirm you have set up your hardware debug link correctly.

Best regards

0 Likes

Hi,

How do I set up hardware debugging?
Do you mean the SWD settings like the one pictured below?
However, ENABLE_DEBUG is never 1, so it is never enabled.
Should I set it to SWD in my application?

YukiOgawa_0-1663286941328.png

Best regards

0 Likes

I mean, if you use this option, you should prepare the rest of the settings, like openOCD/GDB/J-Link, on your own.

Please note: AIRoC products don't support all the features of hardware debug. And we don't recommend you rely on hardware debug as always.

BTW, the IDE just didn't recognize the variable ENABLE_DEBUG correctly on your screenshot as well as many other machines, because we use a complex build system. It worked indeed.

Some useful links:
https://community.infineon.com/t5/AIROC-Bluetooth/Can-t-debug-on-CYBT-423028-EVAL/m-p/330823
https://community.infineon.com/t5/Studio-Bluetooth/Debugging-using-Segger-Jlink/m-p/278256
https://infineon.github.io/btsdk-docs/BT-SDK/AIROC-Hardware-Debugging.pdf

Best regards

0 Likes
YukiOgawa
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi

Are the following contents all about how to set up openOCD/GDB/J-Link?

YukiOgawa_1-1663635439029.png

 


You said that hardware debugging of AIRoC products is not recommended.

Are there any notes in the documentation?
I am using CYW920721M2EVK-02, is there any documentation that hardware debugging is not recommended for this evaluation board?
You say that ENABLE_DEBUG is not recognized by the IDE, does that mean that it is not recognized even if you define it in the preprocessor? If not, should I #define ENABLE_DEBUG in the same file?

Best regards

 

0 Likes

Hi,

We provide Doc.002-20504 for references only. But we didn't suggest this way in any CYWxxxxx datasheets or user guide materials. So it's a piece of implied information.

And if you need to go this way, Doc.002-20504 is all you can get. We didn't have more support budget for it other than this.

ENABLE_DEBUG will always be recognized by the preprocessor. You can alter the files and print out the variable to confirm this. Just don't trust the IDE's rendering.

Best regards

0 Likes

Hi

I understand that the content of Doc.002-20504 is for reference only.

However, the datasheet for CYW20721 included in CYW920721M2EVK-02 states that SWD is supported.

Also, the CYW20721 datasheet does not state that hardware debugging is not recommended. Where in the CYW20721 documentation does it say that hardware debugging is not recommended?

Is it implicit that hardware debugging is not recommended?

Also, you said you shouldn't trust the IDE's rendering.

However, I confirmed that uncommenting #define ENABLE_DEBUG in spar_utils.h enabled the commented out part as shown in the figure.

YukiOgawa_0-1664169475459.png

 


If I set ENABLE_DEBUG?=1 in the makefile and build, the #ifdef ENABLE_DEBUG part is not enabled.

Therefore, I think that the changes in the makefile are not reflected and the preprocessor is not working.
Does that mean that I need to #define ENABLE_DEBUG in spar_utils.h to enable #ifdef ENABLE_DEBUG?

Best regards

0 Likes
  1. SWD is always supported. But it doesn't imply that it's recommended.
  2. Please tell the differences between "Hardware debug is not recommended" and "hardware debug is not possible".
  3. Implied information of cause won't be stated. Or it won't be regarded as implied information.
  4. Something that is not addressed can still exist.
  5. You can change any of the source codes since you have control.
0 Likes

Hi

I understand about No.1 answer.
As for No.2, I don't understand the intent of the question. That's what I want to hear. I have a final question. Can CYW20721 be hardware debugged? The question here is functional or non-functional. I fully understand that hardware debugging is discouraged.
Also, by deprecated do you mean that hardware debugging is incomplete and cannot be guaranteed?
Regarding No.3, there is no problem if you answer No.2.
I understand the answer for No.4. We will check it in a future update.
I understand your answer for No.5.

Best regards

0 Likes

Supplement: Yes, hardware debugging is incomplete and cannot be guaranteed. And stub logs always provide better analysis than hardware debugging due to the timeliness and accuracy of wireless systems.

0 Likes