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

Building my first code with softdevice

Hi, I'm trying to build and install my first code that uses the BLE / softdevice to my NRF52-DK

I'm using Windows 10, Eclipse/gcc and nRF5_SDK_14.2.0_17b948a I'm able to build and download the blinky code to my DK (all working as expected),I'm able to download the "ble_app_uart_pca10040_s132.hex" from "\examples\ble_peripheral\ble_app_uart\hex" to my DK (all works as expected, not this hex file is 452KB). I have the code from "C:\Dev\Nordic\nRF5_SDK_14.2.0_17b948a\examples\ble_peripheral\ble_app_uart\pca10040\s132\armgcc" loaded in Eclipse it shows no errors, but 4 warnings in main.c -

Description/Location/Type

Unused declaration of variable 'm_advertising_ble_obs' line 110 Code Analysis Problem

Unused declaration of variable 'm_advertising_soc_obs' line 110 Code Analysis Problem

Unused declaration of variable 'm_gatt_obs' line 109 Code Analysis Problem

Unused declaration of variable 'm_nus_obs' line 108 Code Analysis Problem

I am able to compile the project with no errors, however the resulting .hex file is only 108KB in size and when loaded to the DK does nothing.

A I missing something simple? what information should I include here to help resolve this?

Thanks

Paul P

Parents
  • @PaulP: The pre-compiled version has the softdevice included, that's why it's 452kB. To test the hex file that you compiled yourself, you need to flash the softdevice first, then flash the application hex. Make sure you use nrfjprog.exe or Jlink.exe to flash, don't do drag and drop.

    I suggest to test first by using make to compile directly with gcc. Eclipse is not recommended, if you want a free IDE, you can try Segger Embedded Studio. It's free if you use with Nordic chip. SES is supported natively in SDK v14.2

Reply
  • @PaulP: The pre-compiled version has the softdevice included, that's why it's 452kB. To test the hex file that you compiled yourself, you need to flash the softdevice first, then flash the application hex. Make sure you use nrfjprog.exe or Jlink.exe to flash, don't do drag and drop.

    I suggest to test first by using make to compile directly with gcc. Eclipse is not recommended, if you want a free IDE, you can try Segger Embedded Studio. It's free if you use with Nordic chip. SES is supported natively in SDK v14.2

Children
No Data
Related