adi_osal.h is on git server for freertos, but missing from distribution

I noticed that most of the ADI-provided example code for ARM processors in the SC58* series have a virtual reference to \Source\portable\CCES\osal\adi_osal.h, which shows up with a little yellow exclamation point on it in the Project Explorer.  That's because it doesn't exist in the distribution.  However, it does appear here ->

The compiler doesn't complain because it is using the file from here -> "C:\Analog Devices\CrossCore Embedded Studio 2.9.3\ARM\arm-none-eabi\arm-none-eabi\include\adi\cortex-a5\adi_osal.h"

I've compared these two versions and there looks like there are a lot of differences between these files, but not really, all of the differences seem to work out to be the same values.  So it doesn't really affect the project much, with one possible problem.  The adi_osal.h file on github reports the ADI_OSAL_MAJOR/MINOR_VER to be 1.2, whereas the file on my hard drive reports this version as 2.0.  So it looks like github has a stale version, or maybe shouldn't exist at all.  And thus, the example projects will need all of their virtual references to this file removed.

  • +1
    •  Analog Employees 
    on Nov 30, 2020 3:25 PM 2 months ago


    the version of the adi_osal.h that is in the FreeRTOS repository is a mistake, it should have been removed as part of the 1.4.0 release from ADI.

    The 1.4.0 release of FreeRTOS contained some cleanup of code for adi_osal. Specifically it's not good practice to have two header files with the same name (There's the version of adi_osal.h in CCES and the version that was previously in the FreeRTOS product).

    We changed the system so that the only version of adi_osal.h was the version provided in CrossCore Embedded Studio. The version in the FreeRTOS product was renamed adi_osal_freertos.h

    If the CCES version of adi_osal.h is included in your project and the preprocessor macro __ADI_FREERTOS is defined this will ensure that the new file adi_osal_freertos.h is included.

    So, I would recommend checking your project pre-processor macros to ensure that __ADI_FREERTOS is defined in your compilation and link stages. This should resolve any issues you have.



  • Thanks for your reply.  I didn't run into any problems with this, just the confusion about the yellow mark on the virtual directory entry. I'll be sure not to add this link when setting up my own FreeRTOS projects.