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

ModusToolbox™ General Forum Discussions

ravo
Level 5
Level 5
5 solutions authored 100 replies posted 250 sign-ins

Dears, I would like to debug one application in Modus Toolbox. In 2.4 all works fine.

But now I got some strange behaviour in Modus Toolbox GUI. When I add watch expression, it will add blank line...

ravo_1-1670316313059.png

I see variable name only when I click on this "empty line" as shown on next image. And of course I am not able to view any expressions values or results.

ravo_0-1670316307001.png

What could be wrong ? I tried to restart Modus Toolbox and/or complete PC, and it did not helped me.

Regards

Radim

0 Likes
16 Replies
LeoMathews
Moderator
Moderator
Moderator
100 sign-ins 25 solutions authored 100 replies posted

Hi @ravo 

Are you clicking on the line directly for adding a watch expression? Does the same behavior persist when you click the "+" symbol as shown?

LeoMathews_0-1670325681316.png

Thanks and Regards,
Leo

 

0 Likes

Dear @LeoMathews ,

It does not matter if I click on + Add new expression or right-mouse click on variable in editor end execute command "Add watch expression..."

ravo_0-1670327176976.png

it is quite similar as old bug in Eclipse - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=551404

Radim

0 Likes
LeoMathews
Moderator
Moderator
Moderator
100 sign-ins 25 solutions authored 100 replies posted

Hi @ravo 

I could not observe this strange behavior form my part. Can you please try re-installing ModusToolbox 3.0 from this page?

Thanks and Regards,
Leo

0 Likes

Dear @LeoMathews ,

it is new installation. I found the it happened when I try to debug demo project "USB Audio Device (FreeRTOS)https://github.com/Infineon/mtb-example-psoc6-usb-audio-device-freertos. So It seems that it happens when try to debug project with USB communication. I would like verify buffer content received from USB.

I set breakpoint in file audio_out.c in audio_out_endpoint_callback function on line

data_to_write = count / AUDIO_SAMPLE_DATA_SIZE;

On Github It is 208 line https://github.com/Infineon/mtb-example-psoc6-usb-audio-device-freertos/blob/master/source/audio_out...

I used my HW based on cy8ckit-062-wifi-bt

Regards

Radim

 

0 Likes
LeoMathews
Moderator
Moderator
Moderator
100 sign-ins 25 solutions authored 100 replies posted

Hi @ravo 

Are you seeing the same issue while trying to use another application? Can you please try debugging another application involving USB communication and see if the same issue is observed in the expressions tab?

Thanks and Regards,
Leo

0 Likes

Dear @LeoMathews 

I tested another application emUSB Device: HID generic application https://github.com/Infineon/mtb-example-usb-device-hid-generic/blob/master/README.md and it seems that there it works normally.

So it could be only in USB Audio Device (FreeRTOS)  project. Do you have another advice ?

Radim

 

0 Likes
LeoMathews
Moderator
Moderator
Moderator
100 sign-ins 25 solutions authored 100 replies posted

Hi @ravo 

Looks like this anomaly is present only for this example "USB Audio Device (FreeRTOS)". I will check with the internal software team and will update you as soon as I get a reply from them.

Thanks and Regards,
Leo

0 Likes

Dear @LeoMathews ,

thanks for response. I will wait if you find something... It is terrible for me that I am unable to debug, see memory content.

Radim

0 Likes
LeoMathews
Moderator
Moderator
Moderator
100 sign-ins 25 solutions authored 100 replies posted

Hi @ravo 

The internal team couldn't recreate the issue. The debug session of the example project was working perfectly from their side. Can you please make sure that the example project runs without any errors?

Can you please make sure whether the CY8CKIT-028-TFT shield or the Pmod I2S2 is properly connected to the board? Can you also try debugging by removing the breakpoint and see whether it works then?

Thanks and Regards,
Leo

0 Likes

Dear @LeoMathews, I will prepare and send example project...

I am running on CY8CKIT-062-WIFI-BT and also on cy8cproto-062s3-4343w and my derived HW which is combination of CY8C6247BZI-D54 and I2S2 module (to be working I modified the MAKEFILE and disable #COMPONENTS+=AK4954A for my config. I will also try in older version Modus Toolbox 2.4 if the issue exists here.

It will take some time to prepare...

Thanks in advance

Radim

0 Likes
ravo
Level 5
Level 5
5 solutions authored 100 replies posted 250 sign-ins

I am attaching the sample project project for CY8CKIT-062-WIFI-BT. I setup one breakpoint in audio_out.c, as shown on picture:

ravo_2-1673303312188.png

 

I would like to see received buffer content from USB. I suppose that it will hang the USB Audio communication, but I hope that actual buffer content could be displayed in Expression window if it is written here.

But Expressions table is showing only blank lines... Active "selected" Expression is showed only when I click on desired line, but without any value.

ravo_0-1673302994743.png

Updated on Jan 11: USB_Audio_CY8CKIT_062_Original.zip i correct sample code instead of 2022-11-30 SPEAKERBOX libspeex 146MHz.zip (which I removed now)

What could be wrong in the code or ModusToolbox IDE?

Regards

Radim

0 Likes
LeoMathews
Moderator
Moderator
Moderator
100 sign-ins 25 solutions authored 100 replies posted

Hi @ravo 

I couldn't replicate the issue from my part i.e the blank lines are not appearing. Looks like there are no issues with the code part. Did you place any other breakpoints in the source code? If so are they behaving in the same manner? Also can you please share whether you are using the Audacity tool? Does the tool hang while debugging? As you mentioned the cause may be the USB audio communication getting hanged. 

Thanks and Regards,
Leo

0 Likes

Dear @LeoMathews ,

thanks for response. I did not put any another breakpoint - only one on convert_24_to_32_array(). Yes ofcourse I use Audacity. I know if I pause running code - the Audacity will hang up or freeze. But it is not problem for me. The main problem is that I am unable to view variables after that breakpoint.

Radim

0 Likes
ravo
Level 5
Level 5
5 solutions authored 100 replies posted 250 sign-ins

Dear @LeoMathews ,

If you are unable to replicate this issue, could you send me project which you test ?

I am still unable to debug this USB application, I really need to see received buffer content from USB and see how data is later processed by my code (even if USB transfers hangs after breakpoint)

Here is log  from Modus Toolbox when reaching the breakpoint.

psoc6.cpu.cm4 halted due to debug-request, current mode: Thread
xPSR: 0x81000000 pc: 0x1001050c psp: 0x08004558, semihosting
Info : psoc6.cpu.cm4: Waiting up to 10.0 sec for valid Vector Table address...
Info : psoc6.cpu.cm4: Vector Table found at 0x10002000
Info : psoc6.cpu.cm4: bkpt @0x100022D1, issuing SYSRESETREQ
Info : SWD DPIDR 0x6ba02477
psoc6.cpu.cm4 halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x100022d0 msp: 0x08047800, semihosting
Info : [psoc6.cpu.cm0] external reset detected
===== arm v7m registers
(0) r0 (/32): 0x40210400
(1) r1 (/32): 0x0000000e
(2) r2 (/32): 0x402102c0
(3) r3 (/32): 0x10002000
(4) r4 (/32): 0x100022d1
(5) r5 (/32): 0x00000000
(6) r6 (/32): 0x00000000
(7) r7 (/32): 0xa5a5a5a5
(8) r8 (/32): 0xa5a5a5a5
(9) r9 (/32): 0xa5a5a5a5
(10) r10 (/32): 0xa5a5a5a5
(11) r11 (/32): 0xa5a5a5a5
(12) r12 (/32): 0x00000006
(13) sp (/32): 0x08047800
(14) lr (/32): 0xffffffff
(15) pc (/32): 0x100022d0
(16) xPSR (/32): 0x61000000
(17) msp (/32): 0x08047800
(18) psp (/32): 0x08004558
(20) primask (/1): 0x00
(21) basepri (/8): 0x00
(22) faultmask (/1): 0x00
(23) control (/3): 0x00
(42) d0 (/64): 0x3feffffffffffff7
(43) d1 (/64): 0x3b09d747f23e3400
(44) d2 (/64): 0x7fd3ff5fdfe9ffd6
(45) d3 (/64): 0xffefbfd7ffebb7f7
(46) d4 (/64): 0x6be5ff57ddcfdfd7
(47) d5 (/64): 0x7fadbf7f5defdf57
(48) d6 (/64): 0x3dfd9ffb4dafb7f7
(49) d7 (/64): 0x3fc90fdb00000000
(50) d8 (/64): 0x6e7fb7fffdefbf97
(51) d9 (/64): 0xdffbb7ddf5fff3f5
(52) d10 (/64): 0xdde9d6f7cddfb7dd
(53) d11 (/64): 0x7fbfb7df7de9f77f
(54) d12 (/64): 0xdbfef5d7dfa7b7df
(55) d13 (/64): 0xdffffffffffdf7ff
(56) d14 (/64): 0xbddedef7fdf9fdf7
(57) d15 (/64): 0xf9fbbfdf4dfb5fff
(58) fpscr (/32): 0x00000000
===== Cortex-M DWT registers
Info : The target is not running when halt was requested, stopping GDB.

But icons in Modus Toolbox did not correspond - it looks that code is still running:

ravo_1-1674767922578.png

 

Thanks in advance for any help or ideas how to debug this application

Radim

0 Likes
LeoMathews
Moderator
Moderator
Moderator
100 sign-ins 25 solutions authored 100 replies posted

Hi @ravo 

I have only tested with the code example available in MTB "USB Audio Device (FreeRTOS)". But I believe the issue mainly occurs when audacity fails to recognize the USB device while debugging. Can you make sure audacity still recognizes the device while debugging?

The device should be recognized as "PSoC 6 USB Audio Device".

Thanks and Regards
Leo

0 Likes

Dear @LeoMathews,

I had another idea, how to minimize USB interference between two device at one time (USB audio & MiniProg4) So I tried also use two computers - one for debug with PSoC MiniProg4 and second one connected via USB audio device. And it is same as previous setup (debug and Audacity on same PC). So there should be another problem...

0 Likes