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

nRF52 SDK compiling fail with Keil

image descriptionHello,

I was trying to compile a BLE proximity project with Keil nRF52 SDK, but got error such as struct "" has no field. I can command out all these error and compile it. BLE seems to work fine. But I feel just not right to do it in this way. Does any one have the same experience? Any better solutions?

Parents
  • I believe you get these errors because you are using an Device Family Pack that is incompatible with the SDK.

    The Device Family Pack that can be downloaded together with the SDK is 8.0.3. As you can see here. Install it in the Pack Installer by clicking File->Import...

    It can be a bit troublesome to downgrade this from 8.0.5 or 8.1.0 which I guess you are using, but this should work:

    1. Uninstall all 8.x.x device family packs (except 8.0.3 if you have it). Then it should look like this in the pack installer:

    image description

    The Select Software Packs should look like this: image description

    And the Run-Time Environment should look like this: image description

    You also need to delete the _build and the RTE folders in the project folder. If you compile now, you shouldn't get any errors.

  • OK, I did some playing around with this. Your description does solve the reported issue. The important part is that 8.1.0 must not be installed in order to not get this compilation issue. It is insufficient to just have 8.0.3 selected in the 'Select Software Packs' dialog. To the point below, I have used this solution on 0.9.2 and it behaves the same way so the solution below does not seem right. My best guess is that you have uninstalled 8.1.0 which actually fixed the problem. Begs the question what 8.1.0 can be used for then? It obviously breaks the builds every time since the startupfile is trying to map structs that are never defined anywhere.

Reply
  • OK, I did some playing around with this. Your description does solve the reported issue. The important part is that 8.1.0 must not be installed in order to not get this compilation issue. It is insufficient to just have 8.0.3 selected in the 'Select Software Packs' dialog. To the point below, I have used this solution on 0.9.2 and it behaves the same way so the solution below does not seem right. My best guess is that you have uninstalled 8.1.0 which actually fixed the problem. Begs the question what 8.1.0 can be used for then? It obviously breaks the builds every time since the startupfile is trying to map structs that are never defined anywhere.

Children
No Data
Related