3 Replies Latest reply on Dec 10, 2014 9:14 AM by BobLoblaw

    atomic.h library support


      I'm trying to use a library which depends on atomic.h (Radiohead).


      I have copied the library into:



      I receive an error on compile about unable to find:

      #include <util/atomic.h>


      I do see that atomic.h is included in multiple folders under arduino-1.5.3-Intel.1.0.4\hardware\tools.  I don't quite understand how the emulation works and if I can use the libraries and how.


      Could someone explain to me if this is possible.  If so, how?


      Thanks much

        • 1. Re: atomic.h library support

          You probably would need to use "Import Library ... -> Add Library ..." within Arduino IDE in order to make the compiler aware of your addition.

          I guess following isn't recommended - still you might add it to hardware\tools\edison\sysroots\core2-32-poky-linux\usr\include where the compiler should find it out of the box


          Have a look at the compile output in IDE console

          • 2. Re: atomic.h library support

            However, that said - util/atomic.h wouldn't work out of the box as it's AVR hw related

            • 3. Re: atomic.h library support

              Do you  know if there is a verson of atomic.h that does work?


              I see there are other copies of atomic.h.  I'm not entirely sure how this directory structure works and which one corresponds to util/atomic.h.


              For example, i see a copy here:



              As well as here:



              Is it possible that one of these may work?  What path would I use to include these?