undefined reference to `custs1_default_handler'

Learn MoreFAQsTutorials

3 posts / 0 new
Last post
me2a3ld
Offline
Last seen:4 months 2 weeks ago
加入:2020-06-24 11:37
undefined reference to `custs1_default_handler'

Hi all,

I recently had to move to Smartsnippets studio and therefore needed to use the default prox_reprter app and adapt for my uses. However, I always come upon this problem when compiling:

undefined reference to `custs1_default_handler'

No matter what I do to the Custom services set up, I always hit this error in the prf.c file at:

void prf_create_func(uint8_t conidx) { uint8_t i = 0; // Simple connection creation handler - nothing to do struct prf_task_env *prf = (struct prf_task_env *)rom_prf_cfg.prf_env; // execute create function of each profiles while (BLE_NB_USED_PROFILES && (i < BLE_NB_USED_PROFILES)) { #if (BLE_CUSTOM1_SERVER) && !defined (__EXCLUDE_ROM_CUSTS1__) if (prf->id == TASK_ID_CUSTS1) { // Defined in RAM space extern const struct ke_state_handler custs1_default_handler; // Override CUSTS1 default handler which has been registered by custs1_init(). // The custs1_init() ROM function registers the handler which resides in ROM. rom_prf_cfg.prf_env->prf[i].desc.default_handler = &custs1_default_handler; } #endif // Get Profile API const struct prf_task_cbs *cbs = prf_itf_get(prf->id); if(cbs != NULL) { // Call create callback cbs->create(prf, conidx); } i++; prf++; } }

Even though BLE_CUSTOM1_SERVER = 1 and __EXCLUDE_ROM_CUSTS1__ = 0, I cannot go any further.

Please help if you have encounted this problem before. Maybe if you have good "user_custs_config" & "user_cust1_def" files that may help too.

Device:
PM_Dialog
Online
Last seen:6 min 33 sec ago
工作人员
加入:2018-02-08 11:03
Hi me2a3ld,

Hi me2a3ld,

Thanks for your question online and for your interest in our DA14531 BLE solution.

Could you please try to clarify what you are trying to accomplish with the CUST1 profile?

Do you want to exclude the custs1 functions from the ROM and sue the custs1_task.c functions? Is my understanding correct?

Additionally, you are using the SmartSnippets Studio instead of the Keil IDE, aren’t you?

If you could provide extra inputs to replicate it, it will be very helpful.

I would recommend you checking theCreate a Custom GATT Profile Characteristic on DA14531 and DA14585/DA14586 devicestoo.

Thanks, PM_Dialog

Hdhdh Ddjek
Offline
Last seen:3 months 3 days ago
加入:2020-06-03 14:15
You have to remember to

你必须记得陈ge the include paths and source locations to include:

  • cust1.c
  • cust1_task.c
  • custom_common.c
  • attm_db_128.c
  • app_customs.c
  • app_customs_common.c
  • app_customs_task.c
  • app_findme.c
  • app_findme_task.c
  • etc.

They may be missing.