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

Application Never Reaches main()

Hi

I have been trying to get example ble_app_hrs to run after compilation on my 52832 dev board (pca10040).

The specific example is: C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Examples\11.0.0-2.alpha\ble_peripheral\ble_app_hrs\pca10040\s132\arm5

I have reset the board using nRFtools.

The application nrf52832_xxaa  compiles, and downloads, the Softdevice (which I assume I also need to manually compile), appears to be available in the via the drop-down 'select target' option in keil. I change to this and see a load of errors in the files list.

Attempting to compile this gives the error:

Rebuild target 'flash_s132_nrf52_6.0.0_softdevice'
error - cannot create command input file '..\..\..\..\..\..\components\softdevice\s132\hex\main.__i'
Target not created.

The application wont run to main - I assume this is because the soft-device is not present?

I am using Keil uVision 5.23 together with nRF SDK 15.0.0_a53641a 

If I program the pre-built hex file E:\nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\ble_app_hrs\hex\ble_app_hrs_pca10040_s132.hex then it works just fine.

Using NRF tools, I then erased the board, programmed the default 132 soft-device found at:

E:\nRF5_SDK_15.0.0_a53641a\components\softdevice\s132\hex\s132_nrf52_6.0.0_softdevice.hex

And then re-built and re-deployed the application from:

C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Examples\11.0.0-2.alpha\ble_peripheral\ble_app_hrs\pca10040\s132\arm5

This appears to give me something that works - eventually, but begs the questions:

- Why will the softdevice present in the actual example not compile?

- Are all soft devices (I note there are loads and loads of pre-compiled hex files in the example code) all identical to one another - for the same version eg 132 ??

- Are softdevices always loaded at the same location in the devices' flash storage - I am assuming so otherwise there is no way the libs could be referenced?

You'll gather from the above that I am new to this!

My config is thus:

Parents
  • Your mixing SDK11 with the S132 V6 from SDK15, they are not API compatible. 

    I strongly urge you not to use the Keil Packs, but rather download and use SDK15 as is. 

  • So, I removed the keil packs for nordic (by deleting the folder under packs as there is no 'remove group' option in the keil pack installer)., with the intention of the example using only the methods provided by SDK15. As soon as I remove the pack, Keil moans that the pack is not installed, and refuses to build the example:

    Error instantiating RTE components
    Error #544: Required Software Pack 'NordicSemiconductor.nRF_DeviceFamilyPack.8.16.0' is not installed
    Error #543: Device nRF52832_xxAA(Nordic Semiconductor) not found, pack 'NordicSemiconductor.nRF_DeviceFamilyPack.8.16.0' is not installed
    Error #541: 'NordicSemiconductor::Device:Startup:8.16.0' component is missing (previously found in pack 'NordicSemiconductor.nRF_DeviceFamilyPack.8.16.0')
    Target not created.
    Build Time Elapsed: 00:00:01

    It also pops up the following dialog box when I load the example from the SDK:

    Appears that I have no option but to use the Keil-Supplied packs for Nordic if I wish to build the examples??

    I have pointed the Nordic pack installed at the SDK15 via File-->Import From Folder, refreshed and then re-installed the Packs in order to get the example working again --- is this what you meant re 'don't use the keil packs', eg I am not using the SDK15 'as is', but rather importing it as packs into Keil??

    Looks like I am 'lost' once more...

    Nigel

  • I think you are making harder than it needs to be. Simply download the link provided by Håkon, extract it into e.g. the desktop, and open the the file located in  ....\Desktop\nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\ble_app_hrs\pca10040\s132\arm5_no_packs.

  • Thanks, yes, coming at this with zero knowledge I could not see the woods for the trees... The application that I inherited from a colleague failed to run for a very simple reason, he was using SDK 14.2, which includes soft device 132 V5.0.x - he had dumped a new soft device V5.1.x into the SDK 14.2 softdevice folder, and switched to using 5.1 I never had this in my standard 14.2 install, so the project I inherited was looking in the wrong place for the functions in my softdevice V5.0!! After lots of swearing I found out the reason his dev environment worked and mine did not!

    You live and learn - don't hack SDK folders!

    Nigel

  • Good to hear that you are getting smarter one step at the time, and yell out if you get more stuck.

    Simon

Reply Children
No Data
Related