aboutsummaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorSimon Wilks <sjwilks@gmail.com>2013-01-24 23:27:27 +0100
committerSimon Wilks <sjwilks@gmail.com>2013-01-24 23:27:27 +0100
commit0669d2aee01126a989986c267dcd5a6489edfff8 (patch)
tree7e9c8c7073f39f4de7897d525b20dbeeb6cb755d /nuttx/configs
parent9924c4f425bc9fc507e7d065cc373a6cd9bbfebd (diff)
parentbeb45222985f1eb9fbe21b22b95c30ab8ca5bbac (diff)
downloadpx4-firmware-0669d2aee01126a989986c267dcd5a6489edfff8.tar.gz
px4-firmware-0669d2aee01126a989986c267dcd5a6489edfff8.tar.bz2
px4-firmware-0669d2aee01126a989986c267dcd5a6489edfff8.zip
Merge remote-tracking branch 'upstream/master' into hott
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/README.txt346
-rw-r--r--nuttx/configs/px4fmu/common/Make.defs44
-rw-r--r--nuttx/configs/px4fmu/nsh/appconfig15
-rwxr-xr-xnuttx/configs/px4fmu/nsh/defconfig97
-rw-r--r--nuttx/configs/px4fmu/src/Makefile14
-rw-r--r--nuttx/configs/px4io/common/Make.defs47
-rwxr-xr-xnuttx/configs/px4io/common/ld.script9
-rwxr-xr-xnuttx/configs/px4io/include/board.h12
-rw-r--r--nuttx/configs/px4io/io/appconfig3
-rwxr-xr-xnuttx/configs/px4io/io/defconfig29
-rw-r--r--nuttx/configs/px4io/src/Makefile9
11 files changed, 426 insertions, 199 deletions
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index e6bde645d..1b78567a3 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -103,14 +103,23 @@ Make.defs -- This makefile fragment provides architecture and
Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP
Tool options: CFLAGS, LDFLAGS
- COMPILE, ASSEMBLE, ARCHIVE, CLEAN, and MKDEP macros
When this makefile fragment runs, it will be passed TOPDIR which
is the path to the root directory of the build. This makefile
- fragment may include ${TOPDIR}/.config to perform configuration
- specific settings. For example, the CFLAGS will most likely be
+ fragment should include:
+
+ $(TOPDIR)/.config : Nuttx configuration
+ $(TOPDIR)/tools/Config.mk : Common definitions
+
+ Definitions in the Make.defs file probably depend on some of the
+ settings in the .config file. For example, the CFLAGS will most likely be
different if CONFIG_DEBUG=y.
+ The included tools/Config.mk file contains additional definitions that may
+ be overriden in the architecture-specific Make.defs file as necessary:
+
+ COMPILE, ASSEMBLE, ARCHIVE, CLEAN, and MKDEP macros
+
defconfig -- This is a configuration file similar to the Linux
configuration file. In contains variable/value pairs like:
@@ -151,6 +160,9 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_ARCH_IRQPRIO
Define if the architecture suports prioritizaton of interrupts
and the up_prioritize_irq() API.
+ CONFIG_ADDRENV
+ The CPU supports an MMU and CPU port supports provision of address
+ environments for tasks (making the, perhaps, processes).
Some architectures require a description of the RAM configuration:
@@ -171,7 +183,6 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_RAW_BINARY - 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.
- CONFIG_HAVE_LIBM - toolchain supports libm.a
CONFIG_HAVE_CXX - toolchain supports C++ and CXX, CXXFLAGS, and
COMPILEXX have been defined in the configurations Make.defs
file.
@@ -318,11 +329,84 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_RR_INTERVAL - The round robin timeslice will be set
this number of milliseconds; Round robin scheduling can
be disabled by setting this value to zero.
- CONFIG_SCHED_INSTRUMENTATION - enables instrumentation in
+ CONFIG_SCHED_INSTRUMENTATION - enables instrumentation in
scheduler to monitor system performance
CONFIG_TASK_NAME_SIZE - Specifies that maximum size of a
task name to save in the TCB. Useful if scheduler
instrumentation is selected. Set to zero to disable.
+ CONFIG_SCHED_HAVE_PARENT - Remember the ID of the parent task
+ when a new child task is created. This support enables some
+ additional features (such as SIGCHLD) and modifies the behavior
+ of other interfaces. For example, it makes waitpid() more
+ standards complete by restricting the waited-for tasks to the
+ children of the caller. Default: disabled.
+ CONFIG_SCHED_CHILD_STATUS
+ If this option is selected, then the exit status of the child task
+ will be retained after the child task exits. This option should be
+ selected if you require knowledge of a child process' exit status.
+ Without this setting, wait(), waitpid() or waitid() may fail. For
+ example, if you do:
+
+ 1) Start child task
+ 2) Wait for exit status (using wait(), waitpid(), or waitid()).
+
+ 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 above sequence will work if you disable pre-emption using
+ sched_lock() prior to starting the child task, then re-enable pre-
+ emption with sched_unlock() after the wait completes. This works
+ because the child task is not permitted to run until the wait is in
+ place.
+
+ The standard solution would be to enable CONFIG_SCHED_CHILD_STATUS. In
+ this case the exit status of the child task is retained after the
+ child exits and the wait will successful obtain the child task's
+ exit status whether it is called before the child task exits or not.
+
+ Warning: If you enable this feature, then your application must
+ either (1) take responsibility for reaping the child status with wait(),
+ waitpid(), or waitid(), or (2) suppress retention of child status.
+ If you do not reap the child status, then you have a memory leak and
+ your system will eventually fail.
+
+ Retention of child status can be suppressed on the parent using logic like:
+
+ struct sigaction sa;
+
+ sa.sa_handler = SIG_IGN;
+ sa.sa_flags = SA_NOCLDWAIT;
+ int ret = sigaction(SIGCHLD, &sa, NULL);
+
+ CONFIG_PREALLOC_CHILDSTATUS
+ To prevent runaway child status allocations and to improve
+ allocation performance, child task exit status structures are pre-
+ allocated when the system boots. This setting determines the number
+ of child status structures that will be pre-allocated. If this
+ setting is not defined or if it is defined to be zero then a value
+ of 2*MAX_TASKS is used.
+
+ Note that there cannot be more that CONFIG_MAX_TASKS tasks in total.
+ However, the number of child status structures may need to be
+ significantly larger because this number includes the maximum number
+ of tasks that are running PLUS the number of tasks that have exit'ed
+ without having their exit status reaped (via wait(), waitid(), or
+ waitpid()).
+
+ Obviously, if tasks spawn children indefinitely and never have the
+ exit status reaped, then you may have a memory leak! If you enable
+ the SCHED_CHILD_STATUS feature, then your application must take
+ responsibility for either (1) reaping the child status with wait(),
+ waitpid(), or waitid() or it must (2) suppress retention of child
+ status. Otherwise, your system will eventually fail.
+
+ Retention of child status can be suppressed on the parent using logic like:
+
+ struct sigaction sa;
+
+ sa.sa_handler = SIG_IGN;
+ sa.sa_flags = SA_NOCLDWAIT;
+ int ret = sigaction(SIGCHLD, &sa, NULL);
+
CONFIG_START_YEAR, CONFIG_START_MONTH, CONFIG_START_DAY -
Used to initialize the internal time logic.
CONFIG_GREGORIAN_TIME - Enables Gregorian time conversions.
@@ -346,7 +430,7 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_SEM_PREALLOCHOLDERS: 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
+ 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
@@ -372,9 +456,6 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_SDCLONE_DISABLE. Disable cloning of all socket
desciptors by task_create() when a new task is started. If
set, all sockets will appear to be closed in the new task.
- CONFIG_NXFLAT. Enable support for the NXFLAT binary format.
- This format will support execution of NuttX binaries located
- in a ROMFS filesystem (see examples/nxflat).
CONFIG_SCHED_WORKQUEUE. 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,
@@ -392,7 +473,7 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_SCHED_WORKSTACKSIZE - The stack size allocated for the worker
thread. Default: CONFIG_IDLETHREAD_STACKSIZE.
CONFIG_SIG_SIGWORK - The signal number that will be used to wake-up
- the worker thread. Default: 4
+ the worker thread. Default: 17
CONFIG_SCHED_LPWORK. If CONFIG_SCHED_WORKQUEUE is defined, then a single
work queue is created by default. If CONFIG_SCHED_LPWORK is also defined
then an additional, lower-priority work queue will also be created. This
@@ -404,7 +485,12 @@ defconfig -- This is a configuration file similar to the Linux
checks for work in units of microseconds. Default: 50*1000 (50 MS).
CONFIG_SCHED_LPWORKSTACKSIZE - The stack size allocated for the lower
priority worker thread. Default: CONFIG_IDLETHREAD_STACKSIZE.
- CONFIG_SCHED_WAITPID - Enables the waitpid() API
+ CONFIG_SCHED_WAITPID - Enables the waitpid() interface in a default,
+ non-standard mode (non-standard in the sense that the waited for
+ PID need not be child of the caller). If SCHED_HAVE_PARENT is
+ also defined, then this setting will modify the behavior or
+ waitpid() (making more spec compliant) and will enable the
+ waitid() and wait() interfaces as well.
CONFIG_SCHED_ATEXIT - Enables the atexit() API
CONFIG_SCHED_ATEXIT_MAX - By default if CONFIG_SCHED_ATEXIT is
selected, only a single atexit() function is supported. That number
@@ -418,6 +504,56 @@ defconfig -- This is a configuration file similar to the Linux
where 'app' is the application name. If not defined, CONFIG_USER_ENTRYPOINT
defaults to user_start.
+ Signal Numbers:
+
+ CONFIG_SIG_SIGUSR1 - Value of standard user signal 1 (SIGUSR1).
+ Default: 1
+ CONFIG_SIG_SIGUSR2 - Value of standard user signal 2 (SIGUSR2).
+ Default: 2
+ CONFIG_SIG_SIGALARM - Default the standard signal used with POSIX
+ timers (SIGALRM). Default: 3
+ CONFIG_SIG_SIGCHLD - The SIGCHLD signal is sent to the parent of a child
+ process when it exits, is interrupted (stopped), or resumes after being
+ interrupted. Default: 4
+
+ CONFIG_SIG_SIGCONDTIMEDOUT - This non-standard signal number is used in
+ the implementation of pthread_cond_timedwait(). Default 16.
+ CONFIG_SIG_SIGWORK - SIGWORK is a non-standard signal used to wake up
+ the internal NuttX worker thread. Default: 17.
+
+ Binary Loaders:
+ CONFIG_BINFMT_DISABLE - By default, support for loadable binary formats
+ is built.
+ This logic may be suppressed be defining this setting.
+ CONFIG_BINFMT_CONSTRUCTORS - Build in support for C++ constructors in
+ loaded modules.
+ CONFIG_SYMTAB_ORDEREDBYNAME - Symbol tables are order by name (rather
+ than value).
+ CONFIG_NXFLAT. Enable support for the NXFLAT binary format. This format
+ will support execution of NuttX binaries located in a ROMFS filesystem
+ (see apps/examples/nxflat).
+ CONFIG_ELF - Enable support for the ELF binary format. This format will
+ support execution of ELF binaries copied from a file system and
+ relocated into RAM (see apps/examples/elf).
+
+ If CONFIG_ELF is selected, then these additional options are available:
+
+ CONFIG_ELF_ALIGN_LOG2 - Align all sections to this Log2 value: 0->1,
+ 1->2, 2->4, etc.
+ CONFIG_ELF_STACKSIZE - This is the default stack size that will will
+ be used when starting ELF binaries.
+ CONFIG_ELF_BUFFERSIZE - This is an I/O buffer that is used to access
+ the ELF file. Variable length items will need to be read (such as
+ symbol names). This is really just this initial size of the buffer;
+ it will be reallocated as necessary to hold large symbol names).
+ Default: 128
+ CONFIG_ELF_BUFFERINCR - This is an I/O buffer that is used to access
+ the ELF file. Variable length items will need to be read (such as
+ symbol names). This value specifies the size increment to use each
+ time the buffer is reallocated. Default: 32
+ CONFIG_ELF_DUMPBUFFER - Dump various ELF buffers for debug purposes.
+ This option requires CONFIG_DEBUG and CONFIG_DEBUG_VERBOSE.
+
System Logging:
CONFIG_SYSLOG enables general system logging support.
CONFIG_SYSLOG_DEVPATH - The full path to the system logging device. Default
@@ -503,7 +639,7 @@ defconfig -- This is a configuration file similar to the Linux
from the end of RAM for page tables or other system usage. The
configuration settings and linker directives must be cognizant of that:
CONFIG_PAGING_NDATA should be defined to prevent the data region from
- extending all the way to the end of memory.
+ extending all the way to the end of memory.
CONFIG_PAGING_DEFPRIO - 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
@@ -517,7 +653,7 @@ defconfig -- This is a configuration file similar to the Linux
transfer is completed. Default: Undefined (non-blocking).
CONFIG_PAGING_WORKPERIOD - 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
+ 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 CONFIG_PAGING_TIMEOUT_TICKS).
@@ -529,7 +665,7 @@ defconfig -- This is a configuration file similar to the Linux
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:
-
+
CONFIG_PAGING_VECPPAGE - This the physical address of the page in
memory to be mapped to the vector address.
CONFIG_PAGING_VECL2PADDR - This is the physical address of the L2
@@ -552,7 +688,7 @@ defconfig -- This is a configuration file similar to the Linux
devices. CONFIG_PAGING_SDSLOT 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 CONFIG_MMCSD_NSLOTS). If defined,
+ only a single slot (See CONFIG_MMCSD_NSLOTS). If defined,
CONFIG_PAGING_SDSLOT will instruct certain board-specific logic to
initialize the media in this SD slot.
CONFIG_PAGING_M25PX - Use the m25px.c FLASH driver. If this is selected,
@@ -621,6 +757,37 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_ARCH_STRNCPY, CONFIG_ARCH_STRLEN, CONFIG_ARCH_STRNLEN
CONFIG_ARCH_BZERO
+ If CONFIG_ARCH_MEMCPY is not selected, then you make also select Daniel
+ Vik's optimized implementation of memcpy():
+
+ CONFIG_MEMCPY_VIK - Select this option to use the optimized memcpy()
+ function by Daniel Vik. Select this option for improved performance
+ at the expense of increased size. See licensing information in the
+ top-level COPYING file. Default: n
+
+ And if CONFIG_MEMCPY_VIK is selected, the following tuning options are available:
+
+ CONFIG_MEMCPY_PRE_INC_PTRS - Use pre-increment of pointers. Default is
+ post increment of pointers.
+
+ CONFIG_MEMCPY_INDEXED_COPY - Copying data using array indexing. Using
+ this option, disables the CONFIG_MEMCPY_PRE_INC_PTRS option.
+
+ CONFIG_MEMCPY_64BIT - Compiles memcpy for architectures that suppport
+ 64-bit operations efficiently.
+
+ If CONFIG_ARCH_MEMSET is not selected, then the following option is
+ also available:
+
+ CONFIG_MEMSET_OPTSPEED - Select this option to use a version of memcpy()
+ optimized for speed. Default: memcpy() is optimized for size.
+
+ And if CONFIG_MEMSET_OPTSPEED is selected, the following tuning option is
+ available:
+
+ CONFIG_MEMSET_64BIT - Compiles memset() for architectures that suppport
+ 64-bit operations efficiently.
+
The architecture may provide custom versions of certain standard header
files:
@@ -663,6 +830,15 @@ defconfig -- This is a configuration file similar to the Linux
don't select CONFIG_ARCH_MATH_H, the redirecting math.h header file will
stay out-of-the-way in include/nuttx/.
+ CONFIG_ARCH_FLOAT_H
+ If you enable the generic, built-in math library, then that math library
+ will expect your toolchain to provide the standard float.h header file.
+ The float.h header file defines the properties of your floating point
+ implementation. It would always be best to use your 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, there is no assurance that
+ the settings in this float.h are actually correct for your platform!
+
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
@@ -693,7 +869,7 @@ defconfig -- This is a configuration file similar to the Linux
If CONFIG_ARCH_ROMGETC is defined, then the architecture logic
must export the function up_romgetc(). up_romgetc() will simply
read one byte of data from the instruction space.
-
+
If CONFIG_ARCH_ROMGETC, certain C stdio functions are effected:
(1) All format strings in printf, fprintf, sprintf, etc. are
assumed to lie in FLASH (string arguments for %s are still assumed
@@ -763,7 +939,7 @@ defconfig -- This is a configuration file similar to the Linux
much sense in supporting FAT date and time unless you have a
hardware RTC or other way to get the time and date.
CONFIG_FS_NXFFS: Enable NuttX FLASH file system (NXFF) support.
- CONFIG_NXFFS_ERASEDSTATE: The erased state of FLASH.
+ CONFIG_NXFFS_ERASEDSTATE: The erased state of FLASH.
This must have one of the values of 0xff or 0x00.
Default: 0xff.
CONFIG_NXFFS_PACKTHRESHOLD: When packing flash file data,
@@ -917,7 +1093,7 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_INPUT
Enables general support for input devices
-
+
CONFIG_INPUT_TSC2007
If CONFIG_INPUT is selected, then this setting will enable building
of the TI TSC2007 touchscreen driver.
@@ -932,14 +1108,14 @@ defconfig -- This is a configuration file similar to the Linux
Enables support for the SPI interface (not currenly supported)
CONFIG_STMPE811_I2C
Enables support for the I2C interface
- CONFIG_STMPE811_MULTIPLE
+ CONFIG_STMPE811_MULTIPLE
Can be defined to support multiple STMPE811 devices on board.
CONFIG_STMPE811_ACTIVELOW
Interrupt is generated by an active low signal (or falling edge).
CONFIG_STMPE811_EDGE
Interrupt is generated on an edge (vs. on the active level)
CONFIG_STMPE811_NPOLLWAITERS
- Maximum number of threads that can be waiting on poll() (ignored if
+ Maximum number of threads that can be waiting on poll() (ignored if
CONFIG_DISABLE_POLL is set).
CONFIG_STMPE811_TSC_DISABLE
Disable driver touchscreen functionality.
@@ -1048,21 +1224,21 @@ defconfig -- This is a configuration file similar to the Linux
port. The default data link layer for uIP is Ethernet. If CONFIG_NET_SLIP
is defined in the NuttX configuration file, then SLIP will be supported.
The basic differences between the SLIP and Ethernet configurations is that
- when SLIP is selected:
+ when SLIP is selected:
- * The link level header (that comes before the IP header) is omitted.
- * All MAC address processing is suppressed.
+ * The link level header (that comes before the IP header) is omitted.
+ * All MAC address processing is suppressed.
* ARP is disabled.
If CONFIG_NET_SLIP is not selected, then Ethernet will be used (there is
no need to define anything special in the configuration file to use
- Ethernet -- it is the default).
+ Ethernet -- it is the default).
CONFIG_NET_SLIP -- Enables building of the SLIP driver. SLIP requires
at least one IP protocols selected and the following additional
network settings: CONFIG_NET_NOINTS and CONFIG_NET_MULTIBUFFER.
CONFIG_NET_BUFSIZE *must* be set to 296. Other optional configuration
- settings that affect the SLIP driver: CONFIG_NET_STATISTICS.
+ settings that affect the SLIP driver: CONFIG_NET_STATISTICS.
Default: Ethernet
If SLIP is selected, then the following SLIP options are available:
@@ -1078,6 +1254,10 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_NET_DHCP_LIGHT - Reduces size of DHCP
CONFIG_NET_RESOLV_ENTRIES - Number of resolver entries
+ CONFIG_NET_RESOLV_MAXRESPONSE - This setting determines the maximum
+ size of response message that can be received by the DNS resolver.
+ The default is 96 but may need to be larger on enterprise networks
+ (perhaps 176).
THTTPD
@@ -1099,7 +1279,7 @@ defconfig -- This is a configuration file similar to the Linux
to run before killing them.
CONFIG_THTTPD_CHARSET- The default character set name to use with
text MIME types.
- CONFIG_THTTPD_IOBUFFERSIZE -
+ CONFIG_THTTPD_IOBUFFERSIZE -
CONFIG_THTTPD_INDEX_NAMES - A list of index filenames to check. The
files are searched for in this order.
CONFIG_AUTH_FILE - The file to use for authentication. If this is
@@ -1131,7 +1311,7 @@ defconfig -- This is a configuration file similar to the Linux
You can also leave both options undefined, and thttpd will not do
anything special about tildes. Enabling both options is an error.
Typical values, if they're defined, are "users" for
- CONFIG_THTTPD_TILDE_MAP1 and "public_html"forCONFIG_THTTPD_TILDE_MAP2.
+ CONFIG_THTTPD_TILDE_MAP1 and "public_html"forCONFIG_THTTPD_TILDE_MAP2.
CONFIG_THTTPD_GENERATE_INDICES
CONFIG_THTTPD_URLPATTERN - If defined, then it will be used to match
and verify referrers.
@@ -1189,7 +1369,7 @@ defconfig -- This is a configuration file similar to the Linux
USB host HID class driver. Requires CONFIG_USBHOST=y,
CONFIG_USBHOST_INT_DISABLE=n, CONFIG_NFILE_DESCRIPTORS > 0,
CONFIG_SCHED_WORKQUEUE=y, and CONFIG_DISABLE_SIGNALS=n.
-
+
CONFIG_HIDKBD_POLLUSEC
Device poll rate in microseconds. Default: 100 milliseconds.
CONFIG_HIDKBD_DEFPRIO
@@ -1208,7 +1388,7 @@ defconfig -- This is a configuration file similar to the Linux
If set to y all 231 possible scancodes will be converted to
something. Default: 104 key US keyboard.
CONFIG_HIDKBD_NODEBOUNCE
- If set to y normal debouncing is disabled. Default:
+ If set to y normal debouncing is disabled. Default:
Debounce enabled (No repeat keys).
USB host mass storage class driver. Requires CONFIG_USBHOST=y,
@@ -1245,12 +1425,12 @@ defconfig -- This is a configuration file similar to the Linux
Configure the CDC serial driver as part of a composite driver
(only if CONFIG_USBDEV_COMPOSITE is also defined)
CONFIG_CDCACM_IFNOBASE
- If the CDC driver is part of a composite device, then this may need to
+ If the CDC driver is part of a composite device, then this may need to
be defined to offset the CDC/ACM interface numbers so that they are
unique and contiguous. When used with the Mass Storage driver, the
correct value for this offset is zero.
CONFIG_CDCACM_STRBASE
- If the CDC driver is part of a composite device, then this may need to
+ If the CDC driver is part of a composite device, then this may need to
be defined to offset the CDC/ACM string numbers so that they are
unique and contiguous. When used with the Mass Storage driver, the
correct value for this offset is four (this value actuallly only needs
@@ -1309,13 +1489,13 @@ defconfig -- This is a configuration file similar to the Linux
Configure the mass storage driver as part of a composite driver
(only if CONFIG_USBDEV_COMPOSITE is also defined)
CONFIG_USBMSC_IFNOBASE
- If the CDC driver is part of a composite device, then this may need to
+ If the CDC driver is part of a composite device, then this may need to
be defined to offset the mass storage interface number so that it is
unique and contiguous. When used with the CDC/ACM driver, the
correct value for this offset is two (because of the two CDC/ACM
interfaces that will precede it).
CONFIG_USBMSC_STRBASE
- If the CDC driver is part of a composite device, then this may need to
+ If the CDC driver is part of a composite device, then this may need to
be defined to offset the mass storage string numbers so that they are
unique and contiguous. When used with the CDC/ACM driver, the
correct value for this offset is four (or perhaps 5 or 6, depending
@@ -1477,7 +1657,7 @@ defconfig -- This is a configuration file similar to the Linux
operation from FLASH but must copy initialized .data sections to RAM.
CONFIG_BOOT_COPYTORAM - Some configurations boot in FLASH
but copy themselves entirely into RAM for better performance.
- CONFIG_BOOT_RAMFUNCS - Other configurations may copy just some functions
+ CONFIG_ARCH_RAMFUNCS - Other configurations may copy just some functions
into RAM, either for better performance or for errata workarounds.
CONFIG_STACK_ALIGNMENT - Set if the your application has specific
stack alignment requirements (may not be supported
@@ -1523,10 +1703,15 @@ configs/avr32dev1
configs/c5471evm
This is a port to the Spectrum Digital C5471 evaluation board. The
TMS320C5471 is a dual core processor from TI with an ARM7TDMI general
- purpose processor and a c54 DSP. It is also known as TMS320DA180 or just DA180.
+ purpose processor and a c54 DSP. It is also known as TMS320DA180 or just DA180.
NuttX runs on the ARM core and is built with a GNU arm-nuttx-elf toolchain*.
This port is complete and verified.
+configs/cloudctrl
+ Darcy's CloudController board. This is a small network relay development
+ board. Based on the Shenzhou IV development board design. It is based on
+ the STM32F107VC MCU.
+
configs/compal_e88 and compal_e99
These directories contain the board support for compal e88 and e99 phones.
These ports are based on patches contributed by Denis Carikli for both the
@@ -1539,23 +1724,23 @@ configs/demo9s12ne64
is code complete but has not yet been verified.
configs/ea3131
- Embedded Artists EA3131 Development board. This board is based on the
+ Embedded Artists EA3131 Development board. This board is based on the
an NXP LPC3131 MCU. This OS is built with the arm-nuttx-elf toolchain*.
STATUS: This port is complete and mature.
configs/ea3152
- Embedded Artists EA3152 Development board. This board is based on the
+ Embedded Artists EA3152 Development board. This board is based on the
an NXP LPC3152 MCU. This OS is built with the arm-nuttx-elf toolchain*.
STATUS: This port is has not be exercised well, but since it is
a simple derivative of the ea3131, it should be fully functional.
configs/eagle100
- Micromint Eagle-100 Development board. This board is based on the
+ Micromint Eagle-100 Development board. This board is based on the
an ARM Cortex-M3 MCU, the Luminary LM3S6918. This OS is built with the
arm-nuttx-elf toolchain*. STATUS: This port is complete and mature.
configs/ekk-lm3s9b96
- TI/Stellaris EKK-LM3S9B96 board. This board is based on the
+ TI/Stellaris EKK-LM3S9B96 board. This board is based on the
an EKK-LM3S9B96 which is a Cortex-M3.
configs/ez80f0910200kitg
@@ -1583,13 +1768,13 @@ configs/kwikstik-k40.
configs/lincoln60
NuttX port to the Micromint Lincoln 60 board.
-
+
configs/lm3s6432-s2e
Stellaris RDK-S2E Reference Design Kit and the MDL-S2E Ethernet to
Serial module.
configs/lm3s6965-ek
- Stellaris LM3S6965 Evaluation Kit. This board is based on the
+ Stellaris LM3S6965 Evaluation Kit. This board is based on the
an ARM Cortex-M3 MCU, the Luminary/TI LM3S6965. This OS is built with the
arm-nuttx-elf toolchain*. STATUS: This port is complete and mature.
@@ -1646,7 +1831,7 @@ configs/ntosd-dm320
toolchain*: see
http://wiki.neurostechnology.com/index.php/OSD_1.0_Developer_Home
-
+
There are some differences between the Dev Board and the currently
available commercial v1.0 Boards. See
@@ -1690,33 +1875,53 @@ configs/pcblogic-pic32mx
STATUS: Code complete but testing has been stalled due to tool related problems
(PICkit 2 does not work with the PIC32).
-configs/pic32-starterkit
+configs/p112
+ The P112 is notable because it was the first of the hobbyist single board
+ computers to reach the production stage. The P112 hobbyist computers
+ were relatively widespread and inspired other hobbyist centered home brew
+ computing projects such as N8VEM home brew computing project. The P112
+ project still maintains many devoted enthusiasts and has an online
+ repository of software and other information.
+
+ The P112 computer originated as a commercial product of "D-X Designs Pty
+ Ltd" of Australia. They describe the computer as "The P112 is a stand-alone
+ 8-bit CPU board. Typically running CP/M (tm) or a similar operating system,
+ it provides a Z80182 (Z-80 upgrade) CPU with up to 1MB of memory, serial,
+ parallel and diskette IO, and realtime clock, in a 3.5-inch drive form factor.
+ Powered solely from 5V, it draws 150mA (nominal: not including disk drives)
+ with a 16MHz CPU clock. Clock speeds up to 24.576MHz are possible."
+
+ The P112 board was last available new in 1996 by Dave Brooks. In late 2004
+ on the Usenet Newsgroup comp.os.cpm, talk about making another run of P112
+ boards was discussed. David Griffith decided to produce additional P112 kits
+ with Dave Brooks blessing and the assistance of others. In addition Terry
+ Gulczynski makes additional P112 derivative hobbyist home brew computers.
+ Hal Bower was very active in the mid 1990's on the P112 project and ported
+ the "Banked/Portable BIOS".
+
+ Dave Brooks was successfully funded through Kickstarter for and another
+ run of P112 boards in November of 2012.
+configs/pic32-starterkit
This directory contains the port of NuttX to the Microchip PIC32 Ethernet
Starter Kit (DM320004) with the Multimedia Expansion Board (MEB, DM320005).
See www.microchip.com for further information.
configs/pic32mx7mmb
-
This directory will (eventually) contain the port of NuttX to the
Mikroelektronika PIC32MX7 Multimedia Board (MMB). See
http://www.mikroe.com/ for further information.
- STATUS: Basic OS test configuration is in place, but the board does not boot.
- It looks like I will need an ICD3 in order to debug the code (PICkit3
- doesn't work for debug with this board). This effort is temporarily stalled.
-
configs/pjrc-8051
8051 Microcontroller. This port uses the PJRC 87C52 development system
and the SDCC toolchain. This port is not quite ready for prime time.
configs/qemu-i486
-
Port of NuttX to QEMU in i486 mode. This port will also run on real i486
hardwared (Google the Bifferboard).
configs/rgmp
- RGMP stands for RTOS and GPOS on Multi-Processor. RGMP is a project for
+ RGMP stands for RTOS and GPOS on Multi-Processor. RGMP is a project for
running GPOS and RTOS simultaneously on multi-processor platforms. You can
port your favorite RTOS to RGMP together with an unmodified Linux to form a
hybrid operating system. This makes your application able to use both RTOS
@@ -1757,8 +1962,14 @@ configs/stm3240g-eval
microcontroller (ARM Cortex-M4 with FPU). This port uses a GNU Cortex-M4
toolchain (such as CodeSourcery).
+configs/stm32f100rc_generic
+ STMicro STM32F100RC generic board based on STM32F100RC high-density value line
+ chip. This "generic" configuration is not very usable out-of-box, but can be
+ used as a starting point to creating new configs with similar STM32
+ high-density value line chips.
+
configs/stm32f4discovery
- STMicro STM32F4-Discovery board boased on the STMIcro STM32F407VGT6 MCU.
+ STMicro STM32F4-Discovery board based on the STMIcro STM32F407VGT6 MCU.
configs/sure-pic32mx
The "Advanced USB Storage Demo Board," Model DB-DP11215, from Sure
@@ -1795,7 +2006,7 @@ configs/vsn
configs/xtrs
TRS80 Model 3. This port uses a vintage computer based on the Z80.
- An emulator for this computer is available to run TRS80 programs on a
+ An emulator for this computer is available to run TRS80 programs on a
linux platform (http://www.tim-mann.org/xtrs.html).
configs/z16f2800100zcog
@@ -1820,6 +2031,11 @@ configs/z8f64200100kit
development kit, Z8F6423 part, and the Zilog ZDS-II Windows command line
tools. The development environment is Cygwin under WinXP.
+configs/zp214xpa
+ This port is for the NXP LPC2148 as provided on the The0.net
+ ZPA213X/4XPA development board. Includes support for the
+ UG-2864AMBAG01 OLED also from The0.net
+
Configuring NuttX
^^^^^^^^^^^^^^^^^
@@ -1839,16 +2055,24 @@ tools/configure.sh
There is a script that automates these steps. The following steps will
accomplish the same configuration:
- cd tools
- ./configure.sh <board-name>/<config-dir>
+ cd tools
+ ./configure.sh <board-name>/<config-dir>
-And if configs/<board-name>/<config-dir>/appconfig exists and your
-application directory is not in the standard loction (../apps), then
-you should also specify the location of the application directory on the
-command line like:
-
- cd tools
- ./configure.sh -a <app-dir> <board-name>/<config-dir>
+ There is an alternative Windows batch file that can be used in the
+ windows native enironment like:
+
+ cd ${TOPDIR}\tools
+ configure.bat <board-name>\<config-dir>
+
+ See tools/README.txt for more information about these scripts.
+
+ And if configs/<board-name>/<config-dir>/appconfig exists and your
+ application directory is not in the standard loction (../apps), then
+ you should also specify the location of the application directory on the
+ command line like:
+
+ cd tools
+ ./configure.sh -a <app-dir> <board-name>/<config-dir>
Building Symbol Tables
^^^^^^^^^^^^^^^^^^^^^^
diff --git a/nuttx/configs/px4fmu/common/Make.defs b/nuttx/configs/px4fmu/common/Make.defs
index ff2e4c5fa..756286ccb 100644
--- a/nuttx/configs/px4fmu/common/Make.defs
+++ b/nuttx/configs/px4fmu/common/Make.defs
@@ -39,12 +39,15 @@
# Make.defs in the per-config directories.
#
+include ${TOPDIR}/tools/Config.mk
+
#
# We only support building with the ARM bare-metal toolchain from
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
#
+CONFIG_ARMV7M_TOOLCHAIN := GNU_EABI
-CROSSDEV = arm-none-eabi-
+include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
@@ -76,7 +79,7 @@ LDSCRIPT = ld.script
ifeq ($(WINTOOL),y)
# Windows-native toolchains
- DIRLINK = $(TOPDIR)/tools/winlink.sh
+ DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
@@ -85,7 +88,7 @@ ifeq ($(WINTOOL),y)
else
ifeq ($(PX4_WINTOOL),y)
# Windows-native toolchains (MSYS)
- DIRLINK = $(TOPDIR)/tools/winlink.sh
+ DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
@@ -143,8 +146,9 @@ ARCHCWARNINGS = $(ARCHWARNINGS) \
-Wmissing-prototypes \
-Wnested-externs \
-Wunsuffixed-float-constants
-ARCHWARNINGSXX = $(ARCHWARNINGS)
-ARCHDEFINES =
+ARCHWARNINGSXX = $(ARCHWARNINGS) \
+ -Wno-psabi
+ARCHDEFINES =
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
# this seems to be the only way to add linker flags
@@ -166,39 +170,11 @@ OBJEXT = .o
LIBEXT = .a
EXEEXT =
-define PREPROCESS
- @echo "CPP: $1->$2"
- @$(CPP) $(CPPFLAGS) $(abspath $1) -o $2
-endef
-
-define COMPILE
- @echo "CC: $1"
- $(Q)$(CC) -c $(CFLAGS) $(abspath $1) -o $2
-endef
-
-define COMPILEXX
- @echo "CXX: $1"
- $(Q)$(CXX) -c $(CXXFLAGS) $(abspath $1) -o $2
-endef
-
-define ASSEMBLE
- @echo "AS: $1"
- $(Q)$(CC) -c $(AFLAGS) $(abspath $1) -o $2
-endef
# produce partially-linked $1 from files in $2
define PRELINK
@echo "PRELINK: $1"
- @$(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1
-endef
-
-define ARCHIVE
- echo "AR: $2"; \
- $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
-endef
-
-define CLEAN
- @rm -f *.o *.a
+ $(Q) $(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1
endef
HOSTCC = gcc
diff --git a/nuttx/configs/px4fmu/nsh/appconfig b/nuttx/configs/px4fmu/nsh/appconfig
index a6594a3e1..653f97de1 100644
--- a/nuttx/configs/px4fmu/nsh/appconfig
+++ b/nuttx/configs/px4fmu/nsh/appconfig
@@ -45,6 +45,16 @@ CONFIGURED_APPS += system/readline
CONFIGURED_APPS += systemlib
CONFIGURED_APPS += systemlib/mixer
+# Math library
+CONFIGURED_APPS += mathlib
+CONFIGURED_APPS += mathlib/CMSIS
+CONFIGURED_APPS += examples/math_demo
+
+# Control library
+CONFIGURED_APPS += controllib
+CONFIGURED_APPS += examples/control_demo
+CONFIGURED_APPS += examples/kalman_demo
+
# System utility commands
CONFIGURED_APPS += systemcmds/reboot
CONFIGURED_APPS += systemcmds/perf
@@ -55,7 +65,7 @@ CONFIGURED_APPS += systemcmds/eeprom
CONFIGURED_APPS += systemcmds/param
CONFIGURED_APPS += systemcmds/bl_update
CONFIGURED_APPS += systemcmds/preflight_check
-#CONFIGURED_APPS += systemcmds/calibration
+CONFIGURED_APPS += systemcmds/delay_test
# Tutorial code from
# https://pixhawk.ethz.ch/px4/dev/hello_sky
@@ -69,6 +79,7 @@ CONFIGURED_APPS += systemcmds/preflight_check
CONFIGURED_APPS += uORB
CONFIGURED_APPS += mavlink
+CONFIGURED_APPS += mavlink_onboard
CONFIGURED_APPS += gps
CONFIGURED_APPS += commander
CONFIGURED_APPS += sdlog
@@ -98,7 +109,9 @@ CONFIGURED_APPS += drivers/l3gd20
CONFIGURED_APPS += drivers/px4io
CONFIGURED_APPS += drivers/stm32
CONFIGURED_APPS += drivers/led
+CONFIGURED_APPS += drivers/blinkm
CONFIGURED_APPS += drivers/stm32/tone_alarm
+CONFIGURED_APPS += drivers/stm32/adc
CONFIGURED_APPS += drivers/px4fmu
CONFIGURED_APPS += drivers/hil
diff --git a/nuttx/configs/px4fmu/nsh/defconfig b/nuttx/configs/px4fmu/nsh/defconfig
index 9d61cae5b..696d19a6c 100755
--- a/nuttx/configs/px4fmu/nsh/defconfig
+++ b/nuttx/configs/px4fmu/nsh/defconfig
@@ -189,9 +189,10 @@ CONFIG_STM32_TIM1=n
CONFIG_STM32_TIM8=n
CONFIG_STM32_USART1=y
CONFIG_STM32_USART6=y
-CONFIG_STM32_ADC1=n
+# We use our own driver, but leave this on.
+CONFIG_STM32_ADC1=y
CONFIG_STM32_ADC2=n
-CONFIG_STM32_ADC3=y
+CONFIG_STM32_ADC3=n
CONFIG_STM32_SDIO=n
CONFIG_STM32_SPI1=y
CONFIG_STM32_SYSCFG=y
@@ -199,6 +200,10 @@ CONFIG_STM32_TIM9=y
CONFIG_STM32_TIM10=y
CONFIG_STM32_TIM11=y
+#
+# We want the flash prefetch on for max performance.
+#
+STM32_FLASH_PREFETCH=y
#
# Enable the MTD driver for the onboard I2C EEPROM
@@ -245,18 +250,18 @@ CONFIG_USART6_SERIAL_CONSOLE=n
#Mavlink messages can be bigger than 128
CONFIG_USART1_TXBUFSIZE=512
-CONFIG_USART2_TXBUFSIZE=128
-CONFIG_USART3_TXBUFSIZE=128
-CONFIG_UART4_TXBUFSIZE=128
-CONFIG_UART5_TXBUFSIZE=64
+CONFIG_USART2_TXBUFSIZE=256
+CONFIG_USART3_TXBUFSIZE=256
+CONFIG_UART4_TXBUFSIZE=256
+CONFIG_UART5_TXBUFSIZE=256
CONFIG_USART6_TXBUFSIZE=128
CONFIG_USART1_RXBUFSIZE=512
-CONFIG_USART2_RXBUFSIZE=128
-CONFIG_USART3_RXBUFSIZE=128
-CONFIG_UART4_RXBUFSIZE=128
-CONFIG_UART5_RXBUFSIZE=128
-CONFIG_USART6_RXBUFSIZE=128
+CONFIG_USART2_RXBUFSIZE=256
+CONFIG_USART3_RXBUFSIZE=256
+CONFIG_UART4_RXBUFSIZE=256
+CONFIG_UART5_RXBUFSIZE=256
+CONFIG_USART6_RXBUFSIZE=256
CONFIG_USART1_BAUD=57600
CONFIG_USART2_BAUD=115200
@@ -343,13 +348,8 @@ CONFIG_CAN_LOOPBACK=n
CONFIG_CAN1_BAUD=700000
CONFIG_CAN2_BAUD=700000
-#
-# I2C configuration
-#
-CONFIG_I2C=y
-CONFIG_I2C_POLLED=y
-CONFIG_I2C_TRANSFER=y
-CONFIG_I2C_TRACE=n
+
+# XXX remove after integration testing
# Allow 180 us per byte, a wide margin for the 400 KHz clock we're using
# e.g. 9.6 ms for an EEPROM page write, 0.9 ms for a MAG update
CONFIG_STM32_I2CTIMEOUS_PER_BYTE=200
@@ -359,25 +359,40 @@ CONFIG_STM32_I2CTIMEOUS_START_STOP=700
CONFIG_I2C_WRITEREAD=y
#
-# ADC configuration
-#
-# Enable ADC driver support.
-#
-# CONFIG_ADC=y : Enable the generic ADC infrastructure
-# CONFIG_STM32_TIM1_ADC=y : Indicate that timer 1 will be used to trigger an ADC
-# CONFIG_STM32_TIM1_ADC3=y : Assign timer 1 to drive ADC3 sampling
-# CONFIG_STM32_ADC3_SAMPLE_FREQUENCY=100 : Select a sampling frequency
-#
-CONFIG_ADC=y
-CONFIG_STM32_TIM4_ADC3=y
-# select sample frequency 1^=1.5Msamples/second
-# 65535^=10samples/second 16bit-timer runs at 84/128 MHz
-CONFIG_STM32_ADC3_SAMPLE_FREQUENCY=6000
-# select timer channel 0=CC1,...,3=CC4
-CONFIG_STM32_ADC3_TIMTRIG=3
-CONFIG_ADC_DMA=y
-# only 4 places usable!
-CONFIG_ADC_FIFOSIZE=5
+# I2C configuration
+#
+CONFIG_I2C=y
+CONFIG_I2C_POLLED=y
+CONFIG_I2C_TRANSFER=y
+CONFIG_I2C_TRACE=n
+CONFIG_I2C_RESET=y
+
+
+
+# XXX re-enable after integration testing
+
+#
+# I2C configuration
+#
+#CONFIG_I2C=y
+#CONFIG_I2C_POLLED=y
+#CONFIG_I2C_TRANSFER=y
+#CONFIG_I2C_TRACE=n
+#CONFIG_I2C_RESET=y
+
+# Dynamic timeout
+#CONFIG_STM32_I2C_DYNTIMEO=y
+#CONFIG_STM32_I2C_DYNTIMEO_STARTSTOP=500
+#CONFIG_STM32_I2C_DYNTIMEO_USECPERBYTE=200
+
+# Fixed per-transaction timeout
+#CONFIG_STM32_I2CTIMEOSEC=0
+#CONFIG_STM32_I2CTIMEOMS=10
+
+
+
+
+
#
# General build options
@@ -692,7 +707,7 @@ CONFIG_ARCH_BZERO=n
CONFIG_MAX_TASKS=32
CONFIG_MAX_TASK_ARGS=8
CONFIG_NPTHREAD_KEYS=4
-CONFIG_NFILE_DESCRIPTORS=25
+CONFIG_NFILE_DESCRIPTORS=32
CONFIG_NFILE_STREAMS=25
CONFIG_NAME_MAX=32
CONFIG_STDIO_BUFFER_SIZE=256
@@ -767,6 +782,8 @@ CONFIG_FS_ROMFS=y
# CONFIG_MMCSD_SPICLOCK - Maximum SPI clock to drive MMC/SD card.
# Default is 20MHz, current setting 24 MHz
#
+CONFIG_MMCSD=y
+CONFIG_MMCSD_SPI=y
CONFIG_MMCSD_NSLOTS=1
CONFIG_MMCSD_READONLY=n
CONFIG_MMCSD_SPICLOCK=24000000
@@ -953,6 +970,7 @@ CONFIG_CDCACM_PRODUCTSTR="PX4 FMU v1.6"
# CONFIG_NSH_FATNSECTORS - FAT FS number of sectors
# CONFIG_NSH_FATMOUNTPT - FAT FS mountpoint
#
+CONFIG_BUILTIN=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_STRERROR=y
@@ -1028,3 +1046,6 @@ CONFIG_PTHREAD_STACK_MIN=512
CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=
+
+# enable bindir
+CONFIG_APPS_BINDIR=y
diff --git a/nuttx/configs/px4fmu/src/Makefile b/nuttx/configs/px4fmu/src/Makefile
index c3d6bf543..d4276f7fc 100644
--- a/nuttx/configs/px4fmu/src/Makefile
+++ b/nuttx/configs/px4fmu/src/Makefile
@@ -64,23 +64,21 @@ $(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
libboard$(LIBEXT): $(OBJS)
- @( for obj in $(OBJS) ; do \
- $(call ARCHIVE, $@, $${obj}); \
- done ; )
- touch $@
+ $(call ARCHIVE, $@, $(OBJS))
.depend: Makefile $(SRCS)
- @$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
- @touch $@
+ $(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
+ $(Q) touch $@
depend: .depend
clean:
- @rm -f libboard$(LIBEXT) *~ .*.swp
+ $(call DELFILE, libboard$(LIBEXT))
$(call CLEAN)
distclean: clean
- @rm -f Make.dep .depend
+ $(call DELFILE, Make.dep)
+ $(call DELFILE, .depend)
-include Make.dep
diff --git a/nuttx/configs/px4io/common/Make.defs b/nuttx/configs/px4io/common/Make.defs
index a3996a9ed..4958f7092 100644
--- a/nuttx/configs/px4io/common/Make.defs
+++ b/nuttx/configs/px4io/common/Make.defs
@@ -39,12 +39,15 @@
# Make.defs in the per-config directories.
#
+include ${TOPDIR}/tools/Config.mk
+
#
# We only support building with the ARM bare-metal toolchain from
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
#
+CONFIG_ARMV7M_TOOLCHAIN := GNU_EABI
-CROSSDEV = arm-none-eabi-
+include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
@@ -69,7 +72,7 @@ LDSCRIPT = ld.script
ifeq ($(WINTOOL),y)
# Windows-native toolchains
- DIRLINK = $(TOPDIR)/tools/winlink.sh
+ DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
@@ -78,7 +81,7 @@ ifeq ($(WINTOOL),y)
else
ifeq ($(PX4_WINTOOL),y)
# Windows-native toolchains (MSYS)
- DIRLINK = $(TOPDIR)/tools/winlink.sh
+ DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
@@ -160,46 +163,10 @@ OBJEXT = .o
LIBEXT = .a
EXEEXT =
-# If VERBOSE is set, don't hide the compiler invocations.
-ifeq ($(VERBOSE),YES)
-_v =
-else
-_v = @
-endif
-
-define PREPROCESS
- @echo "CPP: $1->$2"
- @$(CPP) $(CPPFLAGS) $(abspath $1) -o $2
-endef
-
-define COMPILE
- @echo "CC: $1"
- $(_v)$(CC) -c $(CFLAGS) $(abspath $1) -o $2
-endef
-
-define COMPILEXX
- @echo "CXX: $1"
- $(_v)$(CXX) -c $(CXXFLAGS) $(abspath $1) -o $2
-endef
-
-define ASSEMBLE
- @echo "AS: $1"
- $(_v)$(CC) -c $(AFLAGS) $(abspath $1) -o $2
-endef
-
# produce partially-linked $1 from files in $2
define PRELINK
@echo "PRELINK: $1"
- @$(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1
-endef
-
-define ARCHIVE
- echo "AR: $2"; \
- $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
-endef
-
-define CLEAN
- @rm -f *.o *.a
+ $(Q) $(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1
endef
HOSTCC = gcc
diff --git a/nuttx/configs/px4io/common/ld.script b/nuttx/configs/px4io/common/ld.script
index 17f816acf..69c2f9cb2 100755
--- a/nuttx/configs/px4io/common/ld.script
+++ b/nuttx/configs/px4io/common/ld.script
@@ -74,6 +74,15 @@ SECTIONS
_etext = ABSOLUTE(.);
} > flash
+ /*
+ * Init functions (static constructors and the like)
+ */
+ .init_section : {
+ _sinit = ABSOLUTE(.);
+ KEEP(*(.init_array .init_array.*))
+ _einit = ABSOLUTE(.);
+ } > flash
+
.ARM.extab : {
*(.ARM.extab*)
} > flash
diff --git a/nuttx/configs/px4io/include/board.h b/nuttx/configs/px4io/include/board.h
index e9181baf1..d941985b4 100755
--- a/nuttx/configs/px4io/include/board.h
+++ b/nuttx/configs/px4io/include/board.h
@@ -96,6 +96,18 @@
#define STM32_APB1_TIM3_CLKIN (STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM4_CLKIN (STM32_PCLK1_FREQUENCY)
+/*
+ * Some of the USART pins are not available; override the GPIO
+ * definitions with an invalid pin configuration.
+ */
+#define GPIO_USART2_CTS 0xffffffff
+#define GPIO_USART2_RTS 0xffffffff
+#define GPIO_USART2_CK 0xffffffff
+#define GPIO_USART3_TX 0xffffffff
+#define GPIO_USART3_CK 0xffffffff
+#define GPIO_USART3_CTS 0xffffffff
+#define GPIO_USART3_RTS 0xffffffff
+
/*
* High-resolution timer
*/
diff --git a/nuttx/configs/px4io/io/appconfig b/nuttx/configs/px4io/io/appconfig
index 21a6fbacf..628607a51 100644
--- a/nuttx/configs/px4io/io/appconfig
+++ b/nuttx/configs/px4io/io/appconfig
@@ -35,3 +35,6 @@ CONFIGURED_APPS += drivers/boards/px4io
CONFIGURED_APPS += drivers/stm32
CONFIGURED_APPS += px4io
+
+# Mixer library from systemlib
+CONFIGURED_APPS += systemlib/mixer
diff --git a/nuttx/configs/px4io/io/defconfig b/nuttx/configs/px4io/io/defconfig
index e90e7ce62..30ec5be08 100755
--- a/nuttx/configs/px4io/io/defconfig
+++ b/nuttx/configs/px4io/io/defconfig
@@ -87,6 +87,8 @@ CONFIG_ARCH_LEDS=n
CONFIG_ARCH_BUTTONS=n
CONFIG_ARCH_CALIBRATION=n
CONFIG_ARCH_DMA=n
+CONFIG_ARCH_MATH_H=y
+
CONFIG_ARMV7M_CMNVECTOR=y
#
@@ -124,13 +126,14 @@ CONFIG_STM32_TIM7=n
CONFIG_STM32_WWDG=n
CONFIG_STM32_SPI2=n
CONFIG_STM32_USART2=y
-CONFIG_STM32_USART3=n
+CONFIG_STM32_USART3=y
CONFIG_STM32_I2C1=y
CONFIG_STM32_I2C2=n
CONFIG_STM32_BKP=n
CONFIG_STM32_PWR=n
CONFIG_STM32_DAC=n
# APB2:
+# We use our own ADC driver, but leave this on for clocking purposes.
CONFIG_STM32_ADC1=y
CONFIG_STM32_ADC2=n
# TIM1 is owned by the HRT
@@ -161,13 +164,13 @@ CONFIG_USART1_SERIAL_CONSOLE=y
CONFIG_USART2_SERIAL_CONSOLE=n
CONFIG_USART3_SERIAL_CONSOLE=n
-CONFIG_USART1_TXBUFSIZE=32
-CONFIG_USART2_TXBUFSIZE=32
-CONFIG_USART3_TXBUFSIZE=32
+CONFIG_USART1_TXBUFSIZE=64
+CONFIG_USART2_TXBUFSIZE=64
+CONFIG_USART3_TXBUFSIZE=64
CONFIG_USART1_RXBUFSIZE=64
-CONFIG_USART2_RXBUFSIZE=128
-CONFIG_USART3_RXBUFSIZE=32
+CONFIG_USART2_RXBUFSIZE=64
+CONFIG_USART3_RXBUFSIZE=64
CONFIG_USART1_BAUD=115200
CONFIG_USART2_BAUD=115200
@@ -341,26 +344,28 @@ CONFIG_DEBUG_CAN=n
CONFIG_DEBUG_I2C=n
CONFIG_DEBUG_INPUT=n
-CONFIG_HAVE_CXX=n
-CONFIG_HAVE_CXXINITIALIZE=n
+CONFIG_MSEC_PER_TICK=1
+CONFIG_HAVE_CXX=y
+CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_MM_REGIONS=1
CONFIG_MM_SMALL=y
CONFIG_ARCH_LOWPUTC=y
-CONFIG_RR_INTERVAL=200
+CONFIG_RR_INTERVAL=0
CONFIG_SCHED_INSTRUMENTATION=n
-CONFIG_TASK_NAME_SIZE=0
+CONFIG_TASK_NAME_SIZE=8
CONFIG_START_YEAR=1970
CONFIG_START_MONTH=1
CONFIG_START_DAY=1
CONFIG_GREGORIAN_TIME=n
CONFIG_JULIAN_TIME=n
+# this eats ~1KiB of RAM ... work out why
CONFIG_DEV_CONSOLE=y
CONFIG_DEV_LOWCONSOLE=n
CONFIG_MUTEX_TYPES=n
CONFIG_PRIORITY_INHERITANCE=n
CONFIG_SEM_PREALLOCHOLDERS=0
CONFIG_SEM_NNESTPRIO=0
-CONFIG_FDCLONE_DISABLE=n
+CONFIG_FDCLONE_DISABLE=y
CONFIG_FDCLONE_STDIO=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_SCHED_WORKQUEUE=n
@@ -469,7 +474,7 @@ CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=0
CONFIG_NAME_MAX=32
-CONFIG_STDIO_BUFFER_SIZE=64
+CONFIG_STDIO_BUFFER_SIZE=32
CONFIG_STDIO_LINEBUFFER=n
CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=4
diff --git a/nuttx/configs/px4io/src/Makefile b/nuttx/configs/px4io/src/Makefile
index 144fa8549..bb9539d16 100644
--- a/nuttx/configs/px4io/src/Makefile
+++ b/nuttx/configs/px4io/src/Makefile
@@ -65,9 +65,7 @@ $(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
libboard$(LIBEXT): $(OBJS)
- @( for obj in $(OBJS) ; do \
- $(call ARCHIVE, $@, $${obj}); \
- done ; )
+ $(call ARCHIVE, $@, $(OBJS))
.depend: Makefile $(SRCS)
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@@ -76,10 +74,11 @@ libboard$(LIBEXT): $(OBJS)
depend: .depend
clean:
- @rm -f libboard$(LIBEXT) *~ .*.swp
+ $(call DELFILE, libboard$(LIBEXT))
$(call CLEAN)
distclean: clean
- @rm -f Make.dep .depend
+ $(call DELFILE, Make.dep)
+ $(call DELFILE, .depend)
-include Make.dep