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

nRF-52 Preview Kit hanging in ble_stack_init

Hi all,

I'm working with the nRF-52 preview kit (Newer version from global tour) and I'm trying to run the heart rate sensor example from SDK version 0.9.2 using Crossworks as my IDE. I can compile and run the program but nothing happens and when I debug the program I find that it is hanging in ble_stack_init. Any ideas as to why this is happening?

Thanks,

Garth

  • This is quite normal on Crossworks and it can be quite difficult to setup, specially for nRF52. I can give you a guide to what I did to setup the ble_app_template project in Crossworks:

    • First, import the Keil project with "File->Open IAR EWARM/Keil MDK Project" and navigate to the the Keil project file in the SDK. Choose NRF51_EXE as template (may work with the others also, have not tested).
    • Add include directories for nrf.h (C:\NordicSemi\SDK\nRF52_SDK_0.9.2\components\device) and core_cm0.h (C:\Keil_v5\ARM\Pack\ARM\CMSIS\4.5.0\CMSIS\Include) in User Include Directories
    • Remove retarget.c (not needed see here).
    • Add FLASH_START=0x1F000 and RAM_START=0x20002800 in Section Placement Macros. This is the flash and RAM size for SD132 1.0.0 alpha.
    • Add "nonexistant" in Entry Point Symbol.
    • Add STARTUP_FROM_RESET in Preprocessor Definitions.
    • Change Can Erase All to "No" in Target Loader Options.
    • Change Target Processor to "nRF52832".
    • Change ARM FP ABI Type to "Hard".
    • Change ARM Architecture to "v7EM".
    • Add system_nRF52.c (ble_app_template\pca10036\s132\arm5_no_packs\RTE\Device\nRF52832_xxAA) to the System Files folder under in the project.

    There may be other things that are not include here or that I have forgot, but this worked for me.

    Ole

  • Utilizing all of those suggestions did the trick! Thanks!

Related