cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox General

jama_4535901
New Contributor II

Hello

I want to run the sample programs mesh_vendor_server, mesh_provision_client, sensor notion or the other CYBT-213043-MESH examples with breakpoints because I need to see the behavior of the program step by step, but I think I need to debug the example codes in CYBT-213043-MESH, can someone explain to me how to do it in modustoolbox 2.0?

please

can you help me?

0 Likes
1 Solution
DheerajPK_41
Moderator
Moderator

Hi,

Please see the WICED-Hardware-Debugging.pdf for source-code-level debugging. 

btsdk-docs/WICED-Hardware-Debugging.pdf at master · cypresssemiconductorco/btsdk-docs · GitHub https://github.com/cypresssemiconductorco/btsdk-docs/blob/master/docs/BT-SDK/WICED-Hardware-Debuggin...

But, for mesh application debugging, I would suggest you to use Mesh model, core traces by enabling below flags in the makefile. You can get sufficient information logs from mesh model, core, provisioner libraries to debug your mesh application in this method.

# These flags control whether the prebuilt mesh libs (core, models)

# will be the trace enabled versions or not

MESH_MODELS_DEBUG_TRACES ?= 0

MESH_CORE_DEBUG_TRACES ?= 0

You may need to enable it in the .c file also.

#if 0

    // Set Debug trace level for mesh_models_lib and mesh_provisioner_lib

    wiced_bt_mesh_models_set_trace_level(WICED_BT_MESH_CORE_TRACE_INFO);

#endif

#if 0

    // Set Debug trace level for all modules but Info level for CORE_AES_CCM module

    wiced_bt_mesh_core_set_trace_level(WICED_BT_MESH_CORE_TRACE_FID_ALL, WICED_BT_MESH_CORE_TRACE_DEBUG);

    wiced_bt_mesh_core_set_trace_level(WICED_BT_MESH_CORE_TRACE_FID_CORE_AES_CCM, WICED_BT_MESH_CORE_TRACE_INFO);

#endif

Thanks,

-Dheeraj

View solution in original post

0 Likes
7 Replies
DheerajPK_41
Moderator
Moderator

Hi,

Please see the WICED-Hardware-Debugging.pdf for source-code-level debugging. 

btsdk-docs/WICED-Hardware-Debugging.pdf at master · cypresssemiconductorco/btsdk-docs · GitHub https://github.com/cypresssemiconductorco/btsdk-docs/blob/master/docs/BT-SDK/WICED-Hardware-Debuggin...

But, for mesh application debugging, I would suggest you to use Mesh model, core traces by enabling below flags in the makefile. You can get sufficient information logs from mesh model, core, provisioner libraries to debug your mesh application in this method.

# These flags control whether the prebuilt mesh libs (core, models)

# will be the trace enabled versions or not

MESH_MODELS_DEBUG_TRACES ?= 0

MESH_CORE_DEBUG_TRACES ?= 0

You may need to enable it in the .c file also.

#if 0

    // Set Debug trace level for mesh_models_lib and mesh_provisioner_lib

    wiced_bt_mesh_models_set_trace_level(WICED_BT_MESH_CORE_TRACE_INFO);

#endif

#if 0

    // Set Debug trace level for all modules but Info level for CORE_AES_CCM module

    wiced_bt_mesh_core_set_trace_level(WICED_BT_MESH_CORE_TRACE_FID_ALL, WICED_BT_MESH_CORE_TRACE_DEBUG);

    wiced_bt_mesh_core_set_trace_level(WICED_BT_MESH_CORE_TRACE_FID_CORE_AES_CCM, WICED_BT_MESH_CORE_TRACE_INFO);

#endif

Thanks,

-Dheeraj

View solution in original post

0 Likes
jama_4535901
New Contributor II
I changed the values in this way

# These flags control whether the prebuilt mesh libs (core, models)
# will be the trace enabled versions or not
MESH_MODELS_DEBUG_TRACES? = 1
MESH_CORE_DEBUG_TRACES? = 1
But I'm not sure

what i want is to run step by step each example program like mesh_color_ligth or mesh_provision_client or mesh_vendor
I want to use the break points to see the behavior and flow of the example codes and also because I need to see the data that is read and sent to other modules CYBT-213043-MESH PROVISION_CLIENT with the break points

the example is shown in the image
please
Can you explain me

editarmous.PNG
0 Likes
DheerajPK_41
Moderator
Moderator

HI,

If you want to do source code level debugging please follow WICED-Hardware-Debugging.pdf document.

btsdk-docs/WICED-Hardware-Debugging.pdf at master · cypresssemiconductorco/btsdk-docs · GitHub

Maximum you can set 3 break point.

Please note this debugging technique often conflicts with the real-time requirements of IoT, since it stops the CPU at breakpoints and providing the ability to check on the state of code and data using source code symbols.

Thanks,

-Dheeraj

jama_4535901
New Contributor II
According to the guide that I recommend, I have to use a The J-Link Debugger but I don't have The J-Link Debugger, but I have the MiniProg4
Can the MiniProg4 be used to debut the CYBT-213043-MESH kit?

If MiniProg4 can be used to debug CYBT-213043-MESH, CYBT-213043-MESH does not have the socket to connect MiniProg4

How can I connect MiniProg 4 with CYBT-213043-MESHES?
0 Likes
DheerajPK_41
Moderator
Moderator

Hi,

You need to fly-wire the setup.

On the meshkit, please use P12(SWDCK) and P13(SWDIO) for the connection. Please see the spar_utils.h of 20819A1.

For MinProg pinout, please check MiniProg 4 kit guide.

https://www.cypress.com/documentation/development-kitsboards/cy8ckit-005-miniprog4-program-and-debug...

Thanks,

-Dheeraj

jama_4535901
New Contributor II

Can the CYBT-213043-MESH board be debugged with the MiniProg4?

0 Likes
DheerajPK_41
Moderator
Moderator

Hi,

Yes, It should be possible.

Please check the document: btsdk-docs/WICED-Hardware-Debugging.pdf at master · cypresssemiconductorco/btsdk-docs · GitHub

CYBT-213043-MESH is a module kit based on 20819 silicon. But, module kit does not have a dedicated SWD debug probe socket.

Fly-wiring the setup as I said in my previous comment should work.

Thanks,

-Dheeraj