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

Issues running imported Keil project in Segger Studio

I tried importing the Keil 5 SDK 13 project from github.com/.../nRF5-ble-timesync-demo into Segger.

I followed all the directions from devzone.nordicsemi.com/.../ However, I did have to reverse the thumb_crt0.s modifications of adding fs_data information. The changes gave errors when building that were removed upon reversing the file to its original state. Below is a photo of that error. Goes away using the original thumb_crt0.s though.

Here is a photo of that error.

I am able to Build fine.

There are no indications something is wrong when hitting "Build and Run". Only thing maybe is many of the lines are listed as "Working" and others as "Completed". The nRF52832 DK is not advertising any BLE services so the project does not seem to work. Output pictures below

image description image description

The project works fine downloading to the DK from Keil and I can connect to the BLE advertisements then.

Anyone know a solution?

  • Hi,

    With the release of SDK 14.1, we have added support for Segger Embedded Studio (SES) IDE. You no longer need to convert the SDK examples from Keil to SES. You can use Segger Embedded Studio for commercial and non-commercial purpose with Nordic Semiconductor devices free of charge without any code limit. See this article for more information.

    The best approach will maybe therefore be to start with the ble_app_uart in SDK 14.1, and add the time_sync files and related changes to the SDK 14.1 ble_app_uart SES project. This includes:

    Add these includes in main.c:

    #include "nrf_gpiote.h"
    #include "nrf_ppi.h"
    #include "nrf_timer.h"
    #include "time_sync.h"
    

    Add time_sync.c to the SES project files.

    Add the function sys_evt_dispatch() declaration before ble_stack_init(),

    static void sys_evt_dispatch(uint32_t sys_evt, void * p_context)
    {
        ts_on_sys_evt(sys_evt);
    }
    

    Add the function as observer at the end of ble_stack_init():

    NRF_SDH_SOC_OBSERVER(sys_dispatch,1,sys_evt_dispatch,NULL);
    

    Replace the bsp_event_handler() with the one in the time_sync project. Add the sync_timer_button_init function, and add the call to main().

    Then make sure that time_sync.c logging part looks like this:

    #define NRF_LOG_MODULE_NAME TIME_SYNC
    #include "nrf_log.h"
    #include "nrf_log_ctrl.h"
    NRF_LOG_MODULE_REGISTER();
    

    You can download SDK 14.1 here.

    You can download Segger Embedded Studio from here.

  • Thank you Sigurd, the project appears to be working with 1 DK. Pin 24 is toggling at 4ms and the BLE service is advertising. I will be able to test with 2 once my second DK arrives in the mail.

    EDIT: The original time sync example has been updated with a Segger project now.

Related