How to add a precompiled macro in the wiced studio

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

cross mob
mawu_4270096
Level 5
Level 5
50 replies posted 25 replies posted 10 replies posted

Hi:

   as we know, we can  compile some  codes which  we add  in a  project  by  some macros

for example. in the wiced studio SDK, there are many application project for  example mesh_level_client, mesh_onoff_server and so on !  however some codes are the common  codes  for example  device  provisioning codes  for  this  projects  !

I want  to add some codes for  the mesh_onoff_server project   during device  provisoining  ,but  I  don't   want to affect other projects

0 Likes
1 Solution
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

You can define the macros in the makefile.mk or application.c file to provide access to libraries, and other C flags, etc.

Please make use of WICED documentation of API (API.html) to get list of available macros.

In mesh, common codes, eg: device provisioning, etc, are already handled by the mesh core codes.

Could you please explain more about your real requirement. What you meant by below sentence?

"I want  to add some codes for  the mesh_onoff_server project   during device  provisoining  ,but  I  don't   want to affect other projects"

View solution in original post

2 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

You can define the macros in the makefile.mk or application.c file to provide access to libraries, and other C flags, etc.

Please make use of WICED documentation of API (API.html) to get list of available macros.

In mesh, common codes, eg: device provisioning, etc, are already handled by the mesh core codes.

Could you please explain more about your real requirement. What you meant by below sentence?

"I want  to add some codes for  the mesh_onoff_server project   during device  provisoining  ,but  I  don't   want to affect other projects"

mawu_4270096
Level 5
Level 5
50 replies posted 25 replies posted 10 replies posted

Hi  DheerajP_41:

      thank you for your timely reply !    I defined  a macro  and  add  the  corresponding  C flags  in the makefile.mk.  it works fine!

thanks!

Mandy

0 Likes