This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Where is the include file for "app_mw_ble.c"?

Hello, I want to use the module app_mw_ble.c, but couldn't find its matching .h file, as a result, I got tons of "function declared implicitly" error.

For some reason, I discovered that there is some sort of correlation between this module with ble.h. Without thinking too much, I added a line:

#include "ble.h"

in the app_mw_ble.c.

And then I got a lot of "incompatible" error, here's a little example:

............\components\serialization\application\codecs\s110\middleware\app_mw_ble.c(193): error: #147-D: declaration is incompatible with "uint32_t sd_ble_uuid_vs_add(const ble_uuid128_t *, uint8_t *)__svc(99)" (declared at line 348 of "............\components\softdevice\s110\headers\ble.h")

And if I try to "match up" every single one of them, that is, if I replace

SVCALL(SD_BLE_UUID_VS_ADD, uint32_t, sd_ble_uuid_vs_add(ble_uuid128_t const *p_vs_uuid, uint8_t *p_uuid_type));

with

uint32_t sd_ble_uuid_vs_add(ble_uuid128_t  const*  p_vs_uuid, uint8_t *  p_uuid_type);

which is in the same format as the actual function defined in app_mw_ble.c, I will get tons of error during linking, telling me these functions' symbols couldn't be found app_mw_ble.o.

What should I do? What is "SVCALL" anyway? Why is it wrapped in some compiler magic-spells instead of in the more conventional, usual form???

Related