From 99aa8de1c68d0c650caf4ddc8671a030f2ea77e1 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 8 Jul 2012 14:50:43 +0000 Subject: [PATCH] Add a generic GCC stdarg.h header file git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4919 42af7a65-404d-4744-a932-0658087f49c3 --- Documentation/NuttxPortingGuide.html | 70 +++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 6 deletions(-) diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index d73fafbfef2..d3689da49fd 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@

NuttX RTOS Porting Guide

-

Last Updated: June 19, 2012

+

Last Updated: July 8, 2012

@@ -837,7 +837,7 @@ The port supports serial, timer0, spi, and usb. -
  • configs/mirtoo/code>: +
  • configs/mirtoo: This is the port to the DTX1-4000L "Mirtoo" module. This module uses MicroChipPIC32MX250F128D. See the Dimitech website for further information. @@ -4330,11 +4330,69 @@ build

  • - The architecture may provide custom versions of certain standard header files: +

    + The architecture may provide custom versions of certain standard header files: +

    +
      +
    • CONFIG_ARCH_STDBOOL_H. +

      + The stdbool.h header file can be found at nuttx/include/stdbool.h. + However, that header includes logic to redirect the inclusion of an architecture specific header file like: +

      +
        +#ifdef CONFIG_ARCH_STDBOOL_H
        +#  include <arch/stdbool.h>
        +#else
        +...
        +#endif
        +      
      +

      + Recall that that include path, include/arch, is a symbolic link and will refer to a version of stdbool.h at nuttx/arch/<architecture>/include/stdbool.h. +

      +
    • +
    • CONFIG_ARCH_STDINT_H. +

      + Similar logic exists for the stdint.h header file can also be found at nuttx/include/stdint.h. +

        +#ifdef CONFIG_ARCH_STDBOOL_H
        +#  include <arch/stdinit.h>
        +#else
        +...
        +#endif
        +        
      +

      +
    • +
    • CONFIG_ARCH_MATH_H. +

      + There is also a re-directing version of math.h in the source tree. However, it resides out-of-the-way at include/nuttx/math.h because it conflicts too often with the system math.h. + If CONFIG_ARCH_MATH_H=y is defined, however, the top-level makefile will copy the redirecting math.h header file from include/nuttx/math.h to include/math.h. + math.h will then include the architecture-specific version of math.h that you must provide at nuttx/arch/<architecture>/include/math.h. +

      +
        +#ifdef CONFIG_ARCH_MATH_H
        +#  include <arch/math.h>
        +#endif
        +      
      +

      + So for the architectures that define CONFIG_ARCH_MATH_H=y, include/math.h will be the redirecting math.h header file; for the architectures that don't select CONFIG_ARCH_MATH_H, the redirecting math.h header file will stay out-of-the-way in include/nuttx/. +

      +
    • +
    • CONFIG_ARCH_STDARG_H. +

      + There is also a redirecting version of stdarg.h in the source tree as well. + It also resides out-of-the-way at include/nuttx/stdarg.h. + This is because you should normally use your toolchain's stdarg.h file. + But sometimes, your toolchain's stdarg.h file may have other header file dependencies and so may not be usable in the NuttX build environment. + In those cases, you may have to create a architecture-specific stdarg.h header file at nuttx/arch/<architecture>/include/stdarg.h +

      +

      + If CONFIG_ARCH_STDARG_H=y is defined, the top-level makefile will copy the re-directing stdarg.h header file from include/nuttx/stdarg.h to include/stdarg.h. + So for the architectures that cannot use their toolchain's stdarg.h file, they can use this alternative by defining CONFIG_ARCH_STDARG_H=y and providing. + If CONFIG_ARCH_STDARG_H, is not defined, then the stdarg.h header file will stay out-of-the-way in include/nuttx/. +

      +
    • +
  • -
  • CONFIG_ARCH_ROMGETC: