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.
You have to remember to change the include paths and source locations to include:
They may be missing.
thank you so much