New Kconfig convention: Extra indentation in comments will render as HTML preformatted text

This commit is contained in:
Gregory Nutt
2013-04-22 09:10:58 -06:00
parent c23ad7963f
commit b553609351
9 changed files with 122 additions and 97 deletions
+21 -27
View File
@@ -97,34 +97,32 @@ config APPS_DIR
directory and the NuttX directory each in separate directory directory and the NuttX directory each in separate directory
trees like this: trees like this:
<pre> build
build |-nuttx
|-nuttx | |
| | | `- Makefile
| `- Makefile `-application
`-application |
| `- Makefile
`- Makefile
</pre>
Then you would set CONFIG_APPS_DIR=../application. Then you would set CONFIG_APPS_DIR=../application.
The application direction must contain Makefile and this make The application direction must contain Makefile and this make
file must support the following targets: file must support the following targets:
libapps$(LIBEXT) (usually libapps.a). libapps.a is a static 1)libapps$(LIBEXT) (usually libapps.a). libapps.a is a static
library ( an archive) that contains all of application object library ( an archive) that contains all of application object
files. files.
clean. Do whatever is appropriate to clean the application 2)clean. Do whatever is appropriate to clean the application
directories for a fresh build. directories for a fresh build.
distclean. Clean everthing -- auto-generated files, symbolic 3)distclean. Clean everthing -- auto-generated files, symbolic
links etc. -- so that the directory contents are the same as links etc. -- so that the directory contents are the same as
the contents in your configuration management system. the contents in your configuration management system.
This is only done when you change the NuttX configuration. This is only done when you change the NuttX configuration.
depend. Make or update the application build dependencies. 4)depend. Make or update the application build dependencies.
When this application is invoked it will receive the setting TOPDIR like: When this application is invoked it will receive the setting TOPDIR like:
@@ -240,13 +238,11 @@ config ARCH_STDBOOL_H
However, that header includes logic to redirect the inclusion of an However, that header includes logic to redirect the inclusion of an
architecture specific header file like: architecture specific header file like:
<pre> #ifdef CONFIG_ARCH_STDBOOL_H
#ifdef CONFIG_ARCH_STDBOOL_H # include <arch/stdbool.h>
# include <arch/stdbool.h> #else
#else ...
... #endif
#endif
</pre>
Recall that that include path, include/arch, is a symbolic link and 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. will refer to a version of stdbool.h at nuttx/arch/<architecture>/include/stdbool.h.
@@ -259,15 +255,13 @@ config ARCH_MATH_H
However, it resides out-of-the-way at include/nuttx/math.h because it However, it resides out-of-the-way at include/nuttx/math.h because it
conflicts too often with the system math.h. If ARCH_MATH_H=y is conflicts too often with the system math.h. If ARCH_MATH_H=y is
defined, however, the top-level makefile will copy the redirecting 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 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 will then include the architecture-specific version of math.h that you
must provide at nuttx/arch/>architecture</include/math.h. must provide at nuttx/arch/>architecture</include/math.h.
<pre> #ifdef CONFIG_ARCH_MATH_H
#ifdef CONFIG_ARCH_MATH_H # include <arch/math.h>
# include <arch/math.h> #endif
#endif
</pre>
So for the architectures that define ARCH_MATH_H=y, include/math.h So for the architectures that define ARCH_MATH_H=y, include/math.h
will be the redirecting math.h header file; for the architectures will be the redirecting math.h header file; for the architectures
@@ -282,7 +276,7 @@ config ARCH_FLOAT_H
point implementation. It would always be best to use your point implementation. It would always be best to use your
toolchain's float.h header file but if none is avaiable, a default toolchain's float.h header file but if none is avaiable, a default
float.h header file will provided if this option is selected. However float.h header file will provided if this option is selected. However
there is no assurance that the settings in this float.h are actually there is no assurance that the settings in this float.h are actually
correct for your platform! correct for your platform!
config ARCH_STDARG_H config ARCH_STDARG_H
+1 -1
View File
@@ -188,7 +188,7 @@ config ARMV7M_USEBASEPRI
depends on ARCH_CORTEXM3 || ARCH_CORTEXM4 depends on ARCH_CORTEXM3 || ARCH_CORTEXM4
---help--- ---help---
Use the BASEPRI register to enable and disable able interrupts. By Use the BASEPRI register to enable and disable able interrupts. By
default, the PRIMASK register is used for this purpose. This default, the PRIMASK register is used for this purpose. This
usually results in hardfaults that are properly handling by the usually results in hardfaults that are properly handling by the
RTOS. Using the BASEPRI register will avoid these hardfault. RTOS. Using the BASEPRI register will avoid these hardfault.
That is needed primarily for integration with some toolchains. That is needed primarily for integration with some toolchains.
+1 -1
View File
@@ -540,7 +540,7 @@ config SDIO_WIDTH_D1_ONLY
---help--- ---help---
Select 1-bit transfer mode. This may be selected to force the driver Select 1-bit transfer mode. This may be selected to force the driver
operate with only a single data line (the default is to use all operate with only a single data line (the default is to use all
4 SD data lines).Default: 4-bit transfer mode. 4 SD data lines).Default: 4-bit transfer mode.
endmenu endmenu
+4 -4
View File
@@ -1076,8 +1076,8 @@ config PIC32MX_FETHIO
---help--- ---help---
Ethernet I/O Pin Selection bit: Ethernet I/O Pin Selection bit:
1 = Default Ethernet I/O Pins 1 = Default Ethernet I/O Pins
0 = Alternate Ethernet I/O Pins 0 = Alternate Ethernet I/O Pins
config PIC32MX_FMIIEN config PIC32MX_FMIIEN
int "Ethernet MII" int "Ethernet MII"
@@ -1085,8 +1085,8 @@ config PIC32MX_FMIIEN
---help--- ---help---
Ethernet MII Enable bit Ethernet MII Enable bit
1 = MII enabled 1 = MII enabled
0 = RMII enabled 0 = RMII enabled
endmenu endmenu
+34 -34
View File
@@ -55,26 +55,26 @@ config Z180_BANKAREA_VIRTBASE
NuttX Memory Organization: NuttX Memory Organization:
Common Area 0: This area holds the common NuttX code that is Common Area 0: This area holds the common NuttX code that is
directly call-able from all application threads. Common Area directly call-able from all application threads. Common Area
always starts at virtual address 0x0000 and extends to the always starts at virtual address 0x0000 and extends to the
Bank Area Bank Area
Base Area: This area holds the common NuttX data (including the Base Area: This area holds the common NuttX data (including the
share-able heap) that is accessible from all applications and share-able heap) that is accessible from all applications and
extends to Common Area 1. extends to Common Area 1.
NOTE: That is execution from RAM, the common NuttX code and NOTE: That is execution from RAM, the common NuttX code and
data may be contiguous and lie in the same region (either data may be contiguous and lie in the same region (either
Common Area 0 or the Bank Area). The two regions above would Common Area 0 or the Bank Area). The two regions above would
apply in a ROM'ed system, where Common Area 1 is ROM and the apply in a ROM'ed system, where Common Area 1 is ROM and the
Base Area is RAM. Base Area is RAM.
Common Area 1: This area holds the code and data that is unique Common Area 1: This area holds the code and data that is unique
to a particular task. his area extends to the end of the virtual to a particular task. his area extends to the end of the virtual
address space. All tasks share the same virtual Common Area 2 address space. All tasks share the same virtual Common Area 2
virtual address (but each has a unique mapping to different, virtual address (but each has a unique mapping to different,
underlying physical addresses). underlying physical addresses).
config Z180_BANKAREA_PHYSBASE config Z180_BANKAREA_PHYSBASE
hex "Physical Start of Bank Area" hex "Physical Start of Bank Area"
@@ -93,26 +93,26 @@ config Z180_COMMON1AREA_VIRTBASE
NuttX Memory Organization: NuttX Memory Organization:
Common Area 0: This area holds the common NuttX code that is Common Area 0: This area holds the common NuttX code that is
directly call-able from all application threads. Common Area directly call-able from all application threads. Common Area
always starts at virtual address 0x0000 and extends to the always starts at virtual address 0x0000 and extends to the
Bank Area Bank Area
Base Area: This area holds the common NuttX data (including the Base Area: This area holds the common NuttX data (including the
share-able heap) that is accessible from all applications and share-able heap) that is accessible from all applications and
extends to Common Area 1. extends to Common Area 1.
NOTE: That is execution from RAM, the common NuttX code and NOTE: That is execution from RAM, the common NuttX code and
data may be contiguous and lie in the same region (either data may be contiguous and lie in the same region (either
Common Area 0 or the Bank Area). The two regions above would Common Area 0 or the Bank Area). The two regions above would
apply in a ROM'ed system, where Common Area 1 is ROM and the apply in a ROM'ed system, where Common Area 1 is ROM and the
Base Area is RAM. Base Area is RAM.
Common Area 1: This area holds the code and data that is unique Common Area 1: This area holds the code and data that is unique
to a particular task. his area extends to the end of the virtual to a particular task. his area extends to the end of the virtual
address space. All tasks share the same virtual Common Area 2 address space. All tasks share the same virtual Common Area 2
virtual address (but each has a unique mapping to different, virtual address (but each has a unique mapping to different,
underlying physical addresses). underlying physical addresses).
config Z180_PHYSHEAP_START config Z180_PHYSHEAP_START
hex "Physical Start of Free Memory" hex "Physical Start of Free Memory"
+2 -2
View File
@@ -288,12 +288,12 @@ config ARCH_BOARD_NTOSD_DM320
This port uses the Neuros OSD v1.0 Dev Board with a GNU arm-nuttx-elf This port uses the Neuros OSD v1.0 Dev Board with a GNU arm-nuttx-elf
toolchain*: see toolchain*: see
http://wiki.neurostechnology.com/index.php/OSD_1.0_Developer_Home http://wiki.neurostechnology.com/index.php/OSD_1.0_Developer_Home
There are some differences between the Dev Board and the currently There are some differences between the Dev Board and the currently
available commercial v1.0 Boards. See available commercial v1.0 Boards. See
http://wiki.neurostechnology.com/index.php/OSD_Developer_Board_v1 http://wiki.neurostechnology.com/index.php/OSD_Developer_Board_v1
NuttX operates on the ARM9EJS of this dual core processor. NuttX operates on the ARM9EJS of this dual core processor.
STATUS: This port is code complete, verified, and included in the STATUS: This port is code complete, verified, and included in the
+1 -1
View File
@@ -18,7 +18,7 @@ config LIBM
Another possibility is that you have a custom, architecture-specific math Another possibility is that you have a custom, architecture-specific math
libary and that the corresponding math.h file resides at arch/<architecture>/include/math.h. libary and that the corresponding math.h file resides at arch/<architecture>/include/math.h.
The option is selected via ARCH_MATH_H. If ARCH_MATH_H is selected,then the include/nuttx/math.h The option is selected via ARCH_MATH_H. If ARCH_MATH_H is selected,then the include/nuttx/math.h
header file will be copied to include/math.h where it can be used by your applications. header file will be copied to include/math.h where it can be used by your applications.
If ARCH_MATH_H is not defined, then this option can be selected to build a generic, If ARCH_MATH_H is not defined, then this option can be selected to build a generic,
math library built into NuttX. This math library comes from the Rhombus OS and math library built into NuttX. This math library comes from the Rhombus OS and
+21 -22
View File
@@ -11,15 +11,15 @@ config BOARD_INITIALIZE
custom initialization logic: custom initialization logic:
1) <arch>_boardinitialize(): This function is used only for 1) <arch>_boardinitialize(): This function is used only for
initialize of very low-level things like configuration of initialize of very low-level things like configuration of
GPIO pins, power setting. The OS has not been initialized GPIO pins, power setting. The OS has not been initialized
at this point, so you cannot allocate memory or initialize at this point, so you cannot allocate memory or initialize
device drivers at this phase. device drivers at this phase.
2) The next level of initialization is performed by a call to 2) The next level of initialization is performed by a call to
up_initialize() (in arch/<arch>/src/common/up_initialize.c). up_initialize() (in arch/<arch>/src/common/up_initialize.c).
The OS has been initialized at this point and it is okay to The OS has been initialized at this point and it is okay to
initialize drivers in this phase. initialize drivers in this phase.
3) And, finally, when the user application code starts. 3) And, finally, when the user application code starts.
@@ -88,8 +88,8 @@ config SCHED_CHILD_STATUS
Without this setting, wait(), waitpid() or waitid() may fail. For Without this setting, wait(), waitpid() or waitid() may fail. For
example, if you do: example, if you do:
1) Start child task 1) Start child task
2) Wait for exit status (using wait(), waitpid(), or waitid()). 2) Wait for exit status (using wait(), waitpid(), or waitid()).
This can fail because the child task may run to completion before This can fail because the child task may run to completion before
the wait begins. There is a non-standard work-around in this case: the wait begins. There is a non-standard work-around in this case:
@@ -317,19 +317,19 @@ config DISABLE_OS_API
bool "Disable NuttX interfaces" bool "Disable NuttX interfaces"
default y default y
---help--- ---help---
The following can be used to disable categories of The following can be used to disable categories of
APIs supported by the OS. If the compiler supports APIs supported by the OS. If the compiler supports
weak functions, then it should not be necessary to weak functions, then it should not be necessary to
disable functions unless you want to restrict usage disable functions unless you want to restrict usage
of those APIs. of those APIs.
There are certain dependency relationships in these There are certain dependency relationships in these
features. features.
o mq_notify logic depends on signals to awaken tasks 1) mq_notify logic depends on signals to awaken tasks
waiting for queues to become full or empty. waiting for queues to become full or empty.
o pthread_condtimedwait() depends on signals to wake 2) pthread_condtimedwait() depends on signals to wake
up waiting tasks. up waiting tasks.
config DISABLE_CLOCK config DISABLE_CLOCK
bool "Disable clock interfaces" bool "Disable clock interfaces"
@@ -478,7 +478,7 @@ config PREALLOC_WDOGS
---help--- ---help---
The number of pre-allocated watchdog structures. The system manages a The number of pre-allocated watchdog structures. The system manages a
pool of preallocated watchdog structures to minimize dynamic allocations pool of preallocated watchdog structures to minimize dynamic allocations
config PREALLOC_TIMERS config PREALLOC_TIMERS
int "Number of pre-allocated POSIX timers" int "Number of pre-allocated POSIX timers"
default 8 default 8
@@ -516,4 +516,3 @@ config PTHREAD_STACK_DEFAULT
default 2048 default 2048
---help--- ---help---
Default pthread stack size Default pthread stack size
+37 -5
View File
@@ -1100,10 +1100,13 @@ static inline void process_help(FILE *stream)
bool blank; bool blank;
bool done; bool done;
bool newpara; bool newpara;
bool preformatted;
/* Read each comment line */ /* Read each comment line */
newpara = true; newpara = true;
preformatted = false;
for (;;) for (;;)
{ {
/* Read the next line of comment text */ /* Read the next line of comment text */
@@ -1165,7 +1168,7 @@ static inline void process_help(FILE *stream)
if (!newpara) if (!newpara)
{ {
body("</p>\n"); body("\n</p>\n");
newpara = true; newpara = true;
} }
@@ -1193,16 +1196,45 @@ static inline void process_help(FILE *stream)
if (newpara) if (newpara)
{ {
body("</p>\n"); body("<p>\n");
newpara = false; newpara = false;
} }
body(" %s", htmlize_text(ptr)); /* Lines that are indented at greater levels are assumed to be
* pre-formatted text. This is not part of the Kconfig language but
* rather simply a NuttX Kconfig convention.
*/
if (indent > help_indent)
{
if (!preformatted)
{
body("\n <ul><pre>\n");
preformatted = true;
}
body("%s\n", htmlize_text(ptr));
}
else
{
if (preformatted)
{
body("</pre></ul>\n");
preformatted = false;
}
body(" %s", htmlize_text(ptr));
}
} }
if (!newpara) if (!newpara)
{ {
body("</p>\n"); body("\n</p>\n");
}
if (preformatted)
{
body("</pre></ul>\n");
} }
} }
@@ -1761,7 +1793,7 @@ static inline char *process_choice(FILE *stream, const char *kconfigdir)
const char *paranum; const char *paranum;
char *token = NULL; char *token = NULL;
char *ptr; char *ptr;
bool help; bool help = false;
int i; int i;
/* Get the choice information */ /* Get the choice information */