From f10595f98feaa3ae023ad058536da46c33569d08 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 8 Jul 2012 14:50:43 +0000 Subject: Add a generic GCC stdarg.h header file git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4919 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/Documentation/NuttxPortingGuide.html | 70 +++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 6 deletions(-) (limited to 'nuttx/Documentation') diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index d73fafbfef..d3689da49f 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/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: -- cgit v1.2.3