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

Build examples (nRF52840 BLE) are all Broken. Need Help ASAP!

Ok - 

I've been through this a few times and read the forums, but the current build system is broken.  I'm trying to compile (not even load the board at this point) the ble_hts example from the sdk 16.0 with no luck.  I've had this working in the past - but needed to add some additional functionally to our device.  Simple I though, just fix the code and recompile.  The build system wanted to update (which was my mistake) and now nothing works.  I've reloaded from scratch both the keil IDE and also the SDK and family packs... but keep getting compatibility issues.  Currently the compiler is saying it needs startup:8.27.0 and that the component is not available for target nrf52840_xxaa  which is odd, since this should basically just work (as it's from the nordic examples). 

I also get into the loop of different versions of family packs and sdk.  and also the nice problem with the missing "{" and also the FIRST/LAST issue.

what I need is the correct list of 'things' or 'steps' to load and compile (and hopefully run) one of the BLE examples from a fresh build of the environment (the current documentation is NOT correct and bounces all over the place - it's hard to follow).  make it simple.  just need a list of todo's and links to get the sw to compile and run fro the nrf52840 (prefer the BLE HTS, but not picky)

Parents Reply Children
  • yea.  it's the template example, the file is system_nrf52.c  line 29

  • I have had a similar problem with Keil5 and more recent versions of the device family pack. In my case it turned out to be caused by having an "outdated" version of the 'compiler_abstraction.h' header that didn't define the __UNUSED keyword used by the new errata headers.

    So maybe you have run into the same problem? You can add the __UNUSED definition to the compiler abstraction file included from the nRF5 SDK (headers with key symbol are from "Keil packs") and see it resolves the build error.

    I'm using the latest MDK version:

  • ok ... gave that a try.  had a lot of trouble selecting the "manage Run-Time Environment -> Device -> startup to select version 8.32.1  had to do a rain dance to deselect startup and select startupconfig - compile - fail, go back to the section and then I could select that version of the tools.  Ok- so that problem went away, now I'm getting  in file nrf51_erratas.h(40): error: #130: expected a "{" (why nrf51 as I'm using nrf52?)  very strange - and also the error message I've seen before and not been able to successfully resolve either.  I feel like I'm in a circular buffer just going round and round.  

    Shouldn't this be pretty easy?  what am I missing?

  • I get the exact same error if I comment out the __UNUSED symbol. 

    Did you check if it was defined in both header files? 51 headers are in the same include path, same for 53 and 91, but only files relevant for 52 will be linked in.

    But yes, this should obviously have worked "out-of-the-box". I understand the frustration of having to spend to build an example project that should have just worked. It has been reported internally and will hopefully be fixed for the next release.

    If you still get build errors after this I suggest you try the Keil4 project. It does not rely on the Keil5 pack system, instead, it includes all the MDK related files directly from the SDK. Note that Keil4 projects require that you run the 'nRF_MDK_8_27_0_Keil4_NordicLicense.msi' installer first.

  • understood, but it IS using the 51 file.  part of the familypack I believe.  under the AppData/local/Arm/Packs/NordicSemiconductor/nRF_DeviceFamilyPack\8.32.1\Device\Include\nrf51_erratas.h

    error: #130: expected a "{" static bool nrf51_errata_l(void __UNUSED;

    (which is line 40 of nrf51.erratash.h).  What determines this file over the 52_erratas.h?

Related