Error when calling external library in high level app RRS feed

  • Question

  • I'm trying to link against an external library that has been pre-compiled for Cortex-A7.

    The application is building fine but when my code calls the library, I get an error when I try to debug the application:

    If I just link to the library and don't call it, then I don't get any problem.

    Here are the steps to reproduce this problem. I'm using an Avnet dev board, but it should work on any Azure Sphere board. No special hardware is required to reproduce the problem.

    1. Check out the Azure samples Github project
    2. Download from here:
    3. Open the GPIO_HighLevelApp from the cloned Azure-Sphere-samples repo
    4. Build and run application, verify that it works and debugging is ok.
    5. Open the ZIP file from step 2.
    6. Copy these files from the ZIP into the GPIO_HighLevelApp project folder:
    7. Add algobsec to the libraries that will be linked:

    8. Add these lines at the top of main.c:
      #include "bsec_datatypes.h"
      #include "bsec_interface.h"
    9. Add a call to bsec_init() in main():

    I appreciate any help on this, as it is blocking my current project.

    • Edited by Jeremy_K Monday, November 4, 2019 7:43 PM clarification of problem
    Monday, November 4, 2019 1:03 PM


  • The answer is the library was not compatible with the environment.

    The source for that library is not available, therefore you cannot use the BSEC with Linux on the Cortex-A7.

    My work-around (hack) was to use the BSEC library for the M4 core in a real-time app and pass the data from the high-level app for processing.

    I did try using the M4F build of the library, but I ran into multiple problems:

    1. By default,  the .cmake file in the Azure Sphere toolchain does not compile with the hard float option.

    2. Also, I was getting hard faults when trying to use floating point operations, so perhaps there is some other hardware restriction?

    • Marked as answer by Jeremy_K Thursday, December 5, 2019 12:46 AM
    Thursday, December 5, 2019 12:45 AM

All replies