Does it support breakpoint debugging when using the BLE stack?

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

cross mob
Anonymous
Not applicable

As we all know, when using the Bluetooth protocol stack, it is not allowed breakpoint debugging, then now PSoC 6 BLE support breakpoint debugging?

0 Likes
1 Solution

...Adding to SNVN's response.

It is very difficult to debug a project with breakpoint and an active BLE connection.

That said in PSoC 6, the BLE stack can run completely in M0+ or in dual-core mode (M0+ running the controller and M4 running the host). This lets you breakpoint debug M4, while M0+ maintains the connection (though again certain host side operations should be allowed at appropriate time when running dual-core stack mode). Again, this is not as good as running the full debug alongside the stack. This however provides an additional depth to the debug by enabling access to the RAM (which is shared) through M4. This combined with UART dump can be more useful than just the UART dumps. You can even dump logs/data over IPC to M4 for further debug.

View solution in original post

0 Likes
8 Replies
srnu_276571
Level 5
Level 5
25 replies posted 10 replies posted 5 replies posted

Hello,

Cypress provides the BLE stack as a library for PSoC 6 BLE, similar to PSoC 4 BLE. Stack debugging with source code is not possible. But if you let us know what you are looking for, maybe we can figure out a way to help get debug data from the stack.

Cheers.

0 Likes
Anonymous
Not applicable

I think you may have misunderstood what I mean. I mean that when using the BLE protocol stack how to debug the project, because now the situation is as long as I break the point in the project and then full-speed operation, the Bluetooth is broken or abnormal.

0 Likes

Ahh okay. Instead of doing breakpoint based debugging, you could use an UART to send debug data over a serial connection to a terminal. This way, you can ensure that the BLE connection is active and you are able to debug.

Let me know if the above clarifies things a bit.

0 Likes
Anonymous
Not applicable

Hello snvn,

     This is a very common practice, I usually do this to debug, but this can only solve part of the problem, some hidden deeper problems, using this method is difficult to find the root cause of the problem, if you can use the Bluetooth protocol Stack at the same time can also breakpoint based debugging,this is the best way.

0 Likes

...Adding to SNVN's response.

It is very difficult to debug a project with breakpoint and an active BLE connection.

That said in PSoC 6, the BLE stack can run completely in M0+ or in dual-core mode (M0+ running the controller and M4 running the host). This lets you breakpoint debug M4, while M0+ maintains the connection (though again certain host side operations should be allowed at appropriate time when running dual-core stack mode). Again, this is not as good as running the full debug alongside the stack. This however provides an additional depth to the debug by enabling access to the RAM (which is shared) through M4. This combined with UART dump can be more useful than just the UART dumps. You can even dump logs/data over IPC to M4 for further debug.

0 Likes
Anonymous
Not applicable

Hello,msur

     Thanks for your detailed reply.

1、Since i can breakpoint debug M4,while M0+ maintains the connection,why  is this not as good as running the full debug alongside the stack?

2、Do you have  tutorials or instructions for the additional debugging methods you have said?

0 Likes

1. That is because you still do not have control/info on the instruction/code executed by M0+. You can only sniff the RAM and possibly the MMIO registers.

2. We do have plans for tutorials on such advanced concepts.

0 Likes
Anonymous
Not applicable

Hello,msur

     Millions of thanks.I get it,hope that the tutorial can come out as soon as possible.

0 Likes