Hi Dialog,
I could able to resolve the No such file or directory error by including the sevices path in the c++ build tool settings. But now, i ran into another problem of Undefined refernece for the functions defined in gatts.c.
The file custom_service.c which I added to the project has functions that are called from ble_gatts.c. But when I try to build I am geting this error undefined reference for the function "ble_gatts_read_cfm" and for all other functions that are defined in the ble_gatts.c. I added the headefile ble_gatts.h to custom_service.c and checked the properties. I am not understanding whats was wrong.
Thanks in advance.
问候,
Prasanna
Device:
Hi Prasanna,
你能分享一个截图吗?请尝试从“Project Explorer”窗口右键单击您的项目,然后单击索引 - >重建。之后,关闭并重新打开项目。
This is an SDK file, so I assume that something you are getting wrong with the include paths.
What is the version of the SmartSnippets Studio?
Thanks, PM_Dialog
Hi Dialog PM,
I am using the Smartsnippets Studio version v2.0.14. 1749. Please find the error messages below.
I rebuild the project like you said from the index. But, i see the same errors. I have checked the include paths of my created files custom_service.c where api/include (since ble_gatts.c is under sdk/ble/api) is added to the project include path. Also, I wanted to notify you that when I try to click (ctrl+left click) on the functions used for calling in custom service.c, they are pointing to the ble_gatts.h headerfile. In general, they should be pointing to functions defined in ble_gatts.c. So, i understand that ble_gatts.c is somehow not recognised by the compiler for linking. How can I get rid of this?
2)此外,大多数情况下,我必须在打开IDE时新鲜导入项目。如何解决这个问题?
问候,
Prasanna
Hi Prasanna,
Sorry bur I am little bit confused. Is this occurred to any of the SDK examples or, in your custom code?
您是否修改或更改了任何SDK文件的位置?
如果您正在启动新项目,请按照DA1469X教程启动项目,
Thanks, PM_Dialog
Hello PM_Dialog,
I did not modify the location of any SDK files. I am using the example ble_adv demo and trying to add two files custom_service.c and custom_service.h where the above mentioned error occurs while building the project. ble_gatts.c is not getting recognised by the compiler.
问候,
Prasanna
Hi Prasanna,
Please give a try in a clean SDK directory with the .metadata folder deleted. After that, import the ble_adv project of the SDK, build it and verify that all is working OK. Then, import your own files. Please also take some screenshots with the steps you are following and share them with me.
Thanks, PM_Dialog
hello PM_Dialog,
I have deleted the .metadata folder from SDK, imorted the project and tried to run. But, the errors remain the same. I attached some screeshots which might give you more insights.
问候,
Prasanna
Hi Prasanna,
I am using theDA1469x Custom bluetooth serviceand I am not abel to replicate it. Please try to use handle_write_req() function which calls the ble_gatts_write_cfm() as provided in this software example.
Thanks, PM_Dialog
Dear PM_Dialog,
我能解决这个错误。我想出了在特定的.c文件中使用的宏未定义和启用。我定义了宏,问题解决了。
Thank you.
问候,
Prasanna
Hi Prasanna,
高兴你找到你的问题和thanks for the indication.
Thanks, PM_Dialog