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 Reply Children
  • Hi, thanks for the response,

    Yep, there is actually an error in my text above (as I mentioned I solved bits of my original question as I was typing out the forum post!). The actual example I have built/run is:

    E:\nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\ble_app_hrs\pca10040\s132\arm5_no_packs

    I still cannot compile the S132 softdevice that is included as a target in the above project though, 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.

    Also, I seem to have to change the IRAM1/IROM1 settings to get the main target to compile/run under Flash --> Configure Flash Tools -- Target.

    Do you know the CORRECT values I should put in here, where the S132 soft device is being used with the application, but no bootloader?

    Nigel

  • The reason you are not able to build and compile the softdevice is because it is already an executable hex file ready to be loaded into the microcontroller. Building works by creating object files (.o) from .c and .h files, before assembling it all together into an executable file (e.g. hex file), which can be loaded into the microcontroller

    The solution is to just flash the softdevice hex file directly into the microcontroller

    Regarding IROM and IRAM size and start values, the default values should work fine. However, if wrong values are used, you will be provided with the right values when debugging.

    Best regards Simon Iversen

  • Thanks, I am a software dev really (windows device drivers), been dumped in at deep end here hence the silly questions. As I gain knowledge I am sure the questions will become less stupid!

  • No problem. Keep asking, that is the best way to learn.

  • 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

Related