0

Issues running imported Keil project in Segger Studio

nickwerline gravatar image

asked 2017-11-19 08:21:24 +0100

I tried importing the Keil 5 SDK 13 project from https://github.com/nordic-auko/nRF5-b... into Segger.

I followed all the directions from https://devzone.nordicsemi.com/blogs/... 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?

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
1
sigurdon gravatar image

answered 2017-11-19 14:24:56 +0100

updated 2017-11-20 12:40:29 +0100

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.

edit flag offensive delete publish link more

Comments

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.

Nick ( 2017-11-20 01:45:55 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower

Stats

Asked: 2017-11-19 08:21:24 +0100

Seen: 56 times

Last updated: nov. 19