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

BDS plugin fails for cycling power profile

Hi,

The Bluetooth Developer Studio plugin fails to generate proper CP profile.

We use the last BDS version (1.1.3139) and the last version on the plugin (1.3)

Here the stacktrace:

20:01 - [Code Generator] [I] - Packaging Profile data for the plugin - Nordic Semiconductor nRF5 1.3.0 SDK 14.0
20:01 - [Code Generator] [I] - Loading the plugin Nordic Semiconductor nRF5 1.3.0 SDK 14.0
20:01 - [Code Generator] [I] - Validating the plugin Nordic Semiconductor nRF5 1.3.0 SDK 14.0
20:01 - [Code Generator] [I] - BDS version: 1.1.3139.0
20:01 - [Code Generator] [I] - Starting code generation...
20:01 - [Code Generator] [I] - WARNING: Requirement "c1" in Cycling Power Measurement is not defined. Adding field "bool c1".
20:01 - [Code Generator] [I] - WARNING: Requirement "c2" in Cycling Power Measurement is not defined. Adding field "bool c2".
20:01 - [Code Generator] [I] - WARNING: Requirement "c3" in Cycling Power Measurement is not defined. Adding field "bool c3".
20:01 - [Code Generator] [I] - WARNING: Requirement "c4" in Cycling Power Measurement is not defined. Adding field "bool c4".
20:01 - [Code Generator] [I] - WARNING: Requirement "c5" in Cycling Power Measurement is not defined. Adding field "bool c5".
20:01 - [Code Generator] [I] - WARNING: Requirement "c1" in Cycling Power Vector is not defined. Adding field "bool c1".
20:01 - [Code Generator] [I] - WARNING: Requirement "c2" in Cycling Power Vector is not defined. Adding field "bool c2".
20:01 - [Code Generator] [I] - WARNING: Requirement "c1" in Cycling Power Control Point is not defined. Adding field "bool c1".
20:01 - [Code Generator] [I] - WARNING: Requirement "c2" in Cycling Power Control Point is not defined. Adding field "bool c2".
20:01 - [Code Generator] [I] - Generating files for service Cycling Power...
20:01 - [Code Generator] [I] - Generating header file ble_cps.h
20:01 - [Application]   [V] - Creating Plugin File ble_cps.h
20:01 - [Code Generator] [I] - Generating code file ble_cps.c
20:01 - [Code Generator] [I] - FATAL!!! Exception occurred during data dumping...
20:01 - [Code Generator] [I] - TypeError: Cyclic reference detected.
20:01 - [Code Generator] [I] - An error occurred executing the plugin
20:01 - [Code Generator] [E] - Object has no method 'FormatTypeName'
20:01 - [Code Generator] [E] - Bluetooth.D3T.Common.Services.JavaScriptRuntimeException: An error occurred while Invoking the script method - RunPlugin ---> Jint.Runtime.JavaScriptException: Object has no method 'FormatTypeName'
   at Jint.Native.Function.ScriptFunctionInstance.Call(JsValue thisArg, JsValue[] arguments)
   at Jint.Engine.Invoke(String propertyName, Object thisObj, Object[] arguments)
   at Bluetooth.D3T.Common.Services.JSIsolatedProgram.Invoke(String method, Object[] paramData)
   --- End of inner exception stack trace ---
   at Bluetooth.D3T.Common.Services.JSIsolatedProgram.<InvokeAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Bluetooth.D3T.Common.Service.PluginEngine.<RunPluginInternal>d__29.MoveNext()

I tried with the previous version of the plugin (1.2.4) and another issue appears.

The issue seems not new (see here: devzone.nordicsemi.com/.../ ), but the new version of the plugin doesn't fix it.

We really need those files for the sdk 14.

Anyone can tell me how to fix that or generate the files for me ?

Thanks

  • Some additional informations:

    I managed to generate files nonetheless. But the generated files are somehow broken. Here the circumvention I tried:

    * Select the "Cycling Power Measurement" charasteristic of your "Cycling Power" service
    * Click on "Descriptors"
    * Select on "Server Characteristic Configuratoin"
    * Click on "Fields"
    * Click on "Remove"
    

    After this manipulation, I succeeded generating the files. But when I tried to compile them, I had the following error:

    Compiling file: main.c
    Compiling file: service_if.c
    In file included from ../../../service_if.c:47:0:
    ../../../ble_cps.h:1014:103: error: unknown type name 'ble_cps_cycling_power_measurement_server_characteristic_configuration_t'
     uint32_t ble_cps_cycling_power_measurement_server_characteristic_configuration_set(ble_cps_t * p_cps, ble_cps_cycling_power_measurement_server_characteristic_configuration_t * p_cycling_power_measurement_server_characteristic_configuration);
                                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../../../../../../components/toolchain/gcc/Makefile.common:272: recipe for target '_build/nrf52832_xxaa/service_if.c.o' failed
    make: *** [_build/nrf52832_xxaa/service_if.c.o] Error 1
    

    I hope Nordic people can more easily find the plugin issue with this.

  • Hi

    Can you share your XML file with me?
    Then I can try and reproduce the issue on my end.

    BDS is not given very high priority ATM, but we might be able to get a fix in in time for SDK15, which is expected out Q1 2018.

    Best regards

  • Hi,

    Just did a new project, and added the Cycling Power profile. Anyway files : link

    regards,

  • Hi

    I was able to reproduce the issue on my end, both when starting from scratch and when using your project.

    I will report it to the software team and ask to have it updated in the future.

    Best regards
    Torbjørn

Related