Compiling template project with DISS Profile result into errors.

4 posts / 0 new
Last post
vikramtheone
Offline
Last seen:5 years 2 weeks ago
加入:2015-06-12 08:42
Compiling template project with DISS Profile result into errors.

Hi,
I'm following the User Manual: Software Development Guide (UM-B-003) and I was trying outChapter 6: Addition of existing application code for profiles. In that Chapter, application code initialising and controlling the Device Information Service Server(DISS) role profile will be added to the application. I'm using the "template" project and I'm making the changes as given in steps 6.1 to 6.5. But the step 6.6: Application verification, in which it asks me to build the application, actually, FAILS. The errors during compilation are as follows:


...
...
compiling app.c...
compiling app_sec.c...
compiling app_sec_task.c...
compiling app_task.c...
.\..\..\..\..\src\modules\app\api\app_task_handlers.h(67): error: #20: identifier "DISS_CREATE_DB_CFM" is undefined
{DISS_CREATE_DB_CFM, (ke_msg_func_t)diss_create_db_cfm_handler},
.\..\..\..\..\src\modules\app\api\app_task_handlers.h(67): error: #20: identifier "diss_create_db_cfm_handler" is undefined
{DISS_CREATE_DB_CFM, (ke_msg_func_t)diss_create_db_cfm_handler},
.\..\..\..\..\src\modules\app\api\app_task_handlers.h(67): error: #44: expression must have pointer type
{DISS_CREATE_DB_CFM, (ke_msg_func_t)diss_create_db_cfm_handler},
.\..\..\..\..\src\modules\app\api\app_task_handlers.h(68): error: #20: identifier "DISS_DISABLE_IND" is undefined
{DISS_DISABLE_IND, (ke_msg_func_t)diss_disable_ind_handler},
.\..\..\..\..\src\modules\app\api\app_task_handlers.h(68): error: #20: identifier "diss_disable_ind_handler" is undefined
{DISS_DISABLE_IND, (ke_msg_func_t)diss_disable_ind_handler},
.\..\..\..\..\src\modules\app\api\app_task_handlers.h(68): error: #44: expression must have pointer type
{DISS_DISABLE_IND, (ke_msg_func_t)diss_disable_ind_handler},
..\..\..\..\src\modules\app\src\app_task.c(375): error: #28: expression must have a constant value
const struct ke_state_handler app_default_handler =
E_STATE_HANDLER(app_default_state);
..\..\..\..\src\modules\app\src\app_task.c: 0 warnings, 7 errors
编译app_template_proj.c……
compiling app_console.c...
compiling app_dis.c...
compiling app_dis_task.c...
".\out\template.axf" - 7 Error(s), 2 Warning(s).
Target not created.
Build Time Elapsed: 00:00:23

I've made several independent attempts, starting from the scratch, just to rule out any missing of steps in between, but on all those occasions the build step has failed with same errors.

Any help to fix these errors will be much appreciated.

Device:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi vikramtheone,

Hi vikramtheone,

The problem is that in file app_task_handlers.c cant see the messages or the handlers of the app_diss_task.c file. This usually happens if miss step 6.4. Please confirm that in app_my_project_proj.h you have placed the right include files:

#if (BLE_DIS_SERVER)
#include “app_dis.h”
#include “app_dis_task.h”
#endif

Or check if the BLE_DIS_SERVER is defined (remove if nessecary tha #defines in order to see if it compiles). This should work.

If you are still dealing with the same problem please place the following includes

#include "app_dis.h"

#include "app_dis_task.h"

In the app_task_handlers.c and see if it compiles.

Thanks MT_dialog

vikramtheone
Offline
Last seen:5 years 2 weeks ago
加入:2015-06-12 08:42
My app_template_proj.h was as

My app_template_proj.h was as expected.

So, I tried the second approach and solved it, i.e. I placed the following headers in app_task_handlers.h.

#if (BLE_DIS_SERVER)
#include “app_dis.h”
#include “app_dis_task.h”
#endif

The build succeeds now and I'm able to flash my murata DA14580 EVK and able to that the DIS is exposed to my phone app.

Thank you.

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi vikramtheone

Hi vikramtheone

Glad it worked although you should be able to compile your project without this workaround. Can you please check also app_api.h file and make sure that your app_template_proj.h is included there as well or check if the inclusion is blocked by an undefined #define.

Thanks MT_dialog