On Tue, Feb 22, 2022 at 2:14 PM Gregory Nutt <spudan...@gmail.com> wrote:

> One option would be to define __NUTTX_ in tools/Config.mk instead of in
> each individual apps/Makefile.  That would provide a single point
> definition coordinate all usage.


Just one (possible) correction: IIRC it is capitalized as __NuttX__. All my
cross platform applications look for __NuttX__ to detect that they are
being built this way. The buildroot toolchain does define that, though I am
*not* using the buildroot toolchain and it is somehow defined anyway. I am
away from my computer at the moment so I cannot check where it is coming
from, but from memory I think we added something to the NuttX build scripts
some time ago (maybe about 1 or 2 years ago) to cause that to be defined
with all compilers. (Or perhaps I remember wrong and I added it to our
in-house boards' Make.defs.)

Nathan

Reply via email to