A customer asks:
I am trying to work with the ADI provided API for the AD9371, but I have encountered an issue that I am having trouble resolving.
- I am running Vivado and XSDK 2016.4 on Windows 10
- I built the provided HDL for the AD9371 and exported to SDK
- I imported all of the API source code into a new project in XSDK
- I am using common.c/h without any modifications
- I am using the auto-generated headless.c/h files for a sample application (which I will customize later)
- For now, I created stub code for the drivers that I am developing (because we have chosen to run bare metal, No-OS)
- This temporarily resolved issues with spi.h, logger.h, and others not being defined
- When I try to build the API (with my “stub code”) I get the following error:
- Error à undefined reference to nanosleep in common.c
- This function is used within the function CMB_wait_ms()
- This function appears to be defined in time.h which is included in common.c
- Additionally the POSIX extension should be enabled in common.h with #define _POSIX_C_SOURCE 199309L
Can you please advise on how I can resolve this issue?