Newer
Older
Each MTD device driver must implement an instance of <code>struct mtd_dev_s</code>.
That structure defines a call table with the following methods:
<p>
Erase the specified erase blocks (units are erase blocks):
</p>
<ul>
<p><code>int (*erase)(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks);</code></p>
</ul>
<p>
Read/write from the specified read/write blocks:
</p?
<ul>
patacongo
committed
<p><code>ssize_t (*bread)(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks, FAR uint8_t *buffer);</code><br>
<code>ssize_t (*bwrite)(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks, FAR const uint8_t *buffer);</code></p>
</ul>
<p>
Some devices may support byte oriented reads (optional).
Most MTD devices are inherently block oriented so byte-oriented writing is not supported.
It is recommended that low-level drivers not support read() if it requires buffering.
</p>
<ul>
patacongo
committed
<p><code>ssize_t (*read)(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, FAR uint8_t *buffer);</code></p>
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
</ul>
<p>
Support other, less frequently used commands:
</p>
<ul>
<li><code>MTDIOC_GEOMETRY</code>: Get MTD geometry</li>
<li><code>MTDIOC_XIPBASE:</code>: Convert block to physical address for eXecute-In-Place</li>
<li><code>MTDIOC_BULKERASE</code>: Erase the entire device</li>
</ul>
<p>
is provided via a sinble <code>ioctl</code> method (see <code>include/nuttx/ioctl.h</code>):
</p>
<ul>
<p><code>int (*ioctl)(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg);</code></p>
</ul>
</li>
<li>
<b>Binding MTD Drivers</b>.
MTD drivers are not normally directly accessed by user code, but are usually bound to another,
higher level device driver.
In general, the binding sequence is:
<ul>
<li>Get an instance of <code>struct mtd_dev_s</code> from the hardware-specific MTD device driver, and </li>
<li>Provide that instance to the initialization method of the higher level device driver.</li>
</ul>
</li>
<li>
<b>Examples</b>:
<code>drivers/mtd/m25px.c</code> and <code>drivers/mtd/ftl.c</code>
</li>
</ul>
<h3><a name="sdiodrivers">6.3.7 SDIO Device Drivers</a></h3>
<ul>
<li>
<b><code>include/nuttx/sdio.h</code></b>.
All structures and APIs needed to work with serial drivers are provided in this header file.
</li>
<li>
<b><code>struct sdio_dev_s</code></b>.
Each MTD device driver must implement an instance of <code>struct sdio_dev_s</code>.
That structure defines a call table with the following methods:
<p>
Initialization/setup:
</p>
<ul>
<p><code>void (*reset)(FAR struct sdio_dev_s *dev);</code><br>
patacongo
committed
<code>uint8_t (*status)(FAR struct sdio_dev_s *dev);</code><br>
<code>void (*widebus)(FAR struct sdio_dev_s *dev, bool enable);</code><br>
<code>void (*clock)(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate);</code><br>
<code>int (*attach)(FAR struct sdio_dev_s *dev);</code></p>
</ul>
<p>
Command/Status/Data Transfer:
</p?
<ul>
patacongo
committed
<p><code>void (*sendcmd)(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t arg);</code><br>
<code>int (*recvsetup)(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, size_t nbytes);</code><br>
<code>int (*sendsetup)(FAR struct sdio_dev_s *dev, FAR const uint8_t *buffer, size_t nbytes);</code><br>
<code>int (*cancel)(FAR struct sdio_dev_s *dev);</code><br>
patacongo
committed
<code>int (*waitresponse)(FAR struct sdio_dev_s *dev, uint32_t cmd);</code><br>
<code>int (*recvR1)(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *R1);</code><br>
<code>int (*recvR2)(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t R2[4]);</code><br>
<code>int (*recvR3)(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *R3);</code><br>
<code>int (*recvR4)(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *R4);</code><br>
<code>int (*recvR5)(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *R5);</code><br>
<code>int (*recvR6)(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *R6);</code><br>
<code>int (*recvR7)(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *R7);</code></p>
</ul>
<p>
Event/Callback support:
</p>
<ul>
<p><code>void (*waitenable)(FAR struct sdio_dev_s *dev, sdio_eventset_t eventset);</code><br>
patacongo
committed
<code>sdio_eventset_t (*eventwait)(FAR struct sdio_dev_s *dev, uint32_t timeout);</code><br>
<code>void (*callbackenable)(FAR struct sdio_dev_s *dev, sdio_eventset_t eventset);</code><br>
<code>int (*registercallback)(FAR struct sdio_dev_s *dev, worker_t callback, void *arg);</code></p>
</ul>
<p>
DMA support:
</p>
<ul>
patacongo
committed
<p><code>bool (*dmasupported)(FAR struct sdio_dev_s *dev);</code><br>
<code>int (*dmarecvsetup)(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, size_t buflen);</code><br>
<code>int (*dmasendsetup)(FAR struct sdio_dev_s *dev, FAR const uint8_t *buffer, size_t buflen);</code></p>
</ul>
</li>
<li>
<b>Binding SDIO Drivers</b>.
SDIO drivers are not normally directly accessed by user code, but are usually bound to another,
higher level device driver.
In general, the binding sequence is:
<ul>
<li>Get an instance of <code>struct sdio_dev_s</code> from the hardware-specific SDIO device driver, and </li>
<li>Provide that instance to the initialization method of the higher level device driver.</li>
</ul>
</li>
<li>
<b>Examples</b>:
<code>arch/arm/src/stm32/stm32_sdio.c</code> and <code>drivers/mmcsd/mmcsd_sdio.c</code>
</li>
</ul>
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
<h1><a name="apndxconfigs">Appendix A: NuttX Configuration Settings</a></h1>
</td>
</tr>
</table>
<p>
The following variables are recognized by the build (you may
also include architecture-specific settings).
</p>
<h2>Architecture selection</h2>
The following configuration items select the architecture, chip, and
board configuration for the build.
</p>
<li><code>CONFIG_ARCH</code>:
Identifies the arch subdirectory</li>
<li><code>CONFIG_ARCH_name</code>:
For use in C code</li>
<li><code>CONFIG_ARCH_CHIP</code>:
Identifies the arch/*/chip subdirectory</li>
<li><code>CONFIG_ARCH_CHIP_name</code>:
For use in C code</li>
<li><code>CONFIG_ARCH_BOARD</code>:
Identifies the configs subdirectory and hence, the board that supports
the particular chip or SoC.</li>
<li><code>CONFIG_ARCH_BOARD_name</code>:
For use in C code</li>
<li><code>CONFIG_ENDIAN_BIG</code>:
Define if big endian (default is little endian).</li>
<li><code>CONFIG_ARCH_NOINTC</code>:
Define if the architecture does not support an interrupt controller
or otherwise cannot support APIs like up_enable_irq() and up_disable_irq().</li>
<li><code>CONFIG_ARCH_IRQPRIO</code>:
Define if the architecture supports prioritization of interrupts and the
up_prioritize_irq() API.</li>
Some architectures require a description of the RAM configuration:
</p>
<ul>
<li><code>CONFIG_DRAM_SIZE</code>:
Describes the installed DRAM.</li>
<li><code>CONFIG_DRAM_START</code>:
The start address of DRAM (physical)</li>
<li><code>CONFIG_DRAM_VSTART</code>:
The start address of DRAM (virtual)</li>
<p>
General build options:
</p>
<ul>
<li><code>CONFIG_RRLOAD_BINARY</code>:
Make the rrload binary format used with BSPs from <a href="www.ridgerun.com">ridgerun.com</a>
using the <code>tools/mkimage.sh</code> script.
</li>
<li><code>CONFIG_INTELHEX_BINARY</code>:
Make the Intel HEX binary format used with many different loaders using the GNU objcopy program
This option should not be selected if you are not using the GNU toolchain.
<li><code>CONFIG_MOTOROLA_SREC</code>:
Make the Motorola S-Record binary format used with many different loaders using the GNU objcopy program
Should not be selected if you are not using the GNU toolchain.
</li>
Make a raw binary format file used with many different loaders using the GNU objcopy program.
This option should not be selected if you are not using the GNU toolchain.
</li>
Toolchain supports libm.a
</li>
<li><code>CONFIG_HAVE_CXX</code>:
Toolchain supports C++ and <code>CXX</code>, <code>CXXFLAGS</code>, and <code>COMPILEXX</code>
have been defined in the configurations <code>Make.defs</code> file.
<p>
Building application code:
</p>
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
<p>
<code>CONFIG_APP_DIR</code>: Ldentifies the directory that builds the application to link with NuttX.
This symbol must be assigned to the path to the application build directory <i>relative</i> to the NuttX top build direcory.
As an an example, there are several example applicatins in the NuttX <code>examples/</code> sub-directory.
To use one of these example applications, say <code>nsh</code>, you would set <code>CONFIG_APP_DIR=examples/nsh</code>.
If you had an application directory and the NuttX directory both within another directory like this:
<ul><pre>
build
|-nuttx
| |
| `- Makefile
`-application
|
`- Makefile
</pre></ul>
Then you would set <code>CONFIG_APP_DIR=../application</code>.
</p>
<p>
The application direction must contain <code>Makefile</code> and this make file must support the following targets:
<ul>
<li>
<code>libapp$(LIBEXT)</code> (usually <code>libapp.a</code>).
<code>libapp.a</code> is a static library ( an archive) that contains all of application object files.
</li>
<li>
<code>clean</code>.
Do whatever is appropriate to clean the application directories for a fresh build.
</li>
<li>
<code>distclean</code>.
Clean everthing -- auto-generated files, symbolic links etc. -- so that the directory contents are the same as the contents in your configuration management system.
This is only done when you change the NuttX configuration.
</li>
<li>
<code>depend</code>.
Make or update the application build dependencies.
</li>
</ul>
</p>
<p>
When this application is invoked it will receive the setting <code>TOPDIR</code> like:
<ul>
<code>$(MAKE) -C $(CONFIG_APP_DIR) TOPDIR="$(TOPDIR)"</code> <target>
</ul>
</p>
<p>
<code>TOPDIR</code> is the full path to the NuttX directory.
It can be used, for example, to include makefile fragments (e.g., <code>.config</code> or <code>Make.defs</code>) or to set up include file paths.
</p>
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
</ul>
<p>
Two-pass Build Options.
If the 2 pass build option is selected, then these options configure the make system build a extra link object.
This link object is assumed to be an incremental (relative) link object, but could be a static library (archive)
(some modification to this Makefile would be required if CONFIG_PASS1_OBJECT is an archive).
Pass 1 1ncremental (relative) link objects should be put into the processor-specific source directory
where other link objects will be created - ff the pass1 obect is an archive, it could go anywhere.
</p>
<ul>
<li>
<code>CONFIG_BUILD_2PASS</code>:
Enables the two pass build options.
</li>
</ul>
<p>
When the two pass build option is enabled, the following also apply:
</p>
<ul>
<li>
<code>CONFIG_PASS1_OBJECT</code>: The name of the first pass object.
</li>
<li><code>CONFIG_PASS1_BUILDIR</code>:
The path, relative to the top NuttX build directory to directory that contains the Makefile to build the first pass object.
The Makefile must support the following targets:
<ul>
<li>The special target <code>arch/$(CONFIG_ARCH)/src/$(CONFIG_PASS1_OBJECT)</code>, and</li>
<li>The usual depend, clean, and distclean targets.</li>
</ul>
</ul>
<h2>General OS setup</h2>
<li>
<code>CONFIG_DEBUG</code>: enables built-in debug options
</li>
<li>
<code>CONFIG_DEBUG_VERBOSE</code>: enables verbose debug output
</li>
<li>
<code>CONFIG_DEBUG_SYMBOLS</code>: build without optimization and with debug symbols (needed for use with a debugger).
</li>
<li>
<code>CONFIG_DEBUG_SCHED</code>: enable OS debug output (disabled by default)
</li>
<li>
<code>CONFIG_DEBUG_MM</code>: enable memory management debug output (disabled by default)
<code>CONFIG_DEBUG_NET</code>: enable network debug output (disabled by default)
<li>
<code>CONFIG_DEBUG_USB</code>: enable USB debug output (disabled by default)
</li>
<code>CONFIG_DEBUG_FS</code>: enable file system debug output (disabled by default)
</li>
<li>
<code>CONFIG_DEBUG_LIB</code>: enable C library debug output (disabled by default)
<li>
<code>CONFIG_DEBUG_BINFMT</code>: enable binary loader debug output (disabled by default)
</li>
<li>
<code>CONFIG_DEBUG_GRAPHICS</code>: enable NX graphics debug output (disabled by default)
</li>
<code>CONFIG_ARCH_LOWPUTC</code>: architecture supports low-level, boot
time console output
</li>
<li>
<code>CONFIG_MM_REGIONS</code>: If the architecture includes multiple
regions of memory to allocate from, this specifies the
number of memory regions that the memory manager must
handle and enables the API mm_addregion(start, end);
</li>
<li>
<code>CONFIG_TICKS_PER_MSEC</code>: The default system timer is 100Hz
or <code>TICKS_PER_MSEC</code>=10. This setting may be defined to inform NuttX
that the processor hardware is providing system timer interrupts at some interrupt
interval other than 10 msec.
</li>
<code>CONFIG_RR_INTERVAL</code>: The round robin time slice will be set
this number of milliseconds; Round robin scheduling can
be disabled by setting this value to zero.
</li>
<li>
<code>CONFIG_SCHED_INSTRUMENTATION</code>: enables instrumentation in
scheduler to monitor system performance
</li>
<li>
<code>CONFIG_TASK_NAME_SIZE</code>: Specifies that maximum size of a
task name to save in the TCB. Useful if scheduler
instrumentation is selected. Set to zero to disable.
</li>
<li>
<code>CONFIG_START_YEAR</code>, <code>CONFIG_START_MONTH</code>, <code>CONFIG_START_DAY</code> -
<code>CONFIG_GREGORIAN_TIME</code>: Enables Gregorian time conversions.
You would only need this if you are concerned about accurate time conversions in
the recent past or in the distant future.
</li>
<li>
<code>CONFIG_JULIAN_TIME</code>: Enables Julian time conversions.
You would only need this if you are concerned about accurate time conversion in the distand past.
You must also define <code>CONFIG_GREGORIAN_TIME</code> in order to use Julian time.
</li>
<li>
<code>CONFIG_DEV_CONSOLE</code>: Set if architecture-specific logic
provides /dev/console. Enables stdout, stderr, stdin.
</li>
<code>CONFIG_MUTEX_TYPES</code>: Set to enable support for recursive and
errorcheck mutexes. Enables <code>pthread_mutexattr_settype()</code>.
<code>CONFIG_PRIORITY_INHERITANCE</code>: Set to enable support for
priority inheritance on mutexes and semaphores.
<a href="NuttxUserGuide.html#priorityinversion"><i>priority inversion</i></a>.
Details of the NuttX implementation of priority inheritance is
discussed <a href="NuttxUserGuide.html#priorityinheritance">elsewhere</a>.
<code>CONFIG_SEM_PREALLOCHOLDERS</code>: This setting is only used
if priority inheritance is enabled.
It defines the maximum number of different threads (minus one) that
can take counts on a semaphore with priority inheritance support.
This may be set to zero if priority inheritance is disabled OR if you
are only using semaphores as mutexes (only one holder) OR if no more
than two threads participate using a counting semaphore.
</li>
<code>CONFIG_SEM_NNESTPRIO</code>: If priority inheritance is enabled,
then this setting is the maximum number of higher priority threads (minus
1) than can be waiting for another thread to release a count on a semaphore.
This value may be set to zero if no more than one thread is expected to
wait for a semaphore.
</li>
<li>
<code>CONFIG_FDCLONE_DISABLE</code>: Disable cloning of all file descriptors
patacongo
committed
by task_create() when a new task is started.
If set, all files/drivers will appear to be closed in the new task.
</li>
<li>
<code>CONFIG_FDCLONE_STDIO</code>: Disable cloning of all but the first
three file descriptors (stdin, stdout, stderr) by task_create()
when a new task is started.
patacongo
committed
If set, all files/drivers will appear to be closed in the new task except
for stdin, stdout, and stderr.
</li>
<li>
<code>CONFIG_SDCLONE_DISABLE</code>: Disable cloning of all socket
desciptors by task_create() when a new task is started.
patacongo
committed
If set, all sockets will appear to be closed in the new task.
<li>
<code>CONFIG_NXFLAT</code>: Enable support for the NXFLAT binary format.
This format will support execution of NuttX binaries located
in a ROMFS filesystem (see <code>examples/nxflat</code>).
<li>
<code>CONFIG_SCHED_WORKQUEUE</code>: Create a dedicated "worker" thread to
handle delayed processing from interrupt handlers. This feature
is required for some drivers but, if there are not complaints,
can be safely disabled. The worker thread also performs
garbage collection -- completing any delayed memory deallocations
from interrupt handlers. If the worker thread is disabled,
then that clean will be performed by the IDLE thread instead
(which runs at the lowest of priority and may not be appropriate
if memory reclamation is of high priority). If CONFIG_SCHED_WORKQUEUE
is enabled, then the following options can also be used:
</li>
<li>
<code>CONFIG_SCHED_WORKPRIORITY</code>: The execution priority of the worker
thread. Default: 50
</li>
<li>
<code>CONFIG_SCHED_WORKPERIOD</code>: How often the worker thread checks for
work in units of microseconds. Default: 50*1000 (50 MS).
</li>
<li>
<code>CONFIG_SCHED_WORKSTACKSIZE</code>: The stack size allocated for the worker
thread. Default: CONFIG_IDLETHREAD_STACKSIZE.
</li>
<li>
<code>CONFIG_SIG_SIGWORK</code>: The signal number that will be used to wake-up
the worker thread. Default: 4
</li>
<p>
OS setup related to on-demand paging:
</p>
<ul>
<li>
<code>CONFIG_PAGING</code>: If set =y in your configation file, this setting will
enable the on-demand paging feature as described in
<a href="http://www.nuttx.org/NuttXDemandPaging.html">http://www.nuttx.org/NuttXDemandPaging.html</a>.
</li>
</ul>
<p>
If CONFIG_PAGING is selected, then you will probabaly need <code>CONFIG_BUILD_2PASS</code> to correctly position
the code and the following configuration options also apply:
<li>
<code>CONFIG_PAGING_PAGESIZE</code>:
The size of one managed page.
This must be a value supported by the processor's memory management unit.
</li>
<li>
<code>CONFIG_PAGING_NLOCKED</code>:
This is the number of locked pages in the memory map.
The locked address region will then be from <code>CONFIG_DRAM_VSTART</code> through
(<code>CONFIG_DRAM_VSTART</code> + <code>CONFIG_PAGING_PAGESIZE</code>*<code>CONFIG_PAGING_NLOCKED</code>)
</li>
<li>
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
<code>CONFIG_PAGING_LOCKED_PBASE</code> and <code>CONFIG_PAGING_LOCKED_VBASE</code>:
These may be defined to determine the base address of the locked page regions.
If neither are defined, the logic will be set the bases to <code>CONFIG_DRAM_START</code>
and <code>CONFIG_DRAM_VSTART</code> (i.e., it assumes that the base address of the locked
region is at the beginning of RAM).
<b>NOTE</b>:
In some architectures, it may be necessary to take some memory from the beginning
of this region for vectors or for a page table.
In such cases, <code>CONFIG_PAGING_LOCKED_P/VBASE</code> should take that into consideration
to prevent overlapping the locked memory region and the system data at the beginning of SRAM.
</li>
<li>
<code>CONFIG_PAGING_NPPAGED</code>:
This is the number of physical pages available to support the paged text region.
This paged region begins at
(<code>CONFIG_PAGING_LOCKED_PBASE</code> + <code>CONFIG_PAGING_PAGESIZE</code>*<code>CONFIG_PAGING_NPPAGED</code>)
and continues until
(<code>CONFIG_PAGING_LOCKED_PBASE</code> + <code>CONFIG_PAGING_PAGESIZE</code>*(<code>CONFIG_PAGING_NLOCKED</code> +
<code>CONFIG_PAGING_NPPAGED</code>)
</li>
<li>
<code>CONFIG_PAGING_NVPAGED</code>:
This actual size of the paged text region (in pages).
This is also the number of virtual pages required to support the entire paged region.
The on-demand paging feature is intended to support only the case where the virtual paged text
area is much larger the available physical pages.
Otherwise, why would you enable on-demand paging?
</li>
<li>
<code>CONFIG_PAGING_NDATA</code>:
This is the number of data pages in the memory map.
The data region will extend to the end of RAM unless overridden by a setting in the configuration file.
<b>NOTE</b>:
In some architectures, it may be necessary to take some memory from the end of RAM for page tables
or other system usage.
The configuration settings and linker directives must be cognizant of that:
<code>CONFIG_PAGING_NDATA</code> should be defined to prevent the data region from extending all the way to the end of memory.
<li>
<code>CONFIG_PAGING_DEFPRIO</code>:
The default, minimum priority of the page fill worker thread.
The priority of the page fill work thread will be boosted boosted dynmically so that it matches the
priority of the task on behalf of which it peforms the fill.
This defines the minimum priority that will be used. Default: 50.
<code>CONFIG_PAGING_STACKSIZE</code>:
Defines the size of the allocated stack for the page fill worker thread. Default: 1024.
</li>
<li>
<code>CONFIG_PAGING_BLOCKINGFILL</code>:
The architecture specific <code>up_fillpage()</code> function may be blocking or non-blocking.
If defined, this setting indicates that the <code>up_fillpage()</code> implementation will block until the
transfer is completed. Default: Undefined (non-blocking).
</li>
<li>
<code>CONFIG_PAGING_WORKPERIOD</code>:
The page fill worker thread will wake periodically even if there is no mapping to do.
This selection controls that wake-up period (in microseconds).
This wake-up a failsafe that will handle any cases where a single is lost (that would
really be a bug and shouldn't happen!)
and also supports timeouts for case of non-blocking, asynchronous fills (see <code>CONFIG_PAGING_TIMEOUT_TICKS</code>).
</li>
<li>
<code>CONFIG_PAGING_TIMEOUT_TICKS</code>:
If defined, the implementation will monitor the (asynchronous) page fill logic.
If the fill takes longer than this number if microseconds, then a fatal error will be declared.
Default: No timeouts monitored.
</li>
<p>
Some architecture-specific settings.
Defaults are architecture specific.
If you don't know what you are doing, it is best to leave these undefined and try the system defaults:
</p>
<li>
<code>CONFIG_PAGING_VECPPAGE</code>:
This the physical address of the page in memory to be mapped to the vector address.
</li>
<li>
<code>CONFIG_PAGING_VECL2PADDR</code>:
This is the physical address of the L2 page table entry to use for the vector mapping.
</li>
<li>
<code>CONFIG_PAGING_VECL2VADDR</code>:
This is the virtual address of the L2 page table entry to use for the vector mapping.
</li>
<li>
<code>CONFIG_PAGING_BINPATH</code>:
If <code>CONFIG_PAGING_BINPATH</code> is defined, then it is the full path to a file on a mounted file system that contains a binary image of the NuttX executable.
Pages will be filled by reading from offsets into this file that correspond to virtual fault addresses.
</li>
<li>
<code>CONFIG_PAGING_MOUNTPT</code>:
If <code>CONFIG_PAGING_BINPATH</code> is defined, additional options may be provided to control the initialization of underlying devices.
<code>CONFIG_PAGING_MOUNTPT</code> identifies the mountpoint to be used if a device is mounted.
</li>
<li>
<code>CONFIG_PAGING_MINOR</code>:
Some mount operations require a "minor" number to identify the specific device instance.
Default: 0
</li>
<li>
<code>CONFIG_PAGING_SDSLOT</code>:
If <code>CONFIG_PAGING_BINPATH</code> is defined, additional options may be provided to control the initialization of underlying devices.
<code>CONFIG_PAGING_SDSLOT</code> identifies the slot number of the SD device to initialize.
This must be undefined if SD is not being used.
This should be defined to be zero for the typical device that has only a single slot (See <code>CONFIG_MMCSD_NSLOTS</code>).
If defined, <code>CONFIG_PAGING_SDSLOT</code> will instruct certain board-specific logic to initialize the media in this SD slot.
</li>
<li>
<code>CONFIG_PAGING_M25PX</code>:
Use the m25px.c FLASH driver.
If this is selected, then the MTD interface to the M25Px device will be used to support paging.
</li>
<li>
<code>CONFIG_PAGING_M25PX_BINOFFSET</code>:
If CONFIG_PAGING_M25PX is defined then CONFIG_PAGING_M25PX_BINOFFSET will be used to specify the offset in bytes into the FLASH device where the NuttX binary image is located.
Default: 0
</li>
<li>
<code>CONFIG_PAGING_M25PX_SPIPORT</code>:
If CONFIG_PAGING_M25PX is defined and the device has multiple SPI busses (ports), then this configuration should be set to indicate which SPI port the M25Px device is connected.
Default: 0
</li>
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
<p>
The following can be used to disable categories of APIs supported
by the OS. If the compiler supports weak functions, then it
should not be necessary to disable functions unless you want to
restrict usage of those APIs.
</p>
<p>
There are certain dependency relationships in these features.
</p>
<ul>
<li>
<code>mq_notify()</code> logic depends on signals to awaken tasks
waiting for queues to become full or empty.
</li>
<li>
<code>pthread_condtimedwait()</code> depends on signals to wake
up waiting tasks.
</li>
</ul>
<ul>
patacongo
committed
<code>CONFIG_DISABLE_CLOCK</code>, <code>CONFI_DISABLE_POSIX_TIMERS</code>,
<code>CONFIG_DISABLE_PTHREAD</code>, <code>CONFIG_DISABLE_SIGNALS</code>,
<code>CONFIG_DISABLE_MQUEUE</code>, <code>CONFIG_DISABLE_MOUNTPOUNT</code>
</ul>
<h2>Miscellaneous libc settings</h2>
<ul>
<li>
<code>CONFIG_NOPRINTF_FIELDWIDTH</code>: sprintf-related logic is a
little smaller if we do not support fieldwidthes
</li>
<li>
<code>CONFIG_LIBC_FLOATINGPOINT</code>: By default, floating point
support in printf, sscanf, etc. is disabled.
</li>
</ul>
<h2>Allow for architecture optimized implementations</h2>
<p>
The architecture can provide optimized versions of the
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
</p>
<ul>
<p>
<code>CONFIG_ARCH_MEMCPY</code>, <code>CONFIG_ARCH_MEMCMP</code>, <code>CONFIG_ARCH_MEMMOVE</code>,
<code>CONFIG_ARCH_MEMSET</code>, <code>CONFIG_ARCH_STRCMP</code>, <code>CONFIG_ARCH_STRCPY</code>,
<code>CONFIG_ARCH_STRNCPY</code>, <code>CONFIG_ARCH_STRLEN</code>, <code>CONFIG_ARCH_BZERO</code>,
<code>CONFIG_ARCH_KMALLOC</code>, <code>CONFIG_ARCH_KZMALLOC</code>, <code>ONFIG_ARCH_KFREE</code>,
</p>
</ul>
<h2>Sizes of configurable things (0 disables)</h2>
<ul>
<li>
<code>CONFIG_MAX_TASKS</code>: The maximum number of simultaneously
active tasks. This value must be a power of two.
</li>
<li>
<code>CONFIG_NPTHREAD_KEYS</code>: The number of items of thread-
specific data that can be retained
</li>
<li>
<code>CONFIG_NFILE_DESCRIPTORS</code>: The maximum number of file
descriptors (one for each open)
</li>
<li>
<code>CONFIG_NFILE_STREAMS</code>: The maximum number of streams that
can be fopen'ed
</li>
<li>
<code>CONFIG_NAME_MAX</code>: The maximum size of a file name.
</li>
<li>
<code>CONFIG_STDIO_BUFFER_SIZE</code>: Size of the buffer to allocate
on fopen. (Only if CONFIG_NFILE_STREAMS > 0)
</li>
<li>
<code>CONFIG_NUNGET_CHARS</code>: Number of characters that can be
buffered by ungetc() (Only if CONFIG_NFILE_STREAMS > 0)
</li>
<li>
<code>CONFIG_PREALLOC_MQ_MSGS</code>: The number of pre-allocated message
structures. The system manages a pool of preallocated
message structures to minimize dynamic allocations
</li>
<li>
<code>CONFIG_MQ_MAXMSGSIZE</code>: Message structures are allocated with
other message structure overhead.
</li>
<li>
<code>CONFIG_PREALLOC_WDOGS</code>: The number of pre-allocated watchdog
structures. The system manages a pool of preallocated
watchdog structures to minimize dynamic allocations
</li>
<li>
<code>CONFIG_PREALLOC_IGMPGROUPS</code>: Pre-allocated IGMP groups are used
Only if needed from interrupt level group created (by the IGMP server).
Default: 4
</li>
<code>CONFIG_DEV_PIPE_SIZE</code>: Size, in bytes, of the buffer to allocated
for pipe and FIFO support (default is 1024).
<h2>File Systems</h2>
<ul>
<li>
<code>CONFIG_FS_FAT</code>: Enable FAT filesystem support.
</li>
<li>
<code>CONFIG_FAT_SECTORSIZE</code>: Max supported sector size.
</li>
<li>
<code>CONFIG_FS_ROMFS</code>: Enable ROMFS filesystem support
</li>
</ul>
<h2>Device Drivers</h2>
<h3>SPI driver</h3>
<ul>
<li>
<code>CONFIG_SPI_OWNBUS</code> - Set if there is only one active device
on the SPI bus. No locking or SPI configuration will be performed.
It is not necessary for clients to lock, re-configure, etc..
</li>
<li>
<code>CONFIG_SPI_EXCHANGE</code>: Driver supports a single exchange method
(vs a recvblock() and sndblock ()methods)
</li>
</ul>
<h3>SPI-based MMC/SD driver</h3>
<ul>
<li>
<code>CONFIG_MMCSD_NSLOTS</code>: Number of MMC/SD slots supported by the driver. Default is one.
</li>
<li>
<code>CONFIG_MMCSD_READONLY</code>: Provide read-only access. Default is Read/Write
</li>
<li>
<code>CONFIG_MMCSD_SPICLOCK</code>: Maximum SPI clock to drive MMC/SD card. Default is 20MHz.
</li>
<h3>SDIO-based MMC/SD driver</h3>
<ul>
<li>
<code>CONFIG_FS_READAHEAD</code>: Enable read-ahead buffering
</li>
<li>
<code>CONFIG_FS_WRITEBUFFER</code>: Enable write buffering
</li>
<li>
<code>CONFIG_SDIO_DMA</code>: SDIO driver supports DMA
</li>
<li>
<code>CONFIG_MMCSD_MMCSUPPORT</code>: Enable support for MMC cards
</li>
<li>
<code>CONFIG_MMCSD_HAVECARDDETECT</code>: SDIO driver card detection is 100% accurate
</li>
</ul>
<h3>RiT P14201 OLED driver</h3>
<ul>
<li>
<code>CONFIG_LCD_P14201</code>: Enable P14201 support
</li>
<li>
<code>CONFIG_P14201_SPIMODE</code>: Controls the SPI mode
</li>
<li>
<code>CONFIG_P14201_FREQUENCY</code>: Define to use a different bus frequency
</li>
<li>
<code>CONFIG_P14201_NINTERFACES</code>:
Specifies the number of physical P14201 devices that will be supported.
</li>
<li>
<code>CONFIG_P14201_FRAMEBUFFER</code>:
If defined, accesses will be performed using an in-memory copy of the OLEDs GDDRAM.
This cost of this buffer is 128 * 96 / 2 = 6Kb.
If this is defined, then the driver will be fully functional.
If not, then it will have the following limitations:
<ul>
<li>Reading graphics memory cannot be supported, and</li>
<li>All pixel writes must be aligned to byte boundaries.</li>
</ul>
The latter limitation effectively reduces the 128x96 disply to 64x96.
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
</li>
</ul>
<h3>ENC28J60 Ethernet Driver Configuration Settings</h3>
<ul>
<li>
<code>CONFIG_NET_ENC28J60</code>: Enabled ENC28J60 support
</li>
<li>
<code>CONFIG_ENC28J60_SPIMODE</code>: Controls the SPI mode
</li>
<li>
<code>CONFIG_ENC28J60_FREQUENCY</code>: Define to use a different bus frequency
</li>
<li>
<code>CONFIG_ENC28J60_NINTERFACES</code>:
Specifies the number of physical ENC28J60 devices that will be supported.
</li>
<li>
<code>CONFIG_ENC28J60_STATS</code>: Collect network statistics
</li>
<li>
<code>CONFIG_ENC28J60_HALFDUPPLEX</code>: Default is full duplex
</li>
</ul>
<h3>TCP/IP and UDP support via uIP</h3>
<code>CONFIG_NET</code>: Enable or disable all network features
<code>CONFIG_NET_IPv6</code>: Build in support for IPv6
<code>CONFIG_NSOCKET_DESCRIPTORS</code>: Maximum number of socket descriptors per task/thread.
<li>
<code>CONFIG_NET_NACTIVESOCKETS</code>: Maximum number of concurrent socket operations (recv, send, etc.).
Default: <code>CONFIG_NET_TCP_CONNS</code>+<code>CONFIG_NET_UDP_CONNS</code>.
</li>
<code>CONFIG_NET_SOCKOPTS</code>: Enable or disable support for socket options.
<code>CONFIG_NET_BUFSIZE</code>: uIP buffer size
<code>CONFIG_NET_TCP</code>: TCP support on or off
<code>CONFIG_NET_TCP_CONNS</code>: Maximum number of TCP connections (all tasks).
<li>
<code>CONFIG_NET_TCPBACKLOG</code>:
Incoming connections pend in a backlog until <code>accept()</code> is called.
The size of the backlog is selected when <code>listen()</code> is called.
</li>
<li>
<code>CONFIG_NET_TCP_READAHEAD_BUFSIZE</code>: Size of TCP read-ahead buffers
</li>
<li>
<code>CONFIG_NET_NTCP_READAHEAD_BUFFERS</code>: Number of TCP read-ahead buffers (may be zero)
<li>
<code>CONFIG_NET_MAX_LISTENPORTS</code>: Maximum number of listening TCP ports (all tasks).
</li>
<li>
<code>CONFIG_NET_TCPURGDATA</code>: Determines if support for TCP urgent data
notification should be compiled in. Urgent data (out-of-band data)
is a rarely used TCP feature that is very seldom would be required.
</li>
<code>CONFIG_NET_UDP</code>: UDP support on or off
<code>CONFIG_NET_UDP_CHECKSUMS</code>: UDP checksums on or off
<code>CONFIG_NET_UDP_CONNS</code>: The maximum amount of concurrent UDP connections
<code>CONFIG_NET_ICMP</code>: Enable minimal ICMP support. Includes built-in support
for sending replies to received ECHO (ping) requests.
</li>
<li>
<code>CONFIG_NET_ICMP_PING</code>: Provide interfaces to support application level
support for sending ECHO (ping) requests and associating ECHO replies.
<li>
<code>CONFIG_NET_IGMP</code>: Enable IGMPv2 client support.
</li>
<li>
<code>CONFIG_PREALLOC_IGMPGROUPS</code>: Pre-allocated IGMP groups are used
Only if needed from interrupt level group created (by the IGMP server).
Default: 4
</li>
<code>CONFIG_NET_PINGADDRCONF</code>: Use "ping" packet for setting IP address
<li>
<code>CONFIG_NET_STATISTICS</code>: uIP statistics on or off
</li>
<code>CONFIG_NET_RECEIVE_WINDOW</code>: The size of the advertised receiver's window
<code>CONFIG_NET_ARPTAB_SIZE</code>: The size of the ARP table
<code>CONFIG_NET_BROADCAST</code>: Incoming UDP broadcast support
</li>
<li>
<code>CONFIG_NET_MULTICAST</code>: Outgoing multi-cast address support
<code>CONFIG_NET_LLH_LEN</code>: The link level header length
<li>
<code>CONFIG_NET_FWCACHE_SIZE</code>: number of packets to remember when looking for duplicates
</li>
</ul>
<h3>UIP Network Utilities</h3>
<ul>
<li>
<code>CONFIG_NET_DHCP_LIGHT</code>: Reduces size of DHCP
<code>CONFIG_NET_RESOLV_ENTRIES</code>: Number of resolver entries
<h3>THTTPD</h3>
<ul>
<li>
<code>CONFIG_THTTPD_PORT</code>: THTTPD Server port number
</li>
<li>
<code>CONFIG_THTTPD_IPADDR</code>: Server IP address (no host name)
</li>
<li>
<code>CONFIG_THTTPD_SERVER_ADDRESS</code>: SERVER_ADDRESS: response
</li>
<li>
<code>CONFIG_THTTPD_SERVER_SOFTWARE</code>: SERVER_SOFTWARE: response
</li>
<li>
<code>CONFIG_THTTPD_PATH</code>: Server working directory. Default: <code>/mnt/www</code>.
<code>CONFIG_THTTPD_CGI_PATH</code>: Path to CGI executables. Default: <code>/mnt/www/cgi-bin</code>.
<code>CONFIG_THTTPD_CGI_PATTERN</code>: Only CGI programs whose expanded paths
match this pattern will be executed. In fact, if this value is not defined
then no CGI logic will be built. Default: <code>/mnt/www/cgi-bin/*</code>.
</li>
<li>
<code>CONFIG_THTTPD_CGI_PRIORITY</code>: Provides the priority of CGI child tasks
</li>
<li>
<code>CONFIG_THTTPD_CGI_STACKSIZE</code>: Provides the initial stack size of
CGI child task (will be overridden by the stack size in the NXFLAT
header)
</li>
<li>
<code>CONFIG_THTTPD_CGI_BYTECOUNT</code>: Byte output limit for CGI tasks.
</li>
<li>
<code>CONFIG_THTTPD_CGI_TIMELIMIT</code>: How many seconds to allow CGI programs
to run before killing them.
</li>
<li>
<code>CONFIG_THTTPD_CHARSET</code>: The default character set name to use with
text MIME types.
</li>
<li>
<code>CONFIG_THTTPD_IOBUFFERSIZE</code>:
</li>
<li>
<code>CONFIG_THTTPD_INDEX_NAMES</code>: A list of index filenames to check. The
files are searched for in this order.
</li>
<li>
<code>CONFIG_AUTH_FILE</code>: The file to use for authentication. If this is
defined then thttpd checks for this file in the local directory
before every fetch. If the file exists then authentication is done,
otherwise the fetch proceeds as usual. If you leave this undefined
then thttpd will not implement authentication at all and will not
check for auth files, which saves a bit of CPU time. A typical
value is ".htpasswd&quout;