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

Configuring SES for application

I'm trying to develop a beacon application where I dore to read the battery level.

I installed the Segger SES development environment.

If I use the example \examples\ble_peripheral\ble_app_beacon everything works correctly.

If I use the example \examples\peripheral\saadc everything works correctly.

But if I try to combine the two examples, I have a lot of problems. 

I edited the sdk_config.h file to include the necessary modules but I still have problems compiling; they do not sell found the files to be included. I tried to see the options of the project but I could not figure out if it is possible to port the configurations ... any suggestions?

is it possible to configure a module with all the related environment variables? I also installed CMSIS configuration but I can not find an effective solution, I would not do it all manually ...

Thank you very much

Parents
  • Hi DEGHI,

    sdk_config.h is a configuration file for the SDK drivers and libraries. It cannot be used to add modules/services.

    Unfortunately you need to add these two examples manually. When you say you have a lot of problem, you may post those here and most probably you will get some help to overcome them.

  • Hi Aryan, many thanks for the email.

    I had tried to add the code of the saad example to that of the beacon but I had problems in the linking phase. Now I tried to do the opposite, starting from the saadc sample code (\examples\peripheral\saadc) I would like to add the code of the BLE advertising part (\examples\ble_peripheral\ble_app_beacon).but the compiler does not find some include files.

    Please, could you confirm to me that it is enough to update the sdk_config.h configuration file by inserting the necessary modules and enabling them (maybe I try again to verify by pointing out the actions done) or I have to do some other action?

  • For example, now I took the example \examples\ble_peripheral\ble_app_beacon if I compile it and install it all ok.

    I have noticed that the other example related to SAADC foresees the configuration of some modules not present in this example. If I enable in the sdk_config.h file (I have not made any changes to the code) the Power Enabled module:

    // <e> POWER_ENABLED - nrf_drv_power - POWER peripheral driver
    // ================================================ ==========
    #ifndef POWER_ENABLED
    #define POWER_ENABLED 1
    #endif

    The compilation ends correctly but in the link phase I have the following error:

    Building ‘ble_app_beacon_pca10040_s132’ from solution ‘ble_app_beacon_pca10040_s132’ in configuration ‘Debug’
    Compiling ‘nrf_log_backend_serial.c’
    Compiling ‘nrf_log_backend_rtt.c’
    Compiling ‘nrf_log_backend_uart.c’
    Compiling ‘nrf_log_default_backends.c’
    Compiling ‘nrf_log_frontend.c’
    Compiling ‘nrf_log_str_formatter.c’
    Compiling ‘app_button.c’
    Compiling ‘app_error.c’
    Compiling ‘app_error_weak.c’
    Compiling ‘app_scheduler.c’
    Compiling ‘app_timer.c’
    Compiling ‘app_util_platform.c’
    Compiling ‘nrf_assert.c’
    Compiling ‘hardfault_implementation.c’
    Compiling ‘nrf_atfifo.c’
    Compiling ‘nrf_balloc.c’
    Compiling ‘nrf_fprintf.c’
    Compiling ‘nrf_fprintf_format.c’
    Compiling ‘nrf_memobj.c’
    Compiling ‘nrf_pwr_mgmt.c’
    Compiling ‘nrf_section_iter.c’
    Compiling ‘nrf_strerror.c’
    Compiling ‘boards.c’
    Compiling ‘nrf_drv_clock.c’
    Compiling ‘nrf_drv_common.c’
    Compiling ‘nrf_drv_gpiote.c’
    Compiling ‘nrf_drv_uart.c’
    Compiling ‘bsp.c’
    Compiling ‘bsp_nfc.c’
    Compiling ‘main.c’
    Compiling ‘SEGGER_RTT.c’
    Compiling ‘SEGGER_RTT_Syscalls_SES.c’
    Compiling ‘SEGGER_RTT_printf.c’
    Compiling ‘ble_advdata.c’
    Compiling ‘ble_srv_common.c’
    Compiling ‘nrf_sdh.c’
    Compiling ‘nrf_sdh_ble.c’
    Compiling ‘nrf_sdh_soc.c’
    Linking ble_app_beacon_pca10040_s132.elf
    Output/ble_app_beacon_pca10040_s132 Debug/Obj/nrf_drv_common.o: In function `POWER_CLOCK_IRQHandler':
    undefined reference to `nrf_drv_power_onIRQ'
    Build failed

  • OK, This is for SDK12.3 I guess, You should include nrf_driver_power.c in your project and enable POWER_ENABLED in your sdk_config.h file.

    Just to make sure that I was clear earlier.

    you need to explicitly add the modules to your project. easy way is to add every available module in SDK to your project and then enable/disable them using sdk_config.h file.

  • HI many thanks for the mail. I had enabled the module in the sdk_config.h file but I had not included the various nrf_xxx.c files in the SES, including files, everything works correctly.

    Thank you very much.

Reply Children
No Data
Related