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
  • Hello,

    I believe the device family pack 8.27.0 should be included in the SDK16.0.0 zip file root folder:

    Try to run this, and see if it still complains about the device family pack. Other than that, what compiler errors do you get when you try to compile?

    Best regards,

    Edvin

  • Hi Edvin,

    ok - clean build (yet again).  Loaded the 8.27.0 device family pack.  now stating error: #5: cannot open source input file "nrf_erratas.h" no such file or directory (from the system_nrf52840.c file).

    What's next?  I've tried the thread about the missing nrf_erratas.h file, but end up with the problem with FIRST/LAST - which I couldn't resolve.  

    What's the next step here?

    --Daniel

  • Hello Daniel,

    I can't find any reference to nrf_erratas.h in the SDK. Can you see what .c or .h file that includes nrf_erratas.h? Perhaps it is in the Keil installation.

    Some hints that may help either way:

    1: If the path to your SDK is long, the compiler may struggle to find the files that are included. Try to reduce the path length by putting the SDK in e.g.: C:\nordic\SDKs\SDK16 (create this folder).

    2: Try to close the Keil project, delete the _build and RTE folder, and open the project again.

    3: If that doesn't work, please try to follow the steps provided by Simon in this ticket:
    https://devzone.nordicsemi.com/f/nordic-q-a/54749/sdk16-0-keil5-26-building-error

    Best regards,

    Edvin

  • ok - tried that.  still not working.  Some specifics.  If tried using the ble_app_template in the ble_peripheral directory.  I'm trying with both the 16.0.0 and 15.0.0 sdk.  16.0.0 is using the 8.27.0 family pack while the 15.0.0 is using the 8.16.0  Both are still not happy with the nrf_erratas.h file (cannot fine, and does not exist in the components or modules areas either).  I'm using the latest Keil ide (just fully reloaded) on a windows 10 system (which is working otherwise for Infineon arm processor correctly).  

    What's next to try?

Reply
  • ok - tried that.  still not working.  Some specifics.  If tried using the ble_app_template in the ble_peripheral directory.  I'm trying with both the 16.0.0 and 15.0.0 sdk.  16.0.0 is using the 8.27.0 family pack while the 15.0.0 is using the 8.16.0  Both are still not happy with the nrf_erratas.h file (cannot fine, and does not exist in the components or modules areas either).  I'm using the latest Keil ide (just fully reloaded) on a windows 10 system (which is working otherwise for Infineon arm processor correctly).  

    What's next to try?

Children
  • Edvin said:
    Can you see what .c or .h file that includes nrf_erratas.h?
  • 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.

Related