问题implementing Custom using Template

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
jlabuac
Offline
Last seen:1 year 7 months ago
加入:2017-04-20 06:06
问题implementing Custom using Template

Hi Dialog,

I am using the template from the SDK to implement a custom profile.

The first thing I did is add the following to user_profiles_config.h:

#define CFG_PRF_CUST1

But it fails during compilation. I get errors pertaining to cust1 files:
编译custs1_task.c……
..\..\..\..\..\sdk\ble_stack\profiles\custom\custs\src\custs1_task.c(20): error: #5: cannot open source input file "custs1_task.h": No such file or directory
#include "custs1_task.h"
..\..\..\..\..\sdk\ble_stack\profiles\custom\custs\src\custs1_task.c: 0 warnings, 1 error
compiling lans_task.c...

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi jlabuac,

Hi jlabuac,

The error that you get is because the you have not included in the header files directory where keil searches the header's diretory that are neseccary for the cust1 profile, in order for this compile you will have to go to the "options for target" in Keil and hit the "C/C++" file and go the"Include Paths" field, in that field click the button in order to add the following directories \sdk\ble_stack\profiles\custom\custs\api and \sdk\ble_stack\profiles\custom. After you done with that, you will have to do some extra mods in order for this to compile, in keil from the sdk_profiles folder remove the cust2.c and cust2_task.c files from the project and also in the cust_prf_funcs[], replace the custs1_init() function with the app_custs1_init() and also replace the app_custs1_enable() function with NULL in order for the project to compile.

Thanks MT_dialog