Hi,
This is regarding to DA14695. I have an application written in C++ and driver writen in C for another MCU, now i have port the same application on Dailog MCU environment.
When i try to create a C++ project I'm not able to see the SDK folder as it is available in the built-in examples like ble_adv, ble_cli.
When i take the base project as ble_adv, and try to add my Cpp application, i'm not able to add the cpp files.
请告诉我如何使用Freertos部分创建CPP项目,或者如何修改像BLE_DEV示例等漏油项目。
regards
Device:

Hi,
I have escalated this issue to our internal support team. We should receive a reply in the next day or two.
/ mhv.
Hi,
我收到了我们内部支持团队的以下提示:
"
In order to get the C++ to coexist peacefully with the C, it is required to have all C header decorated with the following pattern:
"
I hope that helps you resolve the problem.
/ mhv.
hi,
The question was regarding to create a projec C++ .
当我们尝试创建一个C ++项目时,我们没有看到像BLE_ADV,BLE_PERITELAL这样的示例项目中看到的任何文件夹。没有看到SDK文件夹。
my requirement is to create a project with FreeRTOS support and the project has C source files as well as C++ source files.
Kindly shared details regarding this. How to create a project for a ble_peripheral with support for FreeRTOS and has C and C++ source files.
regards
嗨Sandeep,
I think the best approach would be to convert an existing project from C nature to C++. There's an integrated tool in Smartsnippets studio. you need to "File->New Project -> Convert to a C/C++ project" and then follow the wizzard.
Then you start to make sure all the headers you include are correctly decorated.
Hi,
The steps mentioned by you work only partially. I have taken a demo project from sdk folder. ble_peripheral. perform clean and build it build successfully.
Now as mentioned by you i try to Open new project and select the option to convert to C/C++ project. In the wizard i can see the ble_peripheral project i select it and select ARM_CROSS_GCC. I have not added any new C++ files yet.
Now again i perform clean and perform build. The build invokes C++ compiler and gives below errors. Kindly advice.
调用:GNU ARM Cross C ++链接器
c:/program files (x86)/gnu tools arm embedded/7 2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main/fpv5-sp/hard\libg.a(lib_a-exit.o): In function `exit':
出口:(。text.exit + 0x16):未定义引用“_exit”
./startup/DA1469x/GCC/exception_handlers.o: In function `.code_starts':
C:/diasemi/smartsnippetsstudio2.0.8/sdk_10.0.6.88/sdk/bsp/startup/da1469x/gcc/exception_handlers.s:153:未定义引用`__copy_table_start__'
C: / DiaSemi SmartSnippetsStudio2.0.8 / SDK_10.0.6.88 /sdk/bsp/startup/DA1469x/GCC/exception_handlers.S:154: undefined reference to `__copy_table_end__'
C: / DiaSemi SmartSnippetsStudio2.0.8 / SDK_10.0.6.88 /sdk/bsp/startup/DA1469x/GCC/exception_handlers.S:198: undefined reference to `__zero_table_start__'
C:/diasemi/smartsnippetsstudio2.0.8/sdk_10.0.6.88/sdk/bsp/startup/da1469x/gcc/exception_handlers.s:199:未定义引用`__zero_table_end__'
./startup/da1469x/init_da1469x.o:in函数`systeminitpre':
C: / DiaSemi SmartSnippetsStudio2.0.8 / SDK_10.0.6.88 /sdk/bsp/startup/DA1469x/init_da1469x.c:506: undefined reference to `__copy_table_start__'
C: / DiaSemi SmartSnippetsStudio2.0.8 / SDK_10.0.6.88 /sdk/bsp/startup/DA1469x/init_da1469x.c:506: undefined reference to `__copy_table_end__'
C: / DiaSemi SmartSnippetsStudio2.0.8 / SDK_10.0.6.88 /sdk/bsp/startup/DA1469x/init_da1469x.c:506: undefined reference to `__zero_table_start__'
C:/diasemi/smartsnippetsstudio2.0.8/sdk_10.0.6.88/sdk/bsp/startup/da1469x/init_da1469x.c:506:未定义引用“__zero_table_end__”
./sdk/ble/stack/da14690/src/arch_main.o: In function `cmac_update_power_ctrl_reg_values':
C: / DiaSemi SmartSnippetsStudio2.0.8 / SDK_10.0.6.88 /sdk/interfaces/ble/stack/da14690/src/arch_main.c:185: undefined reference to `cmac_dynamic_config_table_ptr'
./sdk/ble/stack/da14690/src/arch_main.o:in function`cmac_mem_ctrl_setup':
C:/diasemi/smartsnippetsstudio2.0.8/sdk_10.0.6.88/sdk/interfaces/ble/stack/da14690/src/arch_main.c:202:未定义的参考`cmi_fw_dst_addr'
Hi,
Can you guys reply to my query. The cpp file get compiled but there is a linker error. i have shown some of the errors.
have you guys tried conversion of C to C++ for any example code like ble_peripheral, bli_central
Hi,
目前我在链接器设置中进行了一些更改,并将库路径添加到链接器。链接错误减少。
currently i get only two linking error.
调用:GNU ARM Cross C ++链接器
./sdk/ble/stack/da14690/src/arch_main.o:in function`cmac_mem_ctrl_setup':
C:/diasemi/smartsnippetsstudio2.0.8/sdk_10.0.6.88/sdk/interfaces/ble/stack/da14690/src/arch_main.c:204:未定义的参考`cmi_fw_dst_addr'
C:/diasemi/smartsnippetsstudio2.0.8/sdk_10.0.6.88/sdk/interfaces/ple/stack/da14690/src/arch_main.c:204:未定义的参考`__cmi_section_end_eng__'
collect2.exe:错误:LD返回1个退出状态
make: *** [ble_peripheral.elf] Error 1
请告诉我们如何解决这个问题。
嗨Sandeep,你是否能够在构建CPP应用程序时解决链接器问题?
我面临着同样的问题。编译工作是工作,但链接器缺少大量引用。
Could you please advise?
Thx!
Hi Danny, we will reach out to you directly BR JE_dialog
嗨Sandeep,we are taking this offline onto direct communictaion. BR JE_Dialog .