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

BDS fails to genrate working code for the BLE Cycling Power Service

Does anyone have a working copy of ble_cps.c\h

The BDS (version 1.0.2095.0) plugin (v.1.2.4) does not generate code that compiles under IAR EWB

IAR ANSI C/C++ Compiler V7.40.2.8542/W32 for ARM Copyright 1999-2015 IAR Systems AB. Error[Pe549]: variable "flags" is used before its value is set C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 31 Error[Pe020]: identifier "C1_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 62 Error[Pe020]: identifier "C1_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 66 Error[Pe020]: identifier "C2_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 70 Error[Pe020]: identifier "C2_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 74 Error[Pe020]: identifier "C3_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 78 Error[Pe020]: identifier "C3_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 82 Error[Pe020]: identifier "C4_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 86 Error[Pe020]: identifier "C4_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 90 Error[Pe020]: identifier "C5_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 94 Error[Pe020]: identifier "C5_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 98 Error[Pe549]: variable "properties" is used before its value is set C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 118 Error[Pe549]: variable "cycling_power_feature" is used before its value is set C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 180 Error[Pe549]: variable "flags" is used before its value is set C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 256 Error[Pe020]: identifier "C1_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 276 Error[Pe020]: identifier "C1_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 280 Error[Pe020]: identifier "C2_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 285 Error[Pe020]: identifier "C2_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 289 Error[Pe020]: identifier "C1_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 338 Error[Pe020]: identifier "C1_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 342 Error[Pe020]: identifier "C2_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 346 Error[Pe020]: identifier "C1_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 396 Error[Pe020]: identifier "C1_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 400 Error[Pe020]: identifier "C2_required" is undefined C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 404 Error[Pe177]: function "server_characteristic_configuration_encode" was declared but never referenced C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 131 Error[Pe177]: function "server_characteristic_configuration_decode" was declared but never referenced C:\SVN_3\Software\BLE cycling_power_sensor\trunk\ble_cps.c 163

Parents Reply Children
  • The plugin you refer to is the one I used.

    Unfortunately I do not have access to Keil tools.

  • I the plugin is in beta phase and I think has been tested only in keil IMHO

  • I have the same problem. I work with Keil v5 and BDS 1.1 and the above mentioned plugin. still the code cant be generated due to similar problems:

    *** Using Compiler 'V5.06 update 3 (build 300)', folder: 'D:\Program Files\Keil_v5\ARM\ARMCC\Bin' Rebuild target 'nrf52832_xxaa_s132' compiling ble_cps.c... ......\ble_cps.c(62): error: #20: identifier "C1_required" is undefined if (C1_required) ......\ble_cps.c(66): error: #20: identifier "C1_required" is undefined if (C1_required) ......\ble_cps.c(70): error: #20: identifier "C2_required" is undefined if (C2_required) ......\ble_cps.c(74): error: #20: identifier "C2_required" is undefined if (C2_required) ......\ble_cps.c(78): error: #20: identifier "C3_required" is undefined if (C3_required) ......\ble_cps.c(82): error: #20: identifier "C3_required" is undefined if (C3_required) ......\ble_cps.c(86): error: #20: identifier "C4_required" is undefined if (C4_required) ......\ble_cps.c(90): error: #20: identifier "C4_required" is undefined if (C4_required) ......\ble_cps.c(94): error: #20: identifier "C5_required" is undefined if (C5_required) ......\ble_cps.c(98): error: #20: identifier "C5_required" is undefined if (C5_required) ......\ble_cps.c(278): error: #20: identifier "C1_required" is undefined if (C1_required) ......\ble_cps.c(282): error: #20: identifier "C1_required" is undefined if (C1_required) ......\ble_cps.c(287): error: #20: identifier "C2_required" is undefined if (C2_required) ......\ble_cps.c(291): error: #20: identifier "C2_required" is undefined if (C2_required) ......\ble_cps.c(340): error: #20: identifier "C1_required" is undefined if (C1_required) ......\ble_cps.c(344): error: #20: identifier "C1_required" is undefined if (C1_required) ......\ble_cps.c(348): error: #20: identifier "C2_required" is undefined if (C2_required) ......\ble_cps.c(398): error: #20: identifier "C1_required" is undefined if (C1_required) ......\ble_cps.c(402): error: #20: identifier "C1_required" is undefined if (C1_required) ......\ble_cps.c(406): error: #20: identifier "C2_required" is undefined if (C2_required) ......\ble_cps.c(131): warning: #177-D: function "server_characteristic_configuration_encode" was declared but never referenced static uint8_t server_characteristic_configuration_encode(ble_cps_server_characteristic_configuration_t * p_server_characteristic_configuration, uint8_t * encoded_buffer) ......\ble_cps.c(163): warning: #177-D: function "server_characteristic_configuration_decode" was declared but never referenced static uint8_t server_characteristic_configuration_decode(uint8_t data_len, uint8_t * p_data, ble_cps_server_characteristic_configuration_t * p_write_val) ......\ble_cps.c: 2 warnings, 20 errors compiling service_if.c... compiling main.c... compiling bsp.c... compiling bsp_btn_ble.c... compiling ble_advdata.c... compiling ble_advertising.c... compiling ble_conn_params.c... compiling ble_srv_common.c... compiling app_uart.c... compiling nrf_delay.c... compiling device_manager_peripheral.c... compiling nrf_drv_common.c... compiling nrf_drv_gpiote.c... compiling nrf_drv_uart.c... compiling pstorage.c... compiling app_button.c... compiling app_error.c... compiling app_trace.c... compiling app_error_weak.c... compiling app_timer.c... compiling app_util_platform.c... compiling fstorage.c... compiling nrf_assert.c... compiling RTT_Syscalls_KEIL.c... compiling SEGGER_RTT.c... compiling SEGGER_RTT_printf.c... compiling nrf_log.c... assembling arm_startup_nrf52.s... compiling retarget.c... compiling softdevice_handler.c... compiling system_nrf52.c... "._build\nrf52832_xxaa_s132.axf" - 20 Error(s), 2 Warning(s). Target not created. Build Time Elapsed: 00:00:55

Related