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

Can't get ble_app_uart working on nRF51822 with GCC

I'm having trouble building the ble_app_uart example in: SDK11/examples/ble_peripheral

My build environment is: Ubuntu 15.04 SDK 11.0 GCC S130 PCA10000 nRF51822_xxaa - Rev 2 silicon

I can load and run the pre-built hex file: ble_app_uart_s130_pca10028.hex using JLinkExe. I can also successfully make the armgcc example.

My application doesn't run like the pre-built example when I do the following:

make make_flash_softdevice make flash

I have tried copying the PCA10028 folder and renaming it to PCA10000. I have edited Makefile and changed any references for PCA10028 and nrf51422_xxac to PCA10000 and nrf51822_xxaa respectively. I have tried various changes to the FLASH and RAM sections of ble_app_uart_gcc_nrf51.ld. However, I am not exactly sure what these should be as no combination seems to work.

I have tried using mergehex, but this doesn't work either.

I think my problem is related to the FLASH and RAM settings.

Can anyone point me in the right direction to resolving this issue.

Thanks Lee

Parents
  • I use Keil 5 and the application code for the project builds just fine. By the way, the free version of Keil 5 works fine with these examples. I think the problem is you refer to the ble_app_uart_s130_pca10028.hex as the app, but these are actually images of the entire flash space. So it includes the softdevice and application as one hex. The target in keil should be the 51822 and should be making the 51822_xxx...hex file which is just the app. Then the easiest route is to use nRFgo Studio, erase the whole thing and load only the correct softdevice and separately load the application code on top of it. After that you should be able to use the flash tools in GCC to load only the application code while you debug and code. If you have further problems, you are correct the flash, ram and target processor settings are vitally important. But I wouldn't just start renaming the pre-compile stuff to PCA10000. Nordic makes heavy use of board support headers and c files and you may just complicate things as you try to figure it out.

  • Still no success with these slightly modified settings. I've deleted the PCA10028 folder and reinstalled it from the SDK so that it is clean. I guess that it may be a step that I'm missing in order to get it to work with GCC.

Reply Children
No Data
Related