diff --git a/.cproject b/.cproject
deleted file mode 100644
index b0c8d5a9dd..0000000000
--- a/.cproject
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- make
- all
- true
- true
- true
-
-
- make
-
- clean
- true
- true
- true
-
-
- make
-
- distclean
- true
- true
- true
-
-
- make
-
- upload
- true
- true
- true
-
-
- make
-
- install
- true
- true
- true
-
-
-
-
diff --git a/.gitignore b/.gitignore
index 8d468a56da..40957d3fb8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,8 @@
.depend
.config
.version
+.project
+.cproject
apps/namedapp/namedapp_list.h
apps/namedapp/namedapp_proto.h
Make.dep
@@ -35,3 +37,4 @@ Firmware.sublime-workspace
.DS_Store
nsh_romfsimg.h
cscope.out
+.configX-e
diff --git a/.project b/.project
deleted file mode 100644
index 62e37139e4..0000000000
--- a/.project
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
- PX4 Firmware
-
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.genmakebuilder
- clean,full,incremental,
-
-
- ?name?
-
-
-
- org.eclipse.cdt.make.core.append_environment
- true
-
-
- org.eclipse.cdt.make.core.autoBuildTarget
- all
-
-
- org.eclipse.cdt.make.core.buildArguments
-
-
-
- org.eclipse.cdt.make.core.buildCommand
- make
-
-
- org.eclipse.cdt.make.core.cleanBuildTarget
- clean
-
-
- org.eclipse.cdt.make.core.contents
- org.eclipse.cdt.make.core.activeConfigSettings
-
-
- org.eclipse.cdt.make.core.enableAutoBuild
- false
-
-
- org.eclipse.cdt.make.core.enableCleanBuild
- true
-
-
- org.eclipse.cdt.make.core.enableFullBuild
- true
-
-
- org.eclipse.cdt.make.core.fullBuildTarget
- all
-
-
- org.eclipse.cdt.make.core.stopOnError
- true
-
-
- org.eclipse.cdt.make.core.useDefaultBuildCmd
- true
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
- full,incremental,
-
-
-
-
-
- org.eclipse.cdt.core.cnature
- org.eclipse.cdt.core.ccnature
- org.eclipse.cdt.managedbuilder.core.managedBuildNature
- org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
-
-
-
- 1344101890673
-
- 6
-
- org.eclipse.ui.ide.multiFilter
- 1.0-name-matches-false-false-*.o
-
-
-
- 1344101890683
-
- 6
-
- org.eclipse.ui.ide.multiFilter
- 1.0-name-matches-false-false-.dep
-
-
-
- 1344101890687
-
- 6
-
- org.eclipse.ui.ide.multiFilter
- 1.0-name-matches-false-false-.context
-
-
-
- 1344101890691
-
- 6
-
- org.eclipse.ui.ide.multiFilter
- 1.0-name-matches-false-false-.depend
-
-
-
- 1344101890695
-
- 6
-
- org.eclipse.ui.ide.multiFilter
- 1.0-name-matches-false-false-.built
-
-
-
- 1344101890698
-
- 6
-
- org.eclipse.ui.ide.multiFilter
- 1.0-name-matches-false-false-*.a
-
-
-
-
diff --git a/Tools/px_uploader.py b/Tools/px_uploader.py
index dfb53980a9..7dbd1802bb 100755
--- a/Tools/px_uploader.py
+++ b/Tools/px_uploader.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
############################################################################
#
# Copyright (C) 2012 PX4 Development Team. All rights reserved.
@@ -148,16 +149,16 @@ class uploader(object):
+ uploader.EOC)
self.__getSync()
- def __trySync(self):
- c = self.__recv()
- if (c != self.INSYNC):
- #print("unexpected 0x%x instead of INSYNC" % ord(c))
- return False;
- c = self.__recv()
- if (c != self.OK):
- #print("unexpected 0x%x instead of OK" % ord(c))
- return False
- return True
+# def __trySync(self):
+# c = self.__recv()
+# if (c != self.INSYNC):
+# #print("unexpected 0x%x instead of INSYNC" % ord(c))
+# return False;
+# c = self.__recv()
+# if (c != self.OK):
+# #print("unexpected 0x%x instead of OK" % ord(c))
+# return False
+# return True
# send the GET_DEVICE command and wait for an info parameter
def __getInfo(self, param):
@@ -196,6 +197,7 @@ class uploader(object):
self.__send(uploader.READ_MULTI
+ chr(len(data))
+ uploader.EOC)
+ self.port.flush()
programmed = self.__recv(len(data))
if (programmed != data):
print("got " + binascii.hexlify(programmed))
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
old mode 100755
new mode 100644
index 5b75f40ed6..7650b0ff4a
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -305,3 +305,28 @@
netutils/webserver/httpd_fsdata.c has been replaced with a dynamically
built configuration located at apps/examples/uip (Contributed by
Max Holtzberg).
+ * apps/netutils/webserver: Several inenhancements from Kate including the
+ ability to elide scripting and SERVER headers and the ability to map
+ files into memory before transferring them.
+ * apps/netutils/webserver: Add ability to map a URL to CGI function.
+ Contributed by Kate.
+ * apps/nshlib/nsh_mntcmds.c: The changes of 6.21 introduced holes in the
+ error handling: Now the number of arguments to mount can be 0 or 4.
+ Additional parameter checking is required to prevent mysterious errors
+ (submiteed by Kate).
+ * apps/netutils/webserver/httpd_mmap.c: Fix errors when the mmap()
+ length is zero (submitted by Kate).
+ * apps/netutils/webserver/httpd_sendfile.c: Add and option,
+ CONFIG_NETUTILS_HTTPD_SENDFILE to transfer files using the NuttX
+ sendfile() interface.
+ * apps/netutils/discover: A UDP network discovery utility contributed
+ by Max Holtzberg.
+ * apps/examples/discover: A test example for the UDP network discovery
+ utility (also contribed by Max Holtzberg).
+ * apps/examples/*/main.c: Too many files called main.c. Each renamed
+ to something unique so that they will not collide in the archive.
+ * apps/netutils/xmlrpc: The Embeddable Lightweight XML-RPC Server
+ discussed at http://www.drdobbs.com/web-development/\
+ an-embeddable-lightweight-xml-rpc-server/184405364. Contributed by
+ Max Holtzberg.
+
diff --git a/apps/Make.defs b/apps/Make.defs
index f37a654c47..53ac7f8be5 100644
--- a/apps/Make.defs
+++ b/apps/Make.defs
@@ -3,7 +3,7 @@
# Common make definitions provided to all applications
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/commander/commander.c b/apps/commander/commander.c
index d551bffcc1..c8564792f8 100644
--- a/apps/commander/commander.c
+++ b/apps/commander/commander.c
@@ -453,15 +453,15 @@ void do_mag_calibration(int status_pub, struct vehicle_status_s *status)
// sprintf(offset_output, "[commander] mag cal: %8.4f %8.4f %8.4f", (double)mag_offset[0], (double)mag_offset[1], (double)mag_offset[2]);
// mavlink_log_info(mavlink_fd, offset_output);
- if (param_set(param_find("SENSOR_MAG_XOFF"), &(mag_offset[0]))) {
+ if (param_set(param_find("SENS_MAG_XOFF"), &(mag_offset[0]))) {
fprintf(stderr, "[commander] Setting X mag offset failed!\n");
}
- if (param_set(param_find("SENSOR_MAG_YOFF"), &(mag_offset[1]))) {
+ if (param_set(param_find("SENS_MAG_YOFF"), &(mag_offset[1]))) {
fprintf(stderr, "[commander] Setting Y mag offset failed!\n");
}
- if (param_set(param_find("SENSOR_MAG_ZOFF"), &(mag_offset[2]))) {
+ if (param_set(param_find("SENS_MAG_ZOFF"), &(mag_offset[2]))) {
fprintf(stderr, "[commander] Setting Z mag offset failed!\n");
}
}
@@ -540,15 +540,15 @@ void do_gyro_calibration(int status_pub, struct vehicle_status_s *status)
gyro_offset[1] = gyro_offset[1] / calibration_count;
gyro_offset[2] = gyro_offset[2] / calibration_count;
- if (param_set(param_find("SENSOR_GYRO_XOFF"), &(gyro_offset[0]))) {
+ if (param_set(param_find("SENS_GYRO_XOFF"), &(gyro_offset[0]))) {
mavlink_log_critical(mavlink_fd, "[commander] Setting X gyro offset failed!");
}
- if (param_set(param_find("SENSOR_GYRO_YOFF"), &(gyro_offset[1]))) {
+ if (param_set(param_find("SENS_GYRO_YOFF"), &(gyro_offset[1]))) {
mavlink_log_critical(mavlink_fd, "[commander] Setting Y gyro offset failed!");
}
- if (param_set(param_find("SENSOR_GYRO_ZOFF"), &(gyro_offset[2]))) {
+ if (param_set(param_find("SENS_GYRO_ZOFF"), &(gyro_offset[2]))) {
mavlink_log_critical(mavlink_fd, "[commander] Setting Z gyro offset failed!");
}
diff --git a/apps/drivers/hmc5883/hmc5883.cpp b/apps/drivers/hmc5883/hmc5883.cpp
index da3b837771..c0a5f4049a 100644
--- a/apps/drivers/hmc5883/hmc5883.cpp
+++ b/apps/drivers/hmc5883/hmc5883.cpp
@@ -527,13 +527,13 @@ HMC5883::start()
_oldest_report = _next_report = 0;
/* schedule a cycle to start things */
- work_queue(&_work, (worker_t)&HMC5883::cycle_trampoline, this, 1);
+ work_queue(HPWORK, &_work, (worker_t)&HMC5883::cycle_trampoline, this, 1);
}
void
HMC5883::stop()
{
- work_cancel(&_work);
+ work_cancel(HPWORK, &_work);
}
void
@@ -567,7 +567,8 @@ HMC5883::cycle()
if (_measure_ticks > USEC2TICK(HMC5883_CONVERSION_INTERVAL)) {
/* schedule a fresh cycle call when we are ready to measure again */
- work_queue(&_work,
+ work_queue(HPWORK,
+ &_work,
(worker_t)&HMC5883::cycle_trampoline,
this,
_measure_ticks - USEC2TICK(HMC5883_CONVERSION_INTERVAL));
@@ -584,7 +585,8 @@ HMC5883::cycle()
_collect_phase = true;
/* schedule a fresh cycle call when the measurement is done */
- work_queue(&_work,
+ work_queue(HPWORK,
+ &_work,
(worker_t)&HMC5883::cycle_trampoline,
this,
USEC2TICK(HMC5883_CONVERSION_INTERVAL));
diff --git a/apps/drivers/ms5611/ms5611.cpp b/apps/drivers/ms5611/ms5611.cpp
index 7a5c48716f..4df9de94c2 100644
--- a/apps/drivers/ms5611/ms5611.cpp
+++ b/apps/drivers/ms5611/ms5611.cpp
@@ -541,13 +541,13 @@ MS5611::start()
_oldest_report = _next_report = 0;
/* schedule a cycle to start things */
- work_queue(&_work, (worker_t)&MS5611::cycle_trampoline, this, 1);
+ work_queue(HPWORK, &_work, (worker_t)&MS5611::cycle_trampoline, this, 1);
}
void
MS5611::stop()
{
- work_cancel(&_work);
+ work_cancel(HPWORK, &_work);
}
void
@@ -585,7 +585,8 @@ MS5611::cycle()
(_measure_ticks > USEC2TICK(MS5611_CONVERSION_INTERVAL))) {
/* schedule a fresh cycle call when we are ready to measure again */
- work_queue(&_work,
+ work_queue(HPWORK,
+ &_work,
(worker_t)&MS5611::cycle_trampoline,
this,
_measure_ticks - USEC2TICK(MS5611_CONVERSION_INTERVAL));
@@ -602,7 +603,8 @@ MS5611::cycle()
_collect_phase = true;
/* schedule a fresh cycle call when the measurement is done */
- work_queue(&_work,
+ work_queue(HPWORK,
+ &_work,
(worker_t)&MS5611::cycle_trampoline,
this,
USEC2TICK(MS5611_CONVERSION_INTERVAL));
@@ -713,30 +715,30 @@ MS5611::collect()
* double precision: ms5611_read: 992 events, 258641us elapsed, min 202us max 305us
* single precision: ms5611_read: 963 events, 208066us elapsed, min 202us max 241us
*/
+#if 0/* USE_FLOAT */
+ /* tropospheric properties (0-11km) for standard atmosphere */
+ const float T1 = 15.0f + 273.15f; /* temperature at base height in Kelvin */
+ const float a = -6.5f / 1000f; /* temperature gradient in degrees per metre */
+ const float g = 9.80665f; /* gravity constant in m/s/s */
+ const float R = 287.05f; /* ideal gas constant in J/kg/K */
- // /* tropospheric properties (0-11km) for standard atmosphere */
- // const float T1 = 15.0f + 273.15f; /* temperature at base height in Kelvin */
- // const float a = -6.5f / 1000f; /* temperature gradient in degrees per metre */
- // const float g = 9.80665f; /* gravity constant in m/s/s */
- // const float R = 287.05f; /* ideal gas constant in J/kg/K */
+ /* current pressure at MSL in kPa */
+ float p1 = _msl_pressure / 1000.0f;
- // /* current pressure at MSL in kPa */
- // float p1 = _msl_pressure / 1000.0f;
-
- // /* measured pressure in kPa */
- // float p = P / 1000.0f;
-
- // /*
- // * Solve:
- // *
- // * / -(aR / g) \
- // * | (p / p1) . T1 | - T1
- // * \ /
- // * h = ------------------------------- + h1
- // * a
- // */
- // _reports[_next_report].altitude = (((powf((p / p1), (-(a * R) / g))) * T1) - T1) / a;
+ /* measured pressure in kPa */
+ float p = P / 1000.0f;
+ /*
+ * Solve:
+ *
+ * / -(aR / g) \
+ * | (p / p1) . T1 | - T1
+ * \ /
+ * h = ------------------------------- + h1
+ * a
+ */
+ _reports[_next_report].altitude = (((powf((p / p1), (-(a * R) / g))) * T1) - T1) / a;
+#else
/* tropospheric properties (0-11km) for standard atmosphere */
const double T1 = 15.0 + 273.15; /* temperature at base height in Kelvin */
const double a = -6.5 / 1000; /* temperature gradient in degrees per metre */
@@ -759,7 +761,7 @@ MS5611::collect()
* a
*/
_reports[_next_report].altitude = (((pow((p / p1), (-(a * R) / g))) * T1) - T1) / a;
-
+#endif
/* publish it */
orb_publish(ORB_ID(sensor_baro), _baro_topic, &_reports[_next_report]);
diff --git a/apps/examples/Kconfig b/apps/examples/Kconfig
index a20f7c2e77..865268addb 100644
--- a/apps/examples/Kconfig
+++ b/apps/examples/Kconfig
@@ -3,115 +3,115 @@
# see misc/tools/kconfig-language.txt.
#
-menu "ADC example"
+menu "ADC Example"
source "$APPSDIR/examples/adc/Kconfig"
endmenu
-menu "Buttons example"
+menu "Buttons Example"
source "$APPSDIR/examples/buttons/Kconfig"
endmenu
-menu "CAN example"
+menu "CAN Example"
source "$APPSDIR/examples/can/Kconfig"
endmenu
-menu "USB CDC/ACM class driver example"
+menu "USB CDC/ACM Class Driver Example"
source "$APPSDIR/examples/cdcacm/Kconfig"
endmenu
-menu "USB composite class driver example"
+menu "USB composite Class Driver Example"
source "$APPSDIR/examples/composite/Kconfig"
endmenu
-menu "DHCP server example"
+menu "DHCP Server Example"
source "$APPSDIR/examples/dhcpd/Kconfig"
endmenu
-menu "FTP client example"
+menu "FTP Client Example"
source "$APPSDIR/examples/ftpc/Kconfig"
endmenu
-menu "FTP server example"
+menu "FTP Server Example"
source "$APPSDIR/examples/ftpd/Kconfig"
endmenu
-menu "\"Hello, World!\" example"
+menu "\"Hello, World!\" Example"
source "$APPSDIR/examples/hello/Kconfig"
endmenu
-menu "\"Hello, World!\" C++ example"
+menu "\"Hello, World!\" C++ Example"
source "$APPSDIR/examples/helloxx/Kconfig"
endmenu
-menu "USB HID keyboard example"
+menu "USB HID Keyboard Example"
source "$APPSDIR/examples/hidkbd/Kconfig"
endmenu
-menu "IGMP example"
+menu "IGMP Example"
source "$APPSDIR/examples/igmp/Kconfig"
endmenu
-menu "LCD read/write example"
+menu "LCD Read/Write Example"
source "$APPSDIR/examples/lcdrw/Kconfig"
endmenu
-menu "Memory management example"
+menu "Memory Management Example"
source "$APPSDIR/examples/mm/Kconfig"
endmenu
-menu "File system mount example"
+menu "File System Mount Example"
source "$APPSDIR/examples/mount/Kconfig"
endmenu
-menu "FreeModBus example"
+menu "FreeModBus Example"
source "$APPSDIR/examples/modbus/Kconfig"
endmenu
-menu "Network test example"
+menu "Network Test Example"
source "$APPSDIR/examples/nettest/Kconfig"
endmenu
-menu "NuttShell (NSH) example"
+menu "NuttShell (NSH) Example"
source "$APPSDIR/examples/nsh/Kconfig"
endmenu
-menu "NULL example"
+menu "NULL Example"
source "$APPSDIR/examples/null/Kconfig"
endmenu
-menu "NX graphics example"
+menu "NX Graphics Example"
source "$APPSDIR/examples/nx/Kconfig"
endmenu
-menu "NxConsole example"
+menu "NxConsole Example"
source "$APPSDIR/examples/nxconsole/Kconfig"
endmenu
-menu "NXFFS file system example"
+menu "NXFFS File System Example"
source "$APPSDIR/examples/nxffs/Kconfig"
endmenu
-menu "NXFLAT example"
+menu "NXFLAT Example"
source "$APPSDIR/examples/nxflat/Kconfig"
endmenu
-menu "NX graphics \"Hello, World!\" example"
+menu "NX Graphics \"Hello, World!\" Example"
source "$APPSDIR/examples/nxhello/Kconfig"
endmenu
-menu "NX graphics image example"
+menu "NX Graphics image Example"
source "$APPSDIR/examples/nximage/Kconfig"
endmenu
-menu "NX graphics lines example"
+menu "NX Graphics lines Example"
source "$APPSDIR/examples/nxlines/Kconfig"
endmenu
-menu "NX graphics text example"
+menu "NX Graphics Text Example"
source "$APPSDIR/examples/nxtext/Kconfig"
endmenu
-menu "OS test example"
+menu "OS Test Example"
source "$APPSDIR/examples/ostest/Kconfig"
endmenu
@@ -119,82 +119,90 @@ menu "Pascal \"Hello, World!\"example"
source "$APPSDIR/examples/pashello/Kconfig"
endmenu
-menu "Pipe example"
+menu "Pipe Example"
source "$APPSDIR/examples/pipe/Kconfig"
endmenu
-menu "Poll example"
+menu "Poll Example"
source "$APPSDIR/examples/poll/Kconfig"
endmenu
-menu "Pulse width modulation (PWM) example"
+menu "Pulse Width Modulation (PWM) Example"
source "$APPSDIR/examples/pwm/Kconfig"
endmenu
-menu "Quadrature encoder example"
+menu "Quadrature Encoder Example"
source "$APPSDIR/examples/qencoder/Kconfig"
endmenu
-menu "RGMP example"
+menu "RGMP Example"
source "$APPSDIR/examples/rgmp/Kconfig"
endmenu
-menu "ROMFS example"
+menu "ROMFS Example"
source "$APPSDIR/examples/romfs/Kconfig"
endmenu
-menu "sendmail example"
+menu "sendmail Example"
source "$APPSDIR/examples/sendmail/Kconfig"
endmenu
-menu "Serial loopback example"
+menu "Serial Loopback Example"
source "$APPSDIR/examples/serloop/Kconfig"
endmenu
-menu "Telnet daemon example"
+menu "Telnet Daemon Example"
source "$APPSDIR/examples/telnetd/Kconfig"
endmenu
-menu "THTTPD web server example"
+menu "THTTPD Web Server Example"
source "$APPSDIR/examples/thttpd/Kconfig"
endmenu
-menu "TIFF generation example"
+menu "TIFF Generation Example"
source "$APPSDIR/examples/tiff/Kconfig"
endmenu
-menu "Touchscreen example"
+menu "Touchscreen Example"
source "$APPSDIR/examples/touchscreen/Kconfig"
endmenu
-menu "UDP example"
+menu "UDP Example"
source "$APPSDIR/examples/udp/Kconfig"
endmenu
-menu "uIP web server example"
+menu "UDP Discovery Daemon Example"
+source "$APPSDIR/examples/discover/Kconfig"
+endmenu
+
+menu "uIP Web Server Example"
source "$APPSDIR/examples/uip/Kconfig"
endmenu
-menu "USB serial test example"
+menu "USB Serial Test Example"
source "$APPSDIR/examples/usbserial/Kconfig"
endmenu
-menu "USB mass storage class example"
+menu "USB Mass Storage Class Example"
source "$APPSDIR/examples/usbstorage/Kconfig"
endmenu
-menu "USB serial terminal example"
+menu "USB Serial Terminal Example"
source "$APPSDIR/examples/usbterm/Kconfig"
endmenu
-menu "Watchdog timer example"
+menu "Watchdog timer Example"
source "$APPSDIR/examples/watchdog/Kconfig"
endmenu
-menu "wget example"
+menu "wget Example"
source "$APPSDIR/examples/wget/Kconfig"
endmenu
-menu "WLAN example"
+menu "WLAN Example"
source "$APPSDIR/examples/wlan/Kconfig"
endmenu
+
+menu "XML RPC Example"
+source "$APPSDIR/examples/xmlrpc/Kconfig"
+endmenu
diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs
index aa8d83733b..a6e0ae88e4 100644
--- a/apps/examples/Make.defs
+++ b/apps/examples/Make.defs
@@ -58,6 +58,10 @@ ifeq ($(CONFIG_EXAMPLES_DHCPD),y)
CONFIGURED_APPS += examples/dhcpd
endif
+ifeq ($(CONFIG_EXAMPLE_DISCOVER),y)
+CONFIGURED_APPS += examples/discover
+endif
+
ifeq ($(CONFIG_EXAMPLES_FTPC),y)
CONFIGURED_APPS += examples/ftpc
endif
@@ -221,3 +225,7 @@ endif
ifeq ($(CONFIG_EXAMPLES_WLAN),y)
CONFIGURED_APPS += examples/wlan
endif
+
+ifeq ($(CONFIG_EXAMPLES_XMLRPC),y)
+CONFIGURED_APPS += examples/xmlrpc
+endif
diff --git a/apps/examples/Makefile b/apps/examples/Makefile
index ad5be64978..453f99ce71 100644
--- a/apps/examples/Makefile
+++ b/apps/examples/Makefile
@@ -37,11 +37,12 @@
# Sub-directories
-SUBDIRS = adc buttons can cdcacm composite dhcpd ftpc ftpd hello helloxx \
- hidkbd igmp lcdrw mm modbus mount nettest nsh null nx nxconsole nxffs \
- nxflat nxhello nximage nxlines nxtext ostest pashello pipe poll pwm \
- qencoder rgmp romfs serloop telnetd thttpd tiff touchscreen udp uip \
- usbserial sendmail usbstorage usbterm watchdog wget wlan
+SUBDIRS = adc buttons can cdcacm composite dhcpd discover ftpc ftpd hello
+SUBDIRS += helloxx hidkbd igmp lcdrw mm modbus mount nettest nsh null nx
+SUBDIRS += nxconsole nxffs nxflat nxhello nximage nxlines nxtext ostest
+SUBDIRS += pashello pipe poll pwm qencoder rgmp romfs serloop telnetd
+SUBDIRS += thttpd tiff touchscreen udp uip usbserial sendmail usbstorage
+SUBDIRS += usbterm watchdog wget wlan
# Sub-directories that might need context setup. Directories may need
# context setup for a variety of reasons, but the most common is because
@@ -56,7 +57,8 @@ SUBDIRS = adc buttons can cdcacm composite dhcpd ftpc ftpd hello helloxx \
CNTXTDIRS = pwm
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-CNTXTDIRS += adc can cdcacm composite ftpd dhcpd modbus nettest qencoder telnetd watchdog
+CNTXTDIRS += adc can cdcacm composite discover ftpd dhcpd modbus nettest
+CNTXTDIRS += qencoder telnetd watchdog
endif
ifeq ($(CONFIG_EXAMPLES_HELLO_BUILTIN),y)
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index 52d7279dac..12d6d38929 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -275,6 +275,28 @@ examples/dhcpd
CONFIGURED_APPS += uiplib
+examples/discover
+^^^^^^^^^^^^^^^^^
+
+ This example exercises netutils/discover utility. This example initializes
+ and starts the UDP discover daemon. This daemon is useful for discovering
+ devices in local networks, especially with DHCP configured devices. It
+ listens for UDP broadcasts which also can include a device class so that
+ groups of devices can be discovered. It is also possible to address all
+ classes with a kind of broadcast discover.
+
+ This example will automatically be built as an NSH built-in if
+ CONFIG_NSH_BUILTIN_APPS is selected. Otherwise, it will be a standalone
+ program with entry point "discover_main".
+
+ NuttX configuration settings:
+
+ CONFIG_EXAMPLE_DISCOVER_DHCPC - DHCP Client
+ CONFIG_EXAMPLE_DISCOVER_NOMAC - Use canned MAC address
+ CONFIG_EXAMPLE_DISCOVER_IPADDR - Target IP address
+ CONFIG_EXAMPLE_DISCOVER_DRIPADDR - Router IP address
+ CONFIG_EXAMPLE_DISCOVER_NETMASK - Network Mask
+
examples/ftpc
^^^^^^^^^^^^^
@@ -1111,7 +1133,7 @@ examples/rgmp
See http://rgmp.sourceforge.net/wiki/index.php/Main_Page for further
- At present, the RGMP example folder contains only an empty main.c file.
+ At present, the RGMP example folder contains only an empty rgmp_main.c file.
examples/romfs
^^^^^^^^^^^^^^
@@ -1646,8 +1668,27 @@ examples/wget
file in the configuration driver with instruction to build applications
like:
- CONFIGURED_APPS += uiplib
- CONFIGURED_APPS += resolv
- CONFIGURED_APPS += webclient
+ CONFIGURED_APPS += uiplib
+ CONFIGURED_APPS += resolv
+ CONFIGURED_APPS += webclient
+examples/xmlrpc
+ This example exercises the "Embeddable Lightweight XML-RPC Server" which
+ is discussed at:
+
+ http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364
+
+ Configuration options:
+
+ CONFIG_EXAMPLES_XMLRPC_BUFFERSIZE - HTTP buffer size. Default 1024
+ CONFIG_EXAMPLES_XMLRPC_DHCPC - Use DHCP Client. Default n. Ignored
+ if CONFIG_NSH_BUILTIN_APPS is selected.
+ CONFIG_EXAMPLES_XMLRPC_NOMAC - Use Canned MAC Address. Defaul n. Ignored
+ if CONFIG_NSH_BUILTIN_APPS is selected.
+ CONFIG_EXAMPLES_XMLRPC_IPADDR - Target IP address. Default 0x0a000002.
+ Ignored if CONFIG_NSH_BUILTIN_APPS is selected.
+ CONFIG_EXAMPLES_XMLRPC_DRIPADDR - Default Router IP address (Gateway).
+ Default 0x0a000001. Ignored if CONFIG_NSH_BUILTIN_APPS is selected.
+ CONFIG_EXAMPLES_XMLRPC_NETMASK - Network Mask. Default 0xffffff00
+ Ignored if CONFIG_NSH_BUILTIN_APPS is selected.
diff --git a/apps/examples/buttons/Makefile b/apps/examples/buttons/Makefile
index 9c05871998..25d1ef2c2d 100644
--- a/apps/examples/buttons/Makefile
+++ b/apps/examples/buttons/Makefile
@@ -2,7 +2,7 @@
# apps/examples/buttons/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs
# Hello, World! Example
ASRCS =
-CSRCS = main.c
+CSRCS = buttons_main.c
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/apps/examples/buttons/main.c b/apps/examples/buttons/buttons_main.c
similarity index 99%
rename from apps/examples/buttons/main.c
rename to apps/examples/buttons/buttons_main.c
index 50124512cd..a3f6449d4f 100644
--- a/apps/examples/buttons/main.c
+++ b/apps/examples/buttons/buttons_main.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * examples/buttons/main.c
+ * examples/buttons/buttons_main.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/apps/examples/can/can_main.c b/apps/examples/can/can_main.c
index d3ca241192..482d3f4383 100644
--- a/apps/examples/can/can_main.c
+++ b/apps/examples/can/can_main.c
@@ -2,7 +2,7 @@
* examples/can/can_main.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/hello/Makefile b/apps/examples/hello/Makefile
index 9c3cda894b..1d78d723ed 100644
--- a/apps/examples/hello/Makefile
+++ b/apps/examples/hello/Makefile
@@ -46,7 +46,7 @@ STACKSIZE = 2048
# Hello, World! Example
ASRCS =
-CSRCS = main.c
+CSRCS = hello_main.c
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/apps/examples/hello/main.c b/apps/examples/hello/hello_main.c
similarity index 98%
rename from apps/examples/hello/main.c
rename to apps/examples/hello/hello_main.c
index 7e07cffd13..229027c36b 100644
--- a/apps/examples/hello/main.c
+++ b/apps/examples/hello/hello_main.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * examples/hello/main.c
+ * examples/hello/hello_main.c
*
* Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/apps/examples/helloxx/Makefile b/apps/examples/helloxx/Makefile
index c34378d249..8e85eab23e 100644
--- a/apps/examples/helloxx/Makefile
+++ b/apps/examples/helloxx/Makefile
@@ -2,7 +2,7 @@
# apps/examples/helloxx/Makefile
#
# Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs
ASRCS =
CSRCS =
-CXXSRCS = main.cxx
+CXXSRCS = helloxx_main.cxx
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/apps/examples/helloxx/main.cxx b/apps/examples/helloxx/helloxx_main.cxx
similarity index 99%
rename from apps/examples/helloxx/main.cxx
rename to apps/examples/helloxx/helloxx_main.cxx
index fcec7c761a..60fd0487b5 100644
--- a/apps/examples/helloxx/main.cxx
+++ b/apps/examples/helloxx/helloxx_main.cxx
@@ -1,5 +1,5 @@
//***************************************************************************
-// examples/helloxx/main.cxx
+// examples/helloxx/helloxx_main.cxx
//
// Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
// Author: Gregory Nutt
diff --git a/apps/examples/lcdrw/lcdrw_main.c b/apps/examples/lcdrw/lcdrw_main.c
deleted file mode 100644
index f39e1849da..0000000000
--- a/apps/examples/lcdrw/lcdrw_main.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/****************************************************************************
- * examples/lcdrw/lcdrw_main.c
- *
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include
-
-#include
-#include
-
-#include
-#include
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-/* Configuration ************************************************************/
-/* Most of the NX configuration settings are probbably *not* needed by this
- * example. But, presumeably you are using NX too and so the checks might
- * be good for you.
- */
-
-#ifndef CONFIG_NX
-# error "CONFIG_NX must be defined to use this test"
-#endif
-
-#ifndef CONFIG_NX_LCDDRIVER
-# error "CONFIG_NX_LCDDRIVER must be defined to use this test"
-#endif
-
-#ifndef CONFIG_EXAMPLES_LCDRW_BPP
-# define CONFIG_EXAMPLES_LCDRW_BPP 16
-#endif
-
-#if CONFIG_EXAMPLES_LCDRW_BPP != 16
-# error "Currently only RGB565 is supported -- feel free to extend"
-#endif
-
-#ifdef CONFIG_NX_DISABLE_16BPP
-# error "CONFIG_NX_DISABLE_16BPP disables 16-bit support"
-#endif
-
-#ifndef CONFIG_EXAMPLES_LDCRW_DEVNO
-# define CONFIG_EXAMPLES_LDCRW_DEVNO 0
-#endif
-
-#ifndef CONFIG_EXAMPLES_LDCRW_XRES
-# define CONFIG_EXAMPLES_LDCRW_XRES 240
-#endif
-
-#ifndef CONFIG_EXAMPLES_LDCRW_YRES
-# define CONFIG_EXAMPLES_LDCRW_YRES 320
-#endif
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-struct lcdrw_instance_s
-{
- /* LCD device handle and planeinfo */
-
- FAR struct lcd_dev_s *dev;
- struct lcd_planeinfo_s pinfo;
-};
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-/****************************************************************************
- * Name: lcdrw_initialize
- ****************************************************************************/
-
-static inline int lcdrw_initialize(FAR struct lcdrw_instance_s *inst)
-{
- int ret;
-
- /* Initialize the LCD device */
-
- printf("screens_initialize: Initializing LCD\n");
- ret = up_lcdinitialize();
- if (ret < 0)
- {
- fprintf(stderr, "screens_initialize: up_lcdinitialize failed: %d\n", -ret);
- return ret;
- }
-
- /* Get the device instance. */
-
- printf("Get LCD instance\n");
- inst->dev = up_lcdgetdev(CONFIG_EXAMPLES_LDCRW_DEVNO);
- if (!inst->dev)
- {
- fprintf(stderr, "up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_LDCRW_DEVNO);
- return ret;
- }
-
- /* Turn the LCD on at 75% power. This should not be necessary. */
-
- (void)inst->dev->setpower(inst->dev, ((3*CONFIG_LCD_MAXPOWER + 3)/4));
-
- /* Get the planeinfo structure */
-
- ret = inst->dev->getplaneinfo(inst->dev, 0, &inst->pinfo);
- if (ret < 0)
- {
- fprintf(stderr, "getplaneinfo failed: %d\n", ret);
- }
- return ret;
-}
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: lcdrw_main
- ****************************************************************************/
-
-int lcdrw_main(int argc, char *argv[])
-{
- struct lcdrw_instance_s inst;
- nxgl_coord_t row;
- nxgl_coord_t col;
- uint16_t value;
- uint32_t offset;
- FAR uint16_t *ptr;
- int ret;
-
- /* Initialize the LCD driver */
-
- ret = lcdrw_initialize(&inst);
- if (ret < 0)
- {
- exit(1);
- }
-
- /* Loop, writing all possible values to the LCD */
-
- value = 0;
- for (row = 0; row < CONFIG_EXAMPLES_LDCRW_YRES; row++)
- {
- /* Create a dummy row. The important thing is to try all
- * bit combinations in a predictable way.
- */
-
- ptr = (FAR uint16_t*)inst.pinfo.buffer;
- for (col = 0; col < CONFIG_EXAMPLES_LDCRW_XRES; col++)
- {
- *ptr++ = value++;
- }
-
- /* Write the row to the LCD */
-
- ret = inst.pinfo.putrun(row, 0, inst.pinfo.buffer,
- CONFIG_EXAMPLES_LDCRW_XRES);
- if (ret < 0)
- {
- fprintf(stderr, "putrun failed: %d\n", ret);
- exit(1);
- }
- }
-
- /* Print a header */
-
- printf(" ");
- for (col = 0; col < 15; col++)
- {
- printf("---%x ", col);
- }
- printf("---f\n");
-
- /* Then read each line back from the LCD. */
-
- offset = 0;
- for (row = 0; row < CONFIG_EXAMPLES_LDCRW_YRES; row++)
- {
- /* Read the row */
-
- ret = inst.pinfo.getrun(row, 0, inst.pinfo.buffer,
- CONFIG_EXAMPLES_LDCRW_XRES);
- if (ret < 0)
- {
- fprintf(stderr, "getrun failed: %d\n", ret);
- exit(1);
- }
-
- /* Then dump the row to the display */
-
- ptr = (FAR uint16_t*)inst.pinfo.buffer;
- for (col = 0; col < CONFIG_EXAMPLES_LDCRW_XRES; col++)
- {
- if ((offset & 15) == 0)
- {
- printf("%06x ", offset);
- }
-
- value = *ptr++;
- offset++;
-
- if ((offset & 15) == 0)
- {
- printf("%04x\n", value);
- }
- else
- {
- printf("%04x ", value);
- }
- }
- }
- fflush(stdout);
-
- return 0;
-}
-
diff --git a/apps/examples/mm/Makefile b/apps/examples/mm/Makefile
index e5d9ffb4cf..24ed4926f7 100644
--- a/apps/examples/mm/Makefile
+++ b/apps/examples/mm/Makefile
@@ -2,7 +2,7 @@
# apps/examples/mm/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/mm/mm_main.c b/apps/examples/mm/mm_main.c
index 5d45efdc59..149550418c 100644
--- a/apps/examples/mm/mm_main.c
+++ b/apps/examples/mm/mm_main.c
@@ -2,7 +2,7 @@
* examples/mm/mm_main.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/mount/Makefile b/apps/examples/mount/Makefile
index 7e48ea44a9..69cf970cf0 100644
--- a/apps/examples/mount/Makefile
+++ b/apps/examples/mount/Makefile
@@ -2,7 +2,7 @@
# apps/Makefile
#
# Copyright (C) 2007-2008, 2010-2010 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/mount/mount.h b/apps/examples/mount/mount.h
index 68a03674da..c756860860 100644
--- a/apps/examples/mount/mount.h
+++ b/apps/examples/mount/mount.h
@@ -2,7 +2,7 @@
* examples/mount/mount.h
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/mount/mount_main.c b/apps/examples/mount/mount_main.c
index 5f881e40ca..e0eb8a6150 100644
--- a/apps/examples/mount/mount_main.c
+++ b/apps/examples/mount/mount_main.c
@@ -2,7 +2,7 @@
* examples/mount/mount_main.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/mount/ramdisk.c b/apps/examples/mount/ramdisk.c
index 9688580c06..83ef74e423 100644
--- a/apps/examples/mount/ramdisk.c
+++ b/apps/examples/mount/ramdisk.c
@@ -2,7 +2,7 @@
* examples/mount/ramdisk.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/nsh/Kconfig b/apps/examples/nsh/Kconfig
index 289c7e515e..309aa925eb 100644
--- a/apps/examples/nsh/Kconfig
+++ b/apps/examples/nsh/Kconfig
@@ -6,6 +6,8 @@
config EXAMPLES_NSH
bool "NuttShell (NSH) example"
default n
+ select NSH_LIBRARY
+ select SYSTEM_READLINE
---help---
Enable the NuttShell (NSH) example
diff --git a/apps/examples/nsh/Makefile b/apps/examples/nsh/Makefile
index b5844f9edc..bad40fb2e2 100644
--- a/apps/examples/nsh/Makefile
+++ b/apps/examples/nsh/Makefile
@@ -2,7 +2,7 @@
# apps/examples/nsh/Makefile
#
# Copyright (C) 2007-2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/null/Makefile b/apps/examples/null/Makefile
index 3938eb1711..6341206007 100644
--- a/apps/examples/null/Makefile
+++ b/apps/examples/null/Makefile
@@ -2,7 +2,7 @@
# examples/null/Makefile
#
# Copyright (C) 2007-2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/null/null_main.c b/apps/examples/null/null_main.c
index 63a14fcaca..c4624bd1d5 100644
--- a/apps/examples/null/null_main.c
+++ b/apps/examples/null/null_main.c
@@ -2,7 +2,7 @@
* examples/null/null_main.c
*
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/Kconfig b/apps/examples/ostest/Kconfig
index ca89579934..0da7e4ce34 100644
--- a/apps/examples/ostest/Kconfig
+++ b/apps/examples/ostest/Kconfig
@@ -10,4 +10,33 @@ config EXAMPLES_OSTEST
Enable the OS test example
if EXAMPLES_OSTEST
+
+config EXAMPLES_OSTEST_BUILTIN
+ bool "NSH built-in application"
+ default y if NSH_LIBRARY
+ default n if !NSH_LIBRARY
+ ---help---
+ Build the OS test example as an NSH built-in application.
+
+config EXAMPLES_OSTEST_LOOPS
+ int "OS test loop"
+ default 1
+ ---help---
+ Used to control the number of executions of the test. If undefined, the test
+ executes one time. If defined to be zero, the test runs forever.
+
+config EXAMPLES_OSTEST_STACKSIZE
+ int "OS test stack size"
+ default 8192
+ ---help---
+ Size of the stack used to create the ostest task. Default is 8192.
+
+config EXAMPLES_OSTEST_NBARRIER_THREADS
+ int "Number of barrier threads"
+ default 8
+ ---help---
+ Specifies the number of threads to create in the barrier test. The default
+ is 8 but a smaller number may be needed on systems without sufficient memory
+ to start so many threads.
+
endif
diff --git a/apps/examples/ostest/Makefile b/apps/examples/ostest/Makefile
index eab1db8b39..374964b396 100644
--- a/apps/examples/ostest/Makefile
+++ b/apps/examples/ostest/Makefile
@@ -46,7 +46,7 @@ STACKSIZE = 2048
# NuttX OS Test
ASRCS =
-CSRCS = main.c dev_null.c
+CSRCS = ostest_main.c dev_null.c
ifeq ($(CONFIG_ARCH_FPU),y)
CSRCS += fpu.c
diff --git a/apps/examples/ostest/barrier.c b/apps/examples/ostest/barrier.c
index da1301dc3c..e66496f7b8 100644
--- a/apps/examples/ostest/barrier.c
+++ b/apps/examples/ostest/barrier.c
@@ -2,7 +2,7 @@
* examples/ostest/barrier.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/cancel.c b/apps/examples/ostest/cancel.c
index bf2d03615f..11981d8194 100644
--- a/apps/examples/ostest/cancel.c
+++ b/apps/examples/ostest/cancel.c
@@ -2,7 +2,7 @@
* examples/ostest/cancel.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/cond.c b/apps/examples/ostest/cond.c
index 11191b7d52..96468c3e4e 100644
--- a/apps/examples/ostest/cond.c
+++ b/apps/examples/ostest/cond.c
@@ -2,7 +2,7 @@
* cond.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/dev_null.c b/apps/examples/ostest/dev_null.c
index e8fc6cf3f9..34508d05e6 100644
--- a/apps/examples/ostest/dev_null.c
+++ b/apps/examples/ostest/dev_null.c
@@ -2,7 +2,7 @@
* examples/ostest/dev_null.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/mutex.c b/apps/examples/ostest/mutex.c
index 752f833f25..0b7f70daa1 100644
--- a/apps/examples/ostest/mutex.c
+++ b/apps/examples/ostest/mutex.c
@@ -2,7 +2,7 @@
* mutex.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/main.c b/apps/examples/ostest/ostest_main.c
similarity index 99%
rename from apps/examples/ostest/main.c
rename to apps/examples/ostest/ostest_main.c
index 61a2af19a6..46726d515d 100644
--- a/apps/examples/ostest/main.c
+++ b/apps/examples/ostest/ostest_main.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * apps/examples/ostest/main.c
+ * apps/examples/ostest/ostest_main.c
*
* Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/apps/examples/ostest/posixtimer.c b/apps/examples/ostest/posixtimer.c
index 3560c712be..ebb1ab79e1 100644
--- a/apps/examples/ostest/posixtimer.c
+++ b/apps/examples/ostest/posixtimer.c
@@ -2,7 +2,7 @@
* examples/ostest/posixtimer.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/prioinherit.c b/apps/examples/ostest/prioinherit.c
index eea5a818ff..cd04df7e60 100644
--- a/apps/examples/ostest/prioinherit.c
+++ b/apps/examples/ostest/prioinherit.c
@@ -2,7 +2,7 @@
* examples/ostest/prioinherit.c
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/rmutex.c b/apps/examples/ostest/rmutex.c
index 44eb4bb3b5..ffd99c2dfc 100644
--- a/apps/examples/ostest/rmutex.c
+++ b/apps/examples/ostest/rmutex.c
@@ -2,7 +2,7 @@
* rmutex.c
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/roundrobin.c b/apps/examples/ostest/roundrobin.c
index 061d51f3da..5167a857ed 100644
--- a/apps/examples/ostest/roundrobin.c
+++ b/apps/examples/ostest/roundrobin.c
@@ -2,7 +2,7 @@
* examples/ostest/roundrobin.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/sem.c b/apps/examples/ostest/sem.c
index 850cf8040b..48be57a855 100644
--- a/apps/examples/ostest/sem.c
+++ b/apps/examples/ostest/sem.c
@@ -2,7 +2,7 @@
* sem.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/sighand.c b/apps/examples/ostest/sighand.c
index 6815316395..eabfe56464 100644
--- a/apps/examples/ostest/sighand.c
+++ b/apps/examples/ostest/sighand.c
@@ -2,7 +2,7 @@
* apps/examples/ostest/sighand.c
*
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/timedmqueue.c b/apps/examples/ostest/timedmqueue.c
index 807d8537bf..6c3269e844 100644
--- a/apps/examples/ostest/timedmqueue.c
+++ b/apps/examples/ostest/timedmqueue.c
@@ -2,7 +2,7 @@
* apps/examples/ostest/mqueue.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/timedwait.c b/apps/examples/ostest/timedwait.c
index fc381ddda4..7cf875fb67 100644
--- a/apps/examples/ostest/timedwait.c
+++ b/apps/examples/ostest/timedwait.c
@@ -2,7 +2,7 @@
* examples/ostest/timedwait.c
*
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/Makefile b/apps/examples/pipe/Makefile
index 3bcc9b5f78..956c911b34 100644
--- a/apps/examples/pipe/Makefile
+++ b/apps/examples/pipe/Makefile
@@ -2,7 +2,7 @@
# apps/examples/pipe/Makefile
#
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/interlock_test.c b/apps/examples/pipe/interlock_test.c
index e049a65f60..20d4113eb5 100644
--- a/apps/examples/pipe/interlock_test.c
+++ b/apps/examples/pipe/interlock_test.c
@@ -2,7 +2,7 @@
* examples/pipe/interlock_test.c
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/pipe.h b/apps/examples/pipe/pipe.h
index 2c18fd868b..38143e4920 100644
--- a/apps/examples/pipe/pipe.h
+++ b/apps/examples/pipe/pipe.h
@@ -2,7 +2,7 @@
* examples/pipe/pipe.h
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/pipe_main.c b/apps/examples/pipe/pipe_main.c
index 406832a98a..63a4f283fb 100644
--- a/apps/examples/pipe/pipe_main.c
+++ b/apps/examples/pipe/pipe_main.c
@@ -2,7 +2,7 @@
* examples/pipe/pipe_main.c
*
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/redirect_test.c b/apps/examples/pipe/redirect_test.c
index db7c0b99a3..26fe9bcaa2 100644
--- a/apps/examples/pipe/redirect_test.c
+++ b/apps/examples/pipe/redirect_test.c
@@ -2,7 +2,7 @@
* examples/pipe/redirect_test.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/transfer_test.c b/apps/examples/pipe/transfer_test.c
index cb8cad04a4..f7c612881a 100644
--- a/apps/examples/pipe/transfer_test.c
+++ b/apps/examples/pipe/transfer_test.c
@@ -2,7 +2,7 @@
* examples/pipe/transfer_test.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/Makefile b/apps/examples/poll/Makefile
index 1c85d6f36d..aef61d199c 100644
--- a/apps/examples/poll/Makefile
+++ b/apps/examples/poll/Makefile
@@ -2,7 +2,7 @@
# apps/examples/poll/Makefile
#
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/Makefile.host b/apps/examples/poll/Makefile.host
index 9d9daee27b..1e6a72089e 100644
--- a/apps/examples/poll/Makefile.host
+++ b/apps/examples/poll/Makefile.host
@@ -2,7 +2,7 @@
# apps/examples/poll/Makefile.host
#
# Copyright (C) 2008, 2009, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/poll_internal.h b/apps/examples/poll/poll_internal.h
index cbf42ac566..b2400932ed 100644
--- a/apps/examples/poll/poll_internal.h
+++ b/apps/examples/poll/poll_internal.h
@@ -2,7 +2,7 @@
* examples/poll/poll_internal.h
*
* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/poll_listener.c b/apps/examples/poll/poll_listener.c
index 816647e340..fe1c95089b 100644
--- a/apps/examples/poll/poll_listener.c
+++ b/apps/examples/poll/poll_listener.c
@@ -2,7 +2,7 @@
* examples/poll/poll_listener.c
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/poll_main.c b/apps/examples/poll/poll_main.c
index 9c3a096cba..0c475fa7aa 100644
--- a/apps/examples/poll/poll_main.c
+++ b/apps/examples/poll/poll_main.c
@@ -2,7 +2,7 @@
* examples/poll/poll_main.c
*
* Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/select_listener.c b/apps/examples/poll/select_listener.c
index 80039ada34..5cb7e78056 100644
--- a/apps/examples/poll/select_listener.c
+++ b/apps/examples/poll/select_listener.c
@@ -2,7 +2,7 @@
* examples/poll/select_listener.c
*
* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/romfs/Makefile b/apps/examples/romfs/Makefile
index 1db45765a7..ba930b77d0 100644
--- a/apps/examples/romfs/Makefile
+++ b/apps/examples/romfs/Makefile
@@ -2,7 +2,7 @@
# apps/examples/romfs/Makefile
#
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/romfs/romfs_main.c b/apps/examples/romfs/romfs_main.c
index 4870ff4f81..3437cb8ace 100644
--- a/apps/examples/romfs/romfs_main.c
+++ b/apps/examples/romfs/romfs_main.c
@@ -2,7 +2,7 @@
* examples/romfs/romfs_main.c
*
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/serloop/Makefile b/apps/examples/serloop/Makefile
index 67c805d46c..e1c415cdd8 100644
--- a/apps/examples/serloop/Makefile
+++ b/apps/examples/serloop/Makefile
@@ -2,7 +2,7 @@
# apps/examples/serloop/Makefile
#
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs
# Mindlessly simple console loopack test
ASRCS =
-CSRCS = main.c
+CSRCS = serloop_main.c
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/apps/examples/serloop/main.c b/apps/examples/serloop/serloop_main.c
similarity index 97%
rename from apps/examples/serloop/main.c
rename to apps/examples/serloop/serloop_main.c
index f0e3ac2387..af171fef3f 100644
--- a/apps/examples/serloop/main.c
+++ b/apps/examples/serloop/serloop_main.c
@@ -1,8 +1,8 @@
/****************************************************************************
- * examples/serloop/main.c
+ * examples/serloop/serloop_main.c
*
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/interpreters/Makefile b/apps/interpreters/Makefile
index 1ef9c7439c..5901fc8309 100644
--- a/apps/interpreters/Makefile
+++ b/apps/interpreters/Makefile
@@ -2,7 +2,7 @@
# apps/interpreters/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/interpreters/ficl/Makefile b/apps/interpreters/ficl/Makefile
index 183246b67a..fb953964e1 100644
--- a/apps/interpreters/ficl/Makefile
+++ b/apps/interpreters/ficl/Makefile
@@ -2,7 +2,7 @@
# apps/interpreters/ficl/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/interpreters/ficl/README.txt b/apps/interpreters/ficl/README.txt
old mode 100755
new mode 100644
diff --git a/apps/namedapp/Makefile b/apps/namedapp/Makefile
index fba8fb1ff9..6b0fd6a053 100644
--- a/apps/namedapp/Makefile
+++ b/apps/namedapp/Makefile
@@ -2,7 +2,7 @@
# apps/nshlib/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/namedapp/namedapp.c b/apps/namedapp/namedapp.c
index a5c2bee0e2..d59ce6e3b7 100644
--- a/apps/namedapp/namedapp.c
+++ b/apps/namedapp/namedapp.c
@@ -4,7 +4,7 @@
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Authors: Uros Platise
- * Gregory Nutt
+ * Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig
index ff692f43ba..c0f7d6a92f 100644
--- a/apps/nshlib/Kconfig
+++ b/apps/nshlib/Kconfig
@@ -6,6 +6,7 @@
config NSH_LIBRARY
bool "NSH Library"
default n
+ select SYSTEM_READLINE
---help---
Build the NSH support library. This is used, for example, by examples/nsh
in order to implement the full NuttShell (NSH).
@@ -201,6 +202,7 @@ config NSH_MMCSDMINOR
config NSH_ROMFSETC
bool "Support ROMFS start-up script"
default n
+ depends on FS_ROMFS
---help---
Mount a ROMFS filesystem at /etc and provide a startup script
at /etc/init.d/rcS. The default startup script will mount
@@ -244,6 +246,7 @@ config NSH_ROMFSSECTSIZE
config NSH_FATDEVNO
int "FAT block device minor number"
default 0
+ depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the minor number of the FAT
@@ -252,6 +255,7 @@ config NSH_FATDEVNO
config NSH_FATSECTSIZE
int "FAT sector size"
default 512
+ depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the sector size use with the
@@ -260,6 +264,7 @@ config NSH_FATSECTSIZE
config NSH_FATNSECTORS
int "FAT number of sectors"
default 1024
+ depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the number of sectors to use
@@ -268,11 +273,13 @@ config NSH_FATNSECTORS
config NSH_FATMOUNTPT
string "FAT mount point"
- default 512
+ default "/tmp"
+ depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the location where the FAT
- FS will be mounted. Default is /tmp.
+ FS will be mounted. Default is "/tmp".
+
endif
if NSH_LIBRARY
diff --git a/apps/nshlib/nsh_console.h b/apps/nshlib/nsh_console.h
index 8abf9154b0..53e8c78976 100644
--- a/apps/nshlib/nsh_console.h
+++ b/apps/nshlib/nsh_console.h
@@ -2,7 +2,7 @@
* apps/nshlib/nsh_console.h
*
* Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/nshlib/nsh_consolemain.c b/apps/nshlib/nsh_consolemain.c
index baf2e74b4d..6b51be4705 100644
--- a/apps/nshlib/nsh_consolemain.c
+++ b/apps/nshlib/nsh_consolemain.c
@@ -97,9 +97,10 @@
int nsh_consolemain(int argc, char *argv[])
{
FAR struct console_stdio_s *pstate = nsh_newconsole();
- DEBUGASSERT(pstate);
int ret;
+ DEBUGASSERT(pstate);
+
/* If we are using a USB serial console, then we will have to wait for the
* USB to be connected to the host.
*/
diff --git a/apps/nshlib/nsh_mntcmds.c b/apps/nshlib/nsh_mntcmds.c
index b5935bdea1..690d027cae 100644
--- a/apps/nshlib/nsh_mntcmds.c
+++ b/apps/nshlib/nsh_mntcmds.c
@@ -195,10 +195,11 @@ int cmd_df(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
defined(CONFIG_FS_READABLE) && !defined(CONFIG_NSH_DISABLE_MOUNT)
int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
- char *source;
- char *target;
- char *filesystem = 0;
+ FAR char *source;
+ FAR char *target;
+ FAR char *filesystem = NULL;
bool badarg = false;
+ int option;
int ret;
/* The mount command behaves differently if no parameters are provided */
@@ -208,9 +209,12 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
return mount_show(vtbl, argv[0]);
}
- /* Get the mount options */
+ /* Get the mount options. NOTE: getopt() is not thread safe nor re-entrant.
+ * To keep its state proper for the next usage, it is necessary to parse to
+ * the end of the line even if an error occurs. If an error occurs, this
+ * logic just sets 'badarg' and continues.
+ */
- int option;
while ((option = getopt(argc, argv, ":t:")) != ERROR)
{
switch (option)
@@ -232,14 +236,18 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
}
}
- /* If a bad argument was encountered, then return without processing the command */
+ /* If a bad argument was encountered, then return without processing the
+ * command.
+ */
if (badarg)
{
return ERROR;
}
- /* There are two required arguments after the options */
+ /* There are two required arguments after the options: the source and target
+ * paths.
+ */
if (optind + 2 < argc)
{
@@ -252,6 +260,16 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
return ERROR;
}
+ /* While the above parsing for the -t argument looks nice, the -t argument
+ * not really optional.
+ */
+
+ if (!filesystem)
+ {
+ nsh_output(vtbl, g_fmtargrequired, argv[0]);
+ return ERROR;
+ }
+
/* The source and target paths might be relative to the current
* working directory.
*/
diff --git a/apps/nshlib/nsh_netinit.c b/apps/nshlib/nsh_netinit.c
index 5d74b30d77..bc845c4ed3 100644
--- a/apps/nshlib/nsh_netinit.c
+++ b/apps/nshlib/nsh_netinit.c
@@ -164,6 +164,7 @@ int nsh_netinit(void)
dhcpc_close(handle);
}
#endif
+
return OK;
}
diff --git a/apps/system/Make.defs b/apps/system/Make.defs
index e72f56ef53..a4aea2d318 100644
--- a/apps/system/Make.defs
+++ b/apps/system/Make.defs
@@ -34,18 +34,18 @@
#
############################################################################
-ifeq ($(CONFIG_VSN_POWEROFF),y)
-CONFIGURED_APPS += vsn/poweroff
+ifeq ($(CONFIG_SYSTEM_FREE),y)
+CONFIGURED_APPS += system/free
endif
-ifeq ($(CONFIG_VSN_RAMTRON),y)
-CONFIGURED_APPS += vsn/ramtron
+ifeq ($(CONFIG_SYSTEM_I2CTOOL),y)
+CONFIGURED_APPS += system/i2c
endif
-ifeq ($(CONFIG_VSN_SDCARD),y)
-CONFIGURED_APPS += vsn/sdcard
+ifeq ($(CONFIG_SYSTEM_INSTALL),y)
+CONFIGURED_APPS += system/install
endif
-ifeq ($(CONFIG_VSN_SYSINFO),y)
-CONFIGURED_APPS += vsn/sysinfo
+ifeq ($(CONFIG_SYSTEM_READLINE),y)
+CONFIGURED_APPS += system/readline
endif
diff --git a/apps/system/free/Makefile b/apps/system/free/Makefile
index 974c989133..7f911d81cc 100644
--- a/apps/system/free/Makefile
+++ b/apps/system/free/Makefile
@@ -3,7 +3,7 @@
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise
-# Gregory Nutt
+# Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/system/free/README.txt b/apps/system/free/README.txt
index dd92a94ae2..1c2d380d4e 100644
--- a/apps/system/free/README.txt
+++ b/apps/system/free/README.txt
@@ -2,5 +2,5 @@
This application provides UNIX style memory free information.
Source: NuttX
- Author: Gregory Nutt
+ Author: Gregory Nutt
Date: 17. March 2011
diff --git a/apps/system/free/free.c b/apps/system/free/free.c
index 2f61a1dae3..3d9698ecbe 100644
--- a/apps/system/free/free.c
+++ b/apps/system/free/free.c
@@ -2,7 +2,7 @@
* apps/system/free/free.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/README.txt b/apps/system/i2c/README.txt
old mode 100755
new mode 100644
index 97801bcaaa..7b432533be
--- a/apps/system/i2c/README.txt
+++ b/apps/system/i2c/README.txt
@@ -211,7 +211,7 @@ COMMAND SUMMARY
===============
We have already seen the I2C help (or ?) commands above. This section will
-discusse the remaining commands.
+discuss the remaining commands.
List buses: bus [OPTIONS]
--------------------------
diff --git a/apps/system/i2c/i2c_bus.c b/apps/system/i2c/i2c_bus.c
index 07e6d2da38..a684166ff7 100644
--- a/apps/system/i2c/i2c_bus.c
+++ b/apps/system/i2c/i2c_bus.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_bus.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_common.c b/apps/system/i2c/i2c_common.c
index e7b27693ad..4af648c7d5 100644
--- a/apps/system/i2c/i2c_common.c
+++ b/apps/system/i2c/i2c_common.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_common.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_dev.c b/apps/system/i2c/i2c_dev.c
index f2b5a0e212..3d0480a15c 100644
--- a/apps/system/i2c/i2c_dev.c
+++ b/apps/system/i2c/i2c_dev.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_dev.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_get.c b/apps/system/i2c/i2c_get.c
index 773f2c9637..08510af4b6 100644
--- a/apps/system/i2c/i2c_get.c
+++ b/apps/system/i2c/i2c_get.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_get.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_main.c b/apps/system/i2c/i2c_main.c
index fbaf677aa6..0cf6786cbc 100644
--- a/apps/system/i2c/i2c_main.c
+++ b/apps/system/i2c/i2c_main.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_main.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_set.c b/apps/system/i2c/i2c_set.c
index 66fd8c85a0..5baf7f8354 100644
--- a/apps/system/i2c/i2c_set.c
+++ b/apps/system/i2c/i2c_set.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_set.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_verf.c b/apps/system/i2c/i2c_verf.c
index 0fa34b96e1..109e9c4ce6 100644
--- a/apps/system/i2c/i2c_verf.c
+++ b/apps/system/i2c/i2c_verf.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_verf.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2ctool.h b/apps/system/i2c/i2ctool.h
index 9726f0083f..4ff26d03ed 100644
--- a/apps/system/i2c/i2ctool.h
+++ b/apps/system/i2c/i2ctool.h
@@ -2,7 +2,7 @@
* apps/system/i2c/i2ctool.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/install/Makefile b/apps/system/install/Makefile
old mode 100755
new mode 100644
index 4528ad44ef..71d82f34ce
--- a/apps/system/install/Makefile
+++ b/apps/system/install/Makefile
@@ -3,7 +3,7 @@
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise
-# Gregory Nutt
+# Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/system/install/README.txt b/apps/system/install/README.txt
old mode 100755
new mode 100644
diff --git a/apps/system/install/install.c b/apps/system/install/install.c
old mode 100755
new mode 100644
diff --git a/apps/system/readline/Kconfig b/apps/system/readline/Kconfig
index 2ed9cafd67..6482b12044 100644
--- a/apps/system/readline/Kconfig
+++ b/apps/system/readline/Kconfig
@@ -19,21 +19,4 @@ config READLINE_ECHO
already has local echo support or you need to suppress the back-channel
responses for any other reason.
-choice
- prompt "Newline Options"
- default EOL_IS_EITHER_CRLF
-
-config EOL_IS_CR
- bool "EOL is CR"
-
-config EOL_IS_LF
- bool "EOL is LF"
-
-config EOL_IS_BOTH_CRLF
- bool "EOL is CR and LF"
-
-config EOL_IS_EITHER_CRLF
- bool "EOL is CR or LF"
-
-endchoice
endif
diff --git a/apps/system/readline/readline.c b/apps/system/readline/readline.c
index bdd39e67be..ec2dc1c0a6 100644
--- a/apps/system/readline/readline.c
+++ b/apps/system/readline/readline.c
@@ -63,13 +63,32 @@
#define CONFIG_READLINE_ECHO 1
/* Some environments may return CR as end-of-line, others LF, and others
- * both. The logic here assumes either but not both.
+ * both. If not specified, the logic here assumes either (but not both) as
+ * the default.
*/
-#undef CONFIG_EOL_IS_CR
-#undef CONFIG_EOL_IS_LF
-#undef CONFIG_EOL_IS_BOTH_CRLF
-#define CONFIG_EOL_IS_EITHER_CRLF 1
+#if defined(CONFIG_EOL_IS_CR)
+# undef CONFIG_EOL_IS_LF
+# undef CONFIG_EOL_IS_BOTH_CRLF
+# undef CONFIG_EOL_IS_EITHER_CRLF
+#elif defined(CONFIG_EOL_IS_LF)
+# undef CONFIG_EOL_IS_CR
+# undef CONFIG_EOL_IS_BOTH_CRLF
+# undef CONFIG_EOL_IS_EITHER_CRLF
+#elif defined(CONFIG_EOL_IS_BOTH_CRLF)
+# undef CONFIG_EOL_IS_CR
+# undef CONFIG_EOL_IS_LF
+# undef CONFIG_EOL_IS_EITHER_CRLF
+#elif defined(CONFIG_EOL_IS_EITHER_CRLF)
+# undef CONFIG_EOL_IS_CR
+# undef CONFIG_EOL_IS_LF
+# undef CONFIG_EOL_IS_BOTH_CRLF
+#else
+# undef CONFIG_EOL_IS_CR
+# undef CONFIG_EOL_IS_LF
+# undef CONFIG_EOL_IS_BOTH_CRLF
+# define CONFIG_EOL_IS_EITHER_CRLF 1
+#endif
/****************************************************************************
* Private Type Declarations
diff --git a/apps/systemcmds/bl_update/Makefile b/apps/systemcmds/bl_update/Makefile
new file mode 100644
index 0000000000..9d0e156f60
--- /dev/null
+++ b/apps/systemcmds/bl_update/Makefile
@@ -0,0 +1,42 @@
+############################################################################
+#
+# Copyright (C) 2012 PX4 Development Team. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name PX4 nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+#
+# Build the eeprom tool.
+#
+
+APPNAME = bl_update
+PRIORITY = SCHED_PRIORITY_DEFAULT
+STACKSIZE = 4096
+
+include $(APPDIR)/mk/app.mk
diff --git a/apps/systemcmds/bl_update/bl_update.c b/apps/systemcmds/bl_update/bl_update.c
new file mode 100644
index 0000000000..8bfc292348
--- /dev/null
+++ b/apps/systemcmds/bl_update/bl_update.c
@@ -0,0 +1,174 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2012 PX4 Development Team. All rights reserved.
+ * Author: Lorenz Meier
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name PX4 nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/**
+ * @file bl_update.c
+ *
+ * STM32F4 bootloader update tool.
+ */
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#include "systemlib/systemlib.h"
+#include "systemlib/param/param.h"
+#include "systemlib/err.h"
+
+__EXPORT int bl_update_main(int argc, char *argv[]);
+
+int
+bl_update_main(int argc, char *argv[])
+{
+ if (argc != 2)
+ errx(1, "missing firmware filename");
+
+ int fd = open(argv[1], O_RDONLY);
+ if (fd < 0)
+ err(1, "open %s", argv[1]);
+
+ struct stat s;
+ if (stat(argv[1], &s) < 0)
+ err(1, "stat %s", argv[1]);
+
+ /* sanity-check file size */
+ if (s.st_size > 16384)
+ errx(1, "%s: file too large", argv[1]);
+
+ uint8_t *buf = malloc(s.st_size);
+ if (buf == NULL)
+ errx(1, "failed to allocate %u bytes for firmware buffer", s.st_size);
+
+ if (read(fd, buf, s.st_size) != s.st_size)
+ err(1, "firmware read error");
+ close(fd);
+
+ uint32_t *hdr = (uint32_t *)buf;
+ if ((hdr[0] < 0x20000000) || /* stack not below RAM */
+ (hdr[0] > (0x20000000 + (128 * 1024))) || /* stack not above RAM */
+ (hdr[1] < 0x08000000) || /* entrypoint not below flash */
+ ((hdr[1] - 0x08000000) > 16384)) { /* entrypoint not outside bootloader */
+ free(buf);
+ errx(1, "not a bootloader image");
+ }
+
+ warnx("image validated, erasing bootloader...");
+ usleep(10000);
+
+ /* prevent other tasks from running while we do this */
+ sched_lock();
+
+ /* unlock the control register */
+ volatile uint32_t *keyr = (volatile uint32_t *)0x40023c04;
+ *keyr = 0x45670123U;
+ *keyr = 0xcdef89abU;
+
+ volatile uint32_t *sr = (volatile uint32_t *)0x40023c0c;
+ volatile uint32_t *cr = (volatile uint32_t *)0x40023c10;
+ volatile uint8_t *base = (volatile uint8_t *)0x08000000;
+
+ /* check the control register */
+ if (*cr & 0x80000000) {
+ warnx("WARNING: flash unlock failed, flash aborted");
+ goto flash_end;
+ }
+
+ /* erase the bootloader sector */
+ *cr = 0x2;
+ *cr = 0x10002;
+
+ /* wait for the operation to complete */
+ while (*sr & 0x1000) {
+ }
+ if (*sr & 0xf2) {
+ warnx("WARNING: erase error 0x%02x", *sr);
+ goto flash_end;
+ }
+
+ /* verify the erase */
+ for (int i = 0; i < s.st_size; i++) {
+ if (base[i] != 0xff) {
+ warnx("WARNING: erase failed at %d - retry update, DO NOT reboot", i);
+ goto flash_end;
+ }
+ }
+
+ warnx("flashing...");
+
+ /* now program the bootloader - speed is not critical so use x8 mode */
+ for (int i = 0; i < s.st_size; i++) {
+
+ /* program a byte */
+ *cr = 1;
+ base[i] = buf[i];
+
+ /* wait for the operation to complete */
+ while (*sr & 0x1000) {
+ }
+ if (*sr & 0xf2) {
+ warnx("WARNING: program error 0x%02x", *sr);
+ goto flash_end;
+ }
+ }
+
+ /* re-lock the flash control register */
+ *cr = 0x80000000;
+
+ warnx("verifying...");
+
+ /* now run a verify pass */
+ for (int i = 0; i < s.st_size; i++) {
+ if (base[i] != buf[i]) {
+ warnx("WARNING: verify failed at %u - retry update, DO NOT reboot", i);
+ goto flash_end;
+ }
+ }
+
+ warnx("bootloader update complete");
+
+flash_end:
+ /* unlock the scheduler */
+ sched_unlock();
+
+ free(buf);
+ exit(0);
+}
diff --git a/nuttx/COPYING b/nuttx/COPYING
index 82d3a8a58a..863b81a2fc 100644
--- a/nuttx/COPYING
+++ b/nuttx/COPYING
@@ -71,7 +71,12 @@ FAT Long File Names
FAT implementations that include support for long filenames, and that
removable solid state media and consumer devices only using short names
would be unaffected. ..."
-
+
+ This Wikipedia entry has been updated with recent legal decisions in favor
+ of Microsoft. Refer to:
+
+ http://en.wikipedia.org/wiki/File_Allocation_Table#Legal_issues
+
So you have been forewarned: Use the long filename at your own risk!
uIP
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index b67c066bcb..59736290a7 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3250,3 +3250,121 @@
* sched/work_cancel.c: Fix a bad assertion (reported by Mike Smith)
* configs/stm3210e-eval/src/up_idle.c: Correct some power management
compilation errors (reported by Diego Sanchez).
+ * include/nuttx/wqueue.h, sched/work*, and others: Added logic to support
+ a second, lower priority work queue (CONFIG_SCHED_LPWORK).
+ * arch/arm/src/stm32/stm32_dma.c, chip/stm32*_memorymap.h: FSMC SRAM is
+ only 16-bits wide and the SDIO DMA must be set up differently.
+ * arch/arm/src/stm32/stm32_dma.c: Back out the 16-bit DMA change. It
+ is incorrect.
+ * configs/: Make use of UART4/5 vs USART4/5 consistent in all places.
+ * Kconfig: Serial 2STOP setting must be integer 0/1, not a boolean.
+ * lib/misc/sendfile.c and include/sys/sendfile.h: Add a Linux style
+ sendfile() (non-standard!)
+ * Kconfig: Refactor serial settings (moved from chip to drivers/serial).
+ AVR "teensy" now builds with Kconfig (contributed by Richard Cochran).
+ * Kconfig: Add configuration settings for the LPC17xx
+ * Kconfig: Add configuration settings for the LM3S (from Richard Cochran).
+ * Kconfig: Verify configuration settings for the STM32. This includes
+ changes in the way that the external SRAM is configured: Define
+ CONFIG_HEAP2_SIZE (decimal) instead of CONFIG_HEAP2_END (hex).
+ * tools/configure.sh: Don't append the apps directory path setting
+ if the correct setting is already in defined in the defconfig file.
+ * fs/fat/fs_utils.c: Improper constructed bool expression. This
+ would cause many unnecessary writes to FLASH (Thanks Ronen Vainish).
+ * Kconfig: Verify configuration settings for the LPC43xx. This includes
+ some corrections to configuration variable names and defconfig settings.
+ * Kconfig: Add and verify configuration settings for the LPC31xx.
+ * arch/arm/src/stm32/stm32_uart.h and stm32_serial.c: Add logic to
+ re-initialize the console UART as needed to enable DMA on the
+ console UART (contributed by Mike Smith).
+ * net/recvfrom.c, net/Kconfig, include/nuttx/net/uipopt.h: Remove delay
+ after receiving data. That has historical reasons to be there (it
+ was needed before read-ahead buffering was added), but kills performance.
+ (Noted by Max Holtzberg).
+ * configs/shenzhou: Add beginnings of a board configuration for the
+ Shenzhou STM32107 board (see www.armjishu.com). Very little is in
+ place as of this initial check-in.
+ * QEMU: Fixes from Richard Cochran to build QEMU with Kconfig files.
+ * arch/*/src/Makefile: Remove some old logic that was kicked off
+ when CONFIG_BOOT_RUNFROMFLASH=y. The old logic used to use
+ objcopy to move sections. Newer logic changes the load position
+ of sections in the the linker script. As far as I can tell, there
+ is nothing in the source tree now that depends on the old way of
+ doing things (if I am wrong, they will need a change to the linker
+ script).
+ * configs/fire-stm32v2: Configuration for the M3 Wildfire board. I
+ don't know very much about this board other than is has an
+ STM32F103VET6 chip, LCD, touchscreen, and ENC28J60 network. Very
+ little is in place on the initial check-in.
+ * configs/shenzhou: Coding for the Shenzhou board port is complete,
+ but tested has been deferred until I get the right tools.
+ * arch/arc/include/stm32/chip.h and arch/arm/src/stm32/chip.h:
+ Add support for the STM32F103VET6.
+ * fs/fs_fdopen.c: Bad check for failure to allocate memory. (Noted
+ by Ronen Vainish).
+ * drivers/mmcsd/mmcsd_sdio.c: If the MMC/SD driver were ever
+ uninitialized then there would be a double release of memory
+ (Noted by Ronen Vainish).
+ * fs/mmap/fs_rammap.c: Fix logic error and errno check (contributed
+ by Kate).
+ * arch/avr/src: Fixes from AVR32 build errors that have crept in
+ over the time; incorporated Kconfig for AVR3 (Richard Cochran).
+ * fs/fat and include/nuttx/fs/fat.h: The FAT file system allocates
+ memory for sector I/O buffers used to exchange data with the
+ configured block driver. In some contexts, the block driver may
+ require DMA-capable memory. If CONFIG_FAT_DMAMEMORY is defined,
+ then the FAT FS will use platform-provided DMA memory allocators
+ to allocate the block driver I/O buffers.
+ * CONFIG_NET_ENC28J60 renamed CONFIG_ENC28J60 to be consistent
+ in all places.
+ * drivers/enc28j60.c, include/nuttx/net/enc28j60.h, and
+ olimex-strp711/src/up_enc28j60.c: No longer passes IRQ number
+ as a parameters. Instead now passes a call table to manage
+ ENC28J60 GPIO interrupts. That is because GPIO interrupts are
+ handled in different ways by different MCUs and some do not
+ support IRQ numbers for GPIO interrupts.
+ * mm/mm_gran* and include/nuttx/gran.h: Add a simple granule-
+ based allocator. The intent of this allocator is to support
+ simple allocation of DMA I/O buffers. The initiali check-in
+ is code complete but untested (not event built into the
+ mm/Makefile yet.
+ * confgs/fire-stm32v2: The board port is basically functional.
+ Not all features have been verified. The ENC28J60 network
+ is not yet functional.
+ * configs/stm3240g-eval/discover: A configuration for testing
+ the UDP discovery utility. Contributed by Max Holtzberg.
+ * mm/README.txt: Add a new README file.
+ * include/nuttx/usb/usb.h, arch/*/src/*usb.c, and arch/*/src/*otg*.c:
+ Add hooks to to use common, external DMA buffer allocation
+ implementation.
+ * net/recvfrom.c: Don't block in recvfrom if (1) read-ahead buffering
+ is enabled and (2) some data was obtained from read-ahead buffers.
+ Blocking is a bad idea in that case because there is no timeout!
+ (submitted by Max Holtzberg).
+ * configs/stm3240g-eval/xmlrpc: An example configuration for the
+ Embeddable Lightweight XML-RPC Server at apps/examples/xmlrpc.
+ See http://www.drdobbs.com/web-development/\
+ an-embeddable-lightweight-xml-rpc-server/184405364 for more info.
+ Contributed by Max Holtzberg.
+ * configs/*/nxwm/defconfig and sched/task_exithook.c: Fixes for
+ bugs that crept in during recent changes. (Submitted by Max
+ Holtzberg).
+ * arch/arm/include/armv7-m/irq.h: Fix a critical bug in irqsave().
+ It looks like sometimes the compile will re-order some instructions
+ inapproapriately. This end result is that interrupts will get
+ stuff off.
+ * drivers/mtd/w25.c: Beginning of a driver for the Windbond SPI
+ FLASH family (W25x16, W25x32, and W25x64). The initial check-in
+ is basically just the SST25 driver with some name changes.
+ * arch/arm/include/armv7-m/irq.h and arch/arm/src/stm32/stm32_spi.c:
+ Back out the last change in irq.h. It is (most likely) fine the
+ way it was. The really interrupt related problem was in stm32_spi.c:
+ When SPI3 is not enabled, then the irqrestore() falls in the
+ else clause.
+ * include/nuttx/compiler.h and other files: Moved always_inline
+ and noinline __attributes__ here. Also replaced all occurrences
+ of explicit __atributes__ in other files with definitions from
+ this header file.
+ * drivers/mtd/w25.c: The Windbond SPI FLASH W25 FLASH driver is
+ code complete (but still untested).
+
diff --git a/nuttx/Kconfig b/nuttx/Kconfig
index 7a8ba9bf28..f920e4984d 100644
--- a/nuttx/Kconfig
+++ b/nuttx/Kconfig
@@ -16,7 +16,7 @@ config NUTTX_NEWCONFIG
bool
default y
-menu "General Setup"
+menu "Build Setup"
config EXPERIMENTAL
bool "Prompt for development and/or incomplete code/drivers"
@@ -152,26 +152,91 @@ config RAW_BINARY
should not be selected if you are not using the GNU toolchain.
endmenu
+menu "Customize Header Files"
+
+config ARCH_STDBOOL_H
+ bool "stdbool.h"
+ default n
+ ---help---
+ The stdbool.h header file can be found at nuttx/include/stdbool.h.
+ However, that header includes logic to redirect the inclusion of an
+ architecture specific header file like:
+
+ #ifdef CONFIG_ARCH_STDBOOL_H
+ # include
+ #else
+ ...
+ #endif
+
+ Recall that that include path, include/arch, is a symbolic link and
+ will refer to a version of stdbool.h at nuttx/arch//include/stdbool.h.
+
+config ARCH_MATH_H
+ bool "math.h"
+ default n
+ ---help---
+ There is also a re-directing version of math.h in the source tree.
+ However, it resides out-of-the-way at include/nuttx/math.h because it
+ conflicts too often with the system math.h. If ARCH_MATH_H=y is
+ defined, however, the top-level makefile will copy the redirecting
+ math.h header file from include/nuttx/math.h to include/math.h. math.h
+ will then include the architecture-specific version of math.h that you
+ must provide at nuttx/arch/>architecture
+ #endif
+
+ So for the architectures that define ARCH_MATH_H=y, include/math.h
+ will be the redirecting math.h header file; for the architectures
+ that don't select ARCH_MATH_H, the redirecting math.h header file
+ will stay out-of-the-way in include/nuttx/.
+
+config ARCH_STDARG_H
+ bool "stdarg.h"
+ default n
+ ---help---
+ There is also a redirecting version of stdarg.h in the source tree
+ as well. It also resides out-of-the-way at include/nuttx/stdarg.h.
+ This is because you should normally use your toolchain's stdarg.h
+ file. But sometimes, your toolchain's stdarg.h file may have other
+ header file dependencies and so may not be usable in the NuttX build
+ environment. In those cases, you may have to create a architecture-
+ specific stdarg.h header file at nuttx/arch//include/stdarg.h
+
+ If ARCH_STDARG_H=y is defined, the top-level makefile will copy the
+ re-directing stdarg.h header file from include/nuttx/stdarg.h to
+ include/stdarg.h. So for the architectures that cannot use their
+ toolchain's stdarg.h file, they can use this alternative by defining
+ ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then
+ the stdarg.h header file will stay out-of-the-way in include/nuttx/.
+
+endmenu
+
menu "Debug Options"
config DEBUG
- bool "Enable debug output"
+ bool "Enable debug features"
default n
---help---
- enables built-in debug options
+ Enables built-in debug features. Selecting this option will (1) Enable
+ debug assertions in the code, (2) enable extended parameter testing in
+ many functions, and (3) enable support for debug output. Note that enabling
+ this option by itself does not produce debug output. Debug output must
+ also be selected on a subsystem-by-subsystem basis.
if DEBUG
config DEBUG_VERBOSE
bool "Enable debug verbose output"
default n
---help---
- enables verbose debug output
+ Enables verbose debug output (assuming debug output is enabled)
config DEBUG_ENABLE
bool "Enable debug controls"
default n
---help---
- Support an interface to enable or disable debug output.
+ Support an interface to dynamically enable or disable debug output.
config DEBUG_SCHED
bool "Enable scheduler debug output"
@@ -258,7 +323,7 @@ menu "Board Selection"
source "configs/Kconfig"
endmenu
-menu "Kernel Features"
+menu "RTOS Features"
source sched/Kconfig
endmenu
@@ -266,24 +331,24 @@ menu "Device Drivers"
source drivers/Kconfig
endmenu
-menu "Networking support"
+menu "Networking Support"
source net/Kconfig
endmenu
-menu "File systems"
+menu "File Systems"
source fs/Kconfig
endmenu
-menu "Memory management"
+menu "Memory Management"
source mm/Kconfig
endmenu
-menu "Library routines"
+menu "Library Routines"
source lib/Kconfig
source libxx/Kconfig
endmenu
-menu "Application configuration"
+menu "Application Configuration"
source "$APPSDIR/Kconfig"
endmenu
diff --git a/nuttx/Makefile b/nuttx/Makefile
index 1a51ca09b5..375538919b 100644
--- a/nuttx/Makefile
+++ b/nuttx/Makefile
@@ -603,7 +603,7 @@ distclean: clean subdir_distclean clean_context
ifeq ($(CONFIG_BUILD_2PASS),y)
@$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif
- @rm -f Make.defs setenv.sh .config
+ @rm -f Make.defs setenv.sh .config .config.old
# Application housekeeping targets. The APPDIR variable refers to the user
# application directory. A sample apps/ directory is included with NuttX,
@@ -616,9 +616,10 @@ endif
# apps_clean: Perform the clean operation only in the user application
# directory
# apps_distclean: Perform the distclean operation only in the user application
-# directory. Note that the apps/.config file is preserved
-# so that this is not a "full" distclean but more of a
-# configuration "reset."
+# directory. Note that the apps/.config file (inf any) is
+# preserved so that this is not a "full" distclean but more of a
+# configuration "reset." (There willnot be an apps/.config
+# file if the configuration was generated via make menuconfig).
apps_clean:
ifneq ($(APPDIR),)
@@ -627,10 +628,16 @@ endif
apps_distclean:
ifneq ($(APPDIR),)
- @cp "$(TOPDIR)/$(APPDIR)/.config" _SAVED_APPS_config || \
- { echo "Copy of $(APPDIR)/.config failed" ; exit 1 ; }
+ @if [ -r "$(TOPDIR)/$(APPDIR)/.config" ]; then \
+ cp "$(TOPDIR)/$(APPDIR)/.config" _SAVED_APPS_config || \
+ { echo "Copy of $(APPDIR)/.config failed" ; exit 1 ; } \
+ else \
+ rm -f _SAVED_APPS_config; \
+ fi
@$(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" distclean
- @mv _SAVED_APPS_config "$(TOPDIR)/$(APPDIR)/.config" || \
- { echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; }
+ @if [ -r _SAVED_APPS_config ]; then \
+ @mv _SAVED_APPS_config "$(TOPDIR)/$(APPDIR)/.config" || \
+ { echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } \
+ fi
endif
diff --git a/nuttx/README.txt b/nuttx/README.txt
index 28b4fba032..afea4d2e3f 100644
--- a/nuttx/README.txt
+++ b/nuttx/README.txt
@@ -654,6 +654,8 @@ nuttx
| | |- ostest/README.txt
| | |- poll/README.txt
| | `- README.txt
+ | |- fire-stm32v2/
+ | | `- README.txt
| |- hymini-stm32v/
| | |- include/README.txt
| | |- src/README.txt
@@ -735,6 +737,8 @@ nuttx
| | |- include/README.txt
| | |- src/README.txt
| | `- README.txt
+ | |- shenzhou/
+ | | `- README.txt
| |- skp16c26/
| | |- include/README.txt
| | |- src/README.txt
@@ -802,6 +806,8 @@ nuttx
| `- README.txt
|- libxx/
| `- README.txt
+ |- mm/
+ | `- README.txt
|- syscall/
| `- README.txt
`- tools/
@@ -820,6 +826,8 @@ apps
|- modbus/
| `- README.txt
|- netutils/
+ | |- discover
+ | | `- README.txt
| |- ftpc
| | `- README.txt
| |- telnetd
diff --git a/nuttx/TODO b/nuttx/TODO
index 543d15f707..72a94290b9 100644
--- a/nuttx/TODO
+++ b/nuttx/TODO
@@ -1,4 +1,4 @@
-NuttX TODO List (Last updated August 12, 2012)
+NuttX TODO List (Last updated September 16, 2012)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This file summarizes known NuttX bugs, limitations, inconsistencies with
@@ -6,7 +6,7 @@ standards, things that could be improved, and ideas for enhancements.
nuttx/
- (5) Task/Scheduler (sched/)
+ (6) Task/Scheduler (sched/)
(1) On-demand paging (sched/)
(1) Memory Managment (mm/)
(2) Signals (sched/, arch/)
@@ -110,6 +110,13 @@ o Task/Scheduler (sched/)
Status: Open
Priority: Low
+ Title: posix_spawn()
+ Description: This would be a good interface to add to NuttX. It is really
+ just a re-packaging of the existing, non-standard NuttX exec()
+ function.
+ Status: Open
+ Priority: Medium low.
+
o On-demand paging (sched/)
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -541,13 +548,6 @@ o Network (net/, drivers/net)
Status: Open
Priority: Low... fix defconfig files as necessary.
- Title: UNFINISHED ENC28J60 DRIVER
- Description: So far, I have not come up with a usable hardware platform to
- verify the ENC28J60 Ethernet driver (drivers/net/enc28j60.c).
- So it is untested.
- Status: Open
- Priority: Low unless you need it.
-
o USB (drivers/usbdev, drivers/usbhost)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/nuttx/arch/Kconfig b/nuttx/arch/Kconfig
index fea56b7392..bbe99c17c2 100644
--- a/nuttx/arch/Kconfig
+++ b/nuttx/arch/Kconfig
@@ -14,23 +14,27 @@ config ARCH_8051
config ARCH_ARM
bool "ARM"
+ select ARCH_HAVE_INTERRUPTSTACK
---help---
The ARM architectures
config ARCH_AVR
bool "AVR"
select ARCH_NOINTC
+ select ARCH_HAVE_INTERRUPTSTACK
---help---
Atmel 8-bit bit AVR and 32-bit AVR32 architectures
config ARCH_HC
bool "Freescale HC"
select ARCH_NOINTC
+ select ARCH_HAVE_INTERRUPTSTACK
---help---
Freescale HC architectures (M9S12)
config ARCH_MIPS
bool "MIPS"
+ select ARCH_HAVE_INTERRUPTSTACK
---help---
MIPS architectures (PIC32)
@@ -43,6 +47,7 @@ config ARCH_RGMP
config ARCH_SH
bool "Renesas"
select ARCH_NOINTC
+ select ARCH_HAVE_INTERRUPTSTACK
---help---
Renesas architectures (SH and M16C).
@@ -58,11 +63,13 @@ config ARCH_X86
config ARCH_Z16
bool "ZNEO"
+ select ARCH_HAVE_HEAP2
---help---
ZiLOG ZNEO 16-bit architectures (z16f).
config ARCH_Z80
bool "z80"
+ select ARCH_HAVE_HEAP2
---help---
ZiLOG 8-bit architectures (z80, ez80, z8).
@@ -100,6 +107,10 @@ config ARCH_NOINTC
bool
default n
+config ARCH_DMA
+ bool
+ default n
+
config ARCH_STACKDUMP
bool "Dump stack on assertions"
default n
@@ -117,11 +128,71 @@ config BOARD_LOOPSPERMSEC
is 100 seconds.
config DRAM_START
- hex "DRAM start address"
+ hex "DRAM start physical address"
help
- The physical start address of installed RAM.
+ The physical start address of installed RAM. Despite the naming,
+ this may be SDRAM or SRAM or any other RAM technology that support
+ program execution.
+
+config DRAM_VSTART
+ hex "DRAM start virtual address"
+ depends on ARCH_HAVE_MMU
+ help
+ The virtual start address of installed RAM. Despite the naming,
+ this may be SDRAM or SRAM or any other RAM technology that support
+ program execution.
config DRAM_SIZE
int "DRAM size"
help
- The size in bytes of the installed RAM.
+ The size in bytes of the installed RAM. Despite the naming,
+ this may be SDRAM or SRAM or any other RAM technology that support
+ program execution.
+
+config ARCH_HAVE_INTERRUPTSTACK
+ bool
+
+config ARCH_INTERRUPTSTACK
+ int "Interrupt Stack Size"
+ depends on ARCH_HAVE_INTERRUPTSTACK
+ default 0
+ ---help---
+ This architecture supports an interrupt stack. If defined, this symbol
+ will be the size of the interrupt stack in bytes. If not defined (or
+ defined to be zero), the user task stacks will be used during interrupt
+ handling.
+
+comment "Boot options"
+
+choice
+ prompt "Boot Mode"
+ default BOOT_RUNFROMFLASH
+
+config BOOT_RUNFROMEXTSRAM
+ bool "Run from external SRAM"
+ ---help---
+ Some configuration support booting and running from external SRAM.
+
+config BOOT_RUNFROMFLASH
+ bool "Boot and run from flash"
+ ---help---
+ Most configurations support XIP operation from FLASH but must copy
+ initialized .data sections to RAM. (This is the default).
+
+config BOOT_RUNFROMISRAM
+ bool "Boot and run from internal SRAM"
+ ---help---
+ Some configuration support booting and running from internal SRAM.
+
+config BOOT_RUNFROMSDRAM
+ bool "Boot and run from external SDRAM"
+ ---help---
+ Some configuration support booting and running from external SDRAM.
+
+config BOOT_COPYTORAM
+ bool "Boot from FLASH but copy to ram"
+ ---help---
+ Some configurations boot in FLASH but copy themselves entirely into
+ RAM for better performance.
+
+endchoice
diff --git a/nuttx/arch/arm/Kconfig b/nuttx/arch/arm/Kconfig
index f587cc274c..3bd5312326 100644
--- a/nuttx/arch/arm/Kconfig
+++ b/nuttx/arch/arm/Kconfig
@@ -10,71 +10,106 @@ choice
config ARCH_CHIP_C5471
bool "TMS320 C5471"
+ select ARCH_ARM7TDMI
+ select ARCH_HAVE_LOWVECTORS
---help---
TI TMS320 C5471, A180, or DA180 (ARM7TDMI)
config ARCH_CHIP_CALYPSO
bool "Calypso"
+ select ARCH_ARM7TDMI
+ select ARCH_HAVE_HEAP2
+ select ARCH_HAVE_LOWVECTORS
---help---
TI Calypso-based cell phones (ARM7TDMI)
config ARCH_CHIP_DM320
bool "TMS320 DM320"
+ select ARCH_ARM926EJS
+ select ARCH_HAVE_LOWVECTORS
+ select ARCH_HAVE_MMU
---help---
TI DMS320 DM320 (ARM926EJS)
config ARCH_CHIP_IMX
bool "Freescale iMX"
+ select ARCH_ARM920T
+ select ARCH_HAVE_HEAP2
+ select ARCH_HAVE_LOWVECTORS
+ select ARCH_HAVE_MMU
---help---
Freescale iMX architectures (ARM920T)
config ARCH_CHIP_KINETIS
bool "Freescale Kinetis"
+ select ARCH_CORTEXM4
+ select ARCH_HAVE_MPU
---help---
Freescale Kinetis Architectures (ARM Cortex-M4)
config ARCH_CHIP_LM3S
bool "TI Stellaris"
+ select ARCH_CORTEXM3
+ select ARCH_HAVE_MPU
---help---
TI Stellaris LMS3 architecutres (ARM Cortex-M3)
config ARCH_CHIP_LPC17XX
bool "NXP LPC17xx"
+ select ARCH_CORTEXM3
+ select ARCH_HAVE_MPU
---help---
NXP LPC17xx architectures (ARM Cortex-M3)
config ARCH_CHIP_LPC214X
bool "NXP LPC214x"
+ select ARCH_ARM7TDMI
+ select ARCH_HAVE_LOWVECTORS
---help---
NXP LPC2145x architectures (ARM7TDMI)
config ARCH_CHIP_LPC2378
bool "NXP LPC2378"
+ select ARCH_ARM7TDMI
+ select ARCH_HAVE_LOWVECTORS
---help---
NXP LPC2145x architectures (ARM7TDMI)
config ARCH_CHIP_LPC31XX
bool "NXP LPC31XX"
+ select ARCH_ARM926EJS
+ select ARCH_HAVE_LOWVECTORS
+ select ARCH_HAVE_MMU
---help---
NPX LPC31XX architectures (ARM926EJS).
config ARCH_CHIP_LPC43XX
bool "NXP LPC43XX"
+ select ARCH_CORTEXM4
+ select ARCH_HAVE_CMNVECTOR
+ select ARMV7M_CMNVECTOR
+ select ARCH_HAVE_MPU
---help---
NPX LPC43XX architectures (ARM Cortex-M4).
config ARCH_CHIP_SAM3U
bool "Atmel AT91SAM3U"
+ select ARCH_CORTEXM3
+ select ARCH_HAVE_MPU
---help---
Atmel AT91SAM3U architectures (ARM Cortex-M3)
config ARCH_CHIP_STM32
bool "STMicro STM32"
+ select ARCH_HAVE_CMNVECTOR
+ select ARCH_HAVE_MPU
---help---
STMicro STM32 architectures (ARM Cortex-M3/4).
config ARCH_CHIP_STR71X
bool "STMicro STR71x"
+ select ARCH_ARM7TDMI
+ select ARCH_HAVE_LOWVECTORS
---help---
STMicro STR71x architectures (ARM7TDMI).
@@ -82,24 +117,23 @@ endchoice
config ARCH_ARM7TDMI
bool
- default y if ARCH_CHIP_C5471 || ARCH_CHIP_CALYPSO || ARCH_CHIP_LPC214X || ARCH_CHIP_LPC2378 || ARCH_CHIP_STR71X
config ARCH_ARM926EJS
bool
- default y if ARCH_CHIP_DM320 || ARCH_CHIP_LPC31XX
config ARCH_ARM920T
bool
- default y if ARCH_CHIP_IMX
-config ARCH_CORTEXM
+config ARCH_CORTEXM3
+ bool
+
+config ARCH_CORTEXM4
bool
- default y if ARCH_CHIP_KINETIS || ARCH_CHIP_LM3S || ARCH_CHIP_LPC17XX || ARCH_CHIP_LPC43XX || ARCH_CHIP_SAM3U || ARCH_CHIP_STM32
config ARCH_FAMILY
string
default "arm" if ARCH_ARM7TDMI || ARCH_ARM926EJS || ARCH_ARM920T
- default "armv7-m" if ARCH_CORTEXM
+ default "armv7-m" if ARCH_CORTEXM3 || ARCH_CORTEXM4
config ARCH_CHIP
string
@@ -109,7 +143,7 @@ config ARCH_CHIP
default "imx" if ARCH_CHIP_IMX
default "kinetis" if ARCH_CHIP_KINETIS
default "lm3s" if ARCH_CHIP_LM3S
- default "lpc17x" if ARCH_CHIP_LPC17XX
+ default "lpc17xx" if ARCH_CHIP_LPC17XX
default "lpc214x" if ARCH_CHIP_LPC214X
default "lpc2378" if ARCH_CHIP_LPC2378
default "lpc31xx" if ARCH_CHIP_LPC31XX
@@ -118,27 +152,77 @@ config ARCH_CHIP
default "stm32" if ARCH_CHIP_STM32
default "str71x" if ARCH_CHIP_STR71X
-config ARCH_LEDS
- bool "Use board LEDs to show state"
- default y
+config ARMV7M_CMNVECTOR
+ bool "Use common ARMv7-M vectors"
+ default n
+ depends on ARCH_HAVE_CMNVECTOR
---help---
- Use LEDs to show state. Unique to boards that have LEDs
+ Some architectures use their own, built-in vector logic. Some use only
+ the common vector logic. Some can use either their own built-in vector
+ logic or the common vector logic. This applies only to ARMv7-M
+ architectures.
-config ARCH_INTERRUPTSTACK
- bool "Use interrupt stack"
+config ARCH_FPU
+ bool "FPU support"
default y
+ depends on ARCH_CORTEXM4
---help---
- This architecture supports an interrupt stack. If defined, this symbol
- is the size of the interrupt stack in bytes. If not defined, the user
- task stacks will be used during interrupt handling.
+ Build in support for the ARM Cortex-M4 Floating Point Unit (FPU).
+ Check your chip specifications first; not all Cortex-M4 chips support the FPU.
+
+config ARCH_HAVE_MPU
+ bool
+
+config ARMV7M_MPU
+ bool "MPU support"
+ default n
+ depends on ARCH_HAVE_MPU
+ ---help---
+ Build in support for the ARM Cortex-M3/4 Memory Protection Unit (MPU).
+ Check your chip specifications first; not all Cortex-M3/4 chips support the MPU.
+
+config ARCH_HAVE_LOWVECTORS
+ bool
+
+config ARCH_LOWVECTORS
+ bool "Vectors in low memory"
+ default n
+ depends on ARCH_HAVE_LOWVECTORS
+ ---help---
+ Support ARM vectors in low memory.
+
+config ARCH_HAVE_MMU
+ bool
+
+config PGTABLE_VADDR
+ hex "Page table virtual address"
+ depends on ARCH_HAVE_MMU
+ ---help---
+ Page table virtual address (might be defined in the board.h file). Not
+ applicable to all architectures.
+
+config ARCH_ROMPGTABLE
+ bool "ROM page table"
+ default n
+ depends on ARCH_HAVE_MMU
+ ---help---
+ Support a fixed memory mapping use a (read-only) page table in ROM/FLASH.
+
+config PAGING
+ bool "On-demand paging"
+ default n
+ depends on ARCH_HAVE_MMU && !ARCH_ROMPGTABLE
+ ---help---
+ If set =y in your configation file, this setting will enable the on-demand
+ paging feature as described in http://www.nuttx.org/NuttXDemandPaging.html.
config ARCH_IRQPRIO
bool "Interrupt priority"
- default y if ARCH_CORTEXM
+ default y if ARCH_CORTEXM3 || ARCH_CORTEXM4
---help---
Select if your board supports interrupt prioritization.
-config ARCH_LOOPSPERMSEC
+config BOARD_LOOPSPERMSEC
int "Delay loops per millisecond"
default 5000
---help---
@@ -150,8 +234,8 @@ config ARCH_CALIBRATION
---help---
Enables some built in instrumentation that causes a 100 second delay
during boot-up. This 100 second delay serves no purpose other than it
- allows you to calibratre ARCH_LOOPSPERMSEC. You simply use a stop
- watch to measure the 100 second delay then adjust ARCH_LOOPSPERMSEC until
+ allows you to calibratre BOARD_LOOPSPERMSEC. You simply use a stop
+ watch to measure the 100 second delay then adjust BOARD_LOOPSPERMSEC until
the delay actually is 100 seconds.
if ARCH_CHIP_C5471
diff --git a/nuttx/arch/arm/include/arch.h b/nuttx/arch/arm/include/arch.h
index dd750ad77a..d0b2602eba 100644
--- a/nuttx/arch/arm/include/arch.h
+++ b/nuttx/arch/arm/include/arch.h
@@ -2,7 +2,7 @@
* arch/arm/include/arch.h
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/include/arm/irq.h b/nuttx/arch/arm/include/arm/irq.h
index 6b4f05539a..a06abe8886 100644
--- a/nuttx/arch/arm/include/arm/irq.h
+++ b/nuttx/arch/arm/include/arm/irq.h
@@ -2,7 +2,7 @@
* arch/arm/include/arm/irq.h
*
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/include/arm/syscall.h b/nuttx/arch/arm/include/arm/syscall.h
index e06de1a3c2..3fc36c3db0 100644
--- a/nuttx/arch/arm/include/arm/syscall.h
+++ b/nuttx/arch/arm/include/arm/syscall.h
@@ -2,7 +2,7 @@
* arch/arm/include/arm/syscall.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/include/armv7-m/irq.h b/nuttx/arch/arm/include/armv7-m/irq.h
index 6cef85c02a..606b3988f4 100644
--- a/nuttx/arch/arm/include/armv7-m/irq.h
+++ b/nuttx/arch/arm/include/armv7-m/irq.h
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/include/armv7-m/irq.h
*
- * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -48,6 +48,7 @@
#include
#ifndef __ASSEMBLY__
+# include
# include
#endif
@@ -131,6 +132,7 @@ struct xcptcontext
/* Disable IRQs */
+static inline void irqdisable(void) inline_function;
static inline void irqdisable(void)
{
__asm__ __volatile__ ("\tcpsid i\n");
@@ -138,6 +140,7 @@ static inline void irqdisable(void)
/* Save the current primask state & disable IRQs */
+static inline irqstate_t irqsave(void) inline_function;
static inline irqstate_t irqsave(void)
{
unsigned short primask;
@@ -153,11 +156,13 @@ static inline irqstate_t irqsave(void)
: "=r" (primask)
:
: "memory");
+
return primask;
}
/* Enable IRQs */
+static inline void irqenable(void) inline_function;
static inline void irqenable(void)
{
__asm__ __volatile__ ("\tcpsie i\n");
@@ -165,6 +170,7 @@ static inline void irqenable(void)
/* Restore saved primask state */
+static inline void irqrestore(irqstate_t primask) inline_function;
static inline void irqrestore(irqstate_t primask)
{
/* If bit 0 of the primask is 0, then we need to restore
@@ -184,6 +190,7 @@ static inline void irqrestore(irqstate_t primask)
/* Get/set the primask register */
+static inline uint8_t getprimask(void) inline_function;
static inline uint8_t getprimask(void)
{
uint32_t primask;
@@ -193,9 +200,11 @@ static inline uint8_t getprimask(void)
: "=r" (primask)
:
: "memory");
+
return (uint8_t)primask;
}
+static inline void setprimask(uint32_t primask) inline_function;
static inline void setprimask(uint32_t primask)
{
__asm__ __volatile__
@@ -208,18 +217,22 @@ static inline void setprimask(uint32_t primask)
/* Get/set the basepri register */
+static inline uint8_t getbasepri(void) inline_function;
static inline uint8_t getbasepri(void)
{
uint32_t basepri;
+
__asm__ __volatile__
(
"\tmrs %0, basepri\n"
: "=r" (basepri)
:
: "memory");
+
return (uint8_t)basepri;
}
+static inline void setbasepri(uint32_t basepri) inline_function;
static inline void setbasepri(uint32_t basepri)
{
__asm__ __volatile__
@@ -232,6 +245,7 @@ static inline void setbasepri(uint32_t basepri)
/* Get/set IPSR */
+static inline uint32_t getipsr(void) inline_function;
static inline uint32_t getipsr(void)
{
uint32_t ipsr;
@@ -241,9 +255,11 @@ static inline uint32_t getipsr(void)
: "=r" (ipsr)
:
: "memory");
+
return ipsr;
}
+static inline void setipsr(uint32_t ipsr) inline_function;
static inline void setipsr(uint32_t ipsr)
{
__asm__ __volatile__
@@ -256,6 +272,7 @@ static inline void setipsr(uint32_t ipsr)
/* Get/set CONTROL */
+static inline uint32_t getcontrol(void) inline_function;
static inline uint32_t getcontrol(void)
{
uint32_t control;
@@ -265,9 +282,11 @@ static inline uint32_t getcontrol(void)
: "=r" (control)
:
: "memory");
+
return control;
}
+static inline void setcontrol(uint32_t control) inline_function;
static inline void setcontrol(uint32_t control)
{
__asm__ __volatile__
diff --git a/nuttx/arch/arm/include/armv7-m/syscall.h b/nuttx/arch/arm/include/armv7-m/syscall.h
index 4c7b843021..4278c3a36b 100644
--- a/nuttx/arch/arm/include/armv7-m/syscall.h
+++ b/nuttx/arch/arm/include/armv7-m/syscall.h
@@ -2,7 +2,7 @@
* arch/arm/include/armv7-m/syscall.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/include/irq.h b/nuttx/arch/arm/include/irq.h
index 71493a9fed..bde751b990 100644
--- a/nuttx/arch/arm/include/irq.h
+++ b/nuttx/arch/arm/include/irq.h
@@ -2,7 +2,7 @@
* arch/arm/include/irq.h
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/include/serial.h b/nuttx/arch/arm/include/serial.h
index 80eefb2b4a..844f78a2b9 100644
--- a/nuttx/arch/arm/include/serial.h
+++ b/nuttx/arch/arm/include/serial.h
@@ -2,7 +2,7 @@
* arch/arm/include/serial.h
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/include/stm32/chip.h b/nuttx/arch/arm/include/stm32/chip.h
index 2bf1d79b45..d01929e1ca 100644
--- a/nuttx/arch/arm/include/stm32/chip.h
+++ b/nuttx/arch/arm/include/stm32/chip.h
@@ -56,6 +56,8 @@
* the chip datasheet.
*/
+/* STM32 F100 Value Line ************************************************************/
+
#if defined(CONFIG_ARCH_CHIP_STM32F100C8) || defined(CONFIG_ARCH_CHIP_STM32F100CB) \
|| defined(CONFIG_ARCH_CHIP_STM32F100R8) || defined(CONFIG_ARCH_CHIP_STM32F100RB) \
|| defined(CONFIG_ARCH_CHIP_STM32F100V8) || defined(CONFIG_ARCH_CHIP_STM32F100VB)
@@ -87,34 +89,10 @@
# define STM32_NRNG 0 /* No random number generator (RNG) */
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
-#elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
-# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
-# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
-# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
-# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
-# undef CONFIG_STM32_VALUELINE /* STM32F100x */
-# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
-# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
-# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */
-# define STM32_NFSMC 1 /* FSMC */
-# define STM32_NATIM 1 /* One advanced timer TIM1 */
-# define STM32_NGTIM 4 /* 16-bit generall timers TIM2,3,4,5 with DMA */
-# define STM32_NBTIM 0 /* No basic timers */
-# define STM32_NDMA 2 /* DMA1-2 */
-# define STM32_NSPI 2 /* SPI1-2 */
-# define STM32_NI2S 0 /* No I2S (?) */
-# define STM32_NUSART 3 /* USART1-3 */
-# define STM32_NI2C 2 /* I2C1-2 */
-# define STM32_NCAN 1 /* CAN1 */
-# define STM32_NSDIO 1 /* SDIO */
-# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */
-# define STM32_NGPIO 112 /* GPIOA-G */
-# define STM32_NADC 1 /* ADC1 */
-# define STM32_NDAC 0 /* No DAC */
-# define STM32_NCRC 0 /* No CRC */
-# define STM32_NETHERNET 0 /* No ethernet */
-# define STM32_NRNG 0 /* No random number generator (RNG) */
-# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
+/* STM32 F103 High Density Family ***************************************************/
+/* STM32F103RC, STM32F103RD, and STM32F103RE are all provided in 64 pin packages and differ
+ * only in the available FLASH and SRAM.
+ */
#elif defined(CONFIG_ARCH_CHIP_STM32F103RET6)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
@@ -145,7 +123,11 @@
# define STM32_NRNG 0 /* No random number generator (RNG) */
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
-#elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6)
+/* STM32F103VC, STM32F103VD, and STM32F103VE are all provided in 100 pin packages and differ
+ * only in the available FLASH and SRAM.
+ */
+
+#elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) || defined(CONFIG_ARCH_CHIP_STM32F103VET6)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
@@ -174,6 +156,40 @@
# define STM32_NRNG 0 /* No random number generator (RNG) */
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
+/* STM32F103ZC, STM32F103ZD, and STM32F103ZE are all provided in 144 pin packages and differ
+ * only in the available FLASH and SRAM.
+ */
+
+#elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
+# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
+# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
+# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
+# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
+# undef CONFIG_STM32_VALUELINE /* STM32F100x */
+# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
+# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
+# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */
+# define STM32_NFSMC 1 /* FSMC */
+# define STM32_NATIM 1 /* One advanced timer TIM1 */
+# define STM32_NGTIM 4 /* 16-bit generall timers TIM2,3,4,5 with DMA */
+# define STM32_NBTIM 0 /* No basic timers */
+# define STM32_NDMA 2 /* DMA1-2 */
+# define STM32_NSPI 2 /* SPI1-2 */
+# define STM32_NI2S 0 /* No I2S (?) */
+# define STM32_NUSART 3 /* USART1-3 */
+# define STM32_NI2C 2 /* I2C1-2 */
+# define STM32_NCAN 1 /* CAN1 */
+# define STM32_NSDIO 1 /* SDIO */
+# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */
+# define STM32_NGPIO 112 /* GPIOA-G */
+# define STM32_NADC 1 /* ADC1 */
+# define STM32_NDAC 0 /* No DAC */
+# define STM32_NCRC 0 /* No CRC */
+# define STM32_NETHERNET 0 /* No ethernet */
+# define STM32_NRNG 0 /* No random number generator (RNG) */
+# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
+
+/* STM32 F105/F107 Connectivity Line *******************************************************/
#elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
@@ -232,6 +248,7 @@
# define STM32_NRNG 0 /* No random number generator (RNG) */
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
+/* STM32 F2 Family ******************************************************************/
#elif defined(CONFIG_ARCH_CHIP_STM32F207IG) /* UFBGA-176 1024Kb FLASH 128Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
@@ -263,6 +280,7 @@
# define STM32_NRNG 1 /* Random number generator (RNG) */
# define STM32_NDCMI 1 /* Digital camera interface (DCMI) */
+/* STM23 F4 Family ******************************************************************/
#elif defined(CONFIG_ARCH_CHIP_STM32F405RG) /* LQFP 64 10x10x1.4 1024Kb FLASH 192Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
diff --git a/nuttx/arch/arm/include/syscall.h b/nuttx/arch/arm/include/syscall.h
index 4c9eee63ef..8b438200a8 100644
--- a/nuttx/arch/arm/include/syscall.h
+++ b/nuttx/arch/arm/include/syscall.h
@@ -2,7 +2,7 @@
* arch/arm/include/syscall.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/include/types.h b/nuttx/arch/arm/include/types.h
index c3471ca59b..c06b289503 100644
--- a/nuttx/arch/arm/include/types.h
+++ b/nuttx/arch/arm/include/types.h
@@ -2,7 +2,7 @@
* arch/arm/include/types.h
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/include/watchdog.h b/nuttx/arch/arm/include/watchdog.h
index f70b8d2e9a..43fbac2be8 100644
--- a/nuttx/arch/arm/include/watchdog.h
+++ b/nuttx/arch/arm/include/watchdog.h
@@ -2,7 +2,7 @@
* arch/arm/include/watchdog.h
*
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/Makefile b/nuttx/arch/arm/src/Makefile
index ef04153756..74be6c18d1 100644
--- a/nuttx/arch/arm/src/Makefile
+++ b/nuttx/arch/arm/src/Makefile
@@ -111,11 +111,6 @@ nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT)
@echo "LD: nuttx"
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \
--start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group
-ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y)
- @export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \
- $(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(NUTTX)$(EXEEXT) $(NUTTX).flashimage
- @mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT)
-endif
@$(NM) $(NUTTX)$(EXEEXT) | \
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
sort > $(TOPDIR)/System.map
diff --git a/nuttx/arch/arm/src/armv7-m/psr.h b/nuttx/arch/arm/src/armv7-m/psr.h
index 30913f7c9e..b8b33c80f6 100644
--- a/nuttx/arch/arm/src/armv7-m/psr.h
+++ b/nuttx/arch/arm/src/armv7-m/psr.h
@@ -2,7 +2,7 @@
* arch/arm/src/armv7-m/psr.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/armv7-m/svcall.h b/nuttx/arch/arm/src/armv7-m/svcall.h
index 51b5b9111a..6758297999 100644
--- a/nuttx/arch/arm/src/armv7-m/svcall.h
+++ b/nuttx/arch/arm/src/armv7-m/svcall.h
@@ -2,7 +2,7 @@
* arch/arm/src/armv7-m/svcall.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -74,7 +74,7 @@
/* SYS call 1:
*
- * void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
+ * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
*/
#define SYS_restore_context (1)
diff --git a/nuttx/arch/arm/src/armv7-m/up_assert.c b/nuttx/arch/arm/src/armv7-m/up_assert.c
index 77fd0b596f..282ff6a57d 100644
--- a/nuttx/arch/arm/src/armv7-m/up_assert.c
+++ b/nuttx/arch/arm/src/armv7-m/up_assert.c
@@ -1,8 +1,8 @@
/****************************************************************************
* arch/arm/src/armv7-m/up_assert.c
*
- * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -262,7 +262,7 @@ static void up_dumpstate(void)
* Name: _up_assert
****************************************************************************/
-static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
+static void _up_assert(int errorcode) /* noreturn_function */
{
/* Are we in an interrupt handler or the idle task? */
diff --git a/nuttx/arch/arm/src/armv7-m/up_blocktask.c b/nuttx/arch/arm/src/armv7-m/up_blocktask.c
old mode 100755
new mode 100644
diff --git a/nuttx/arch/arm/src/armv7-m/up_copystate.c b/nuttx/arch/arm/src/armv7-m/up_copystate.c
index a5ad312f5e..e9eede8f99 100644
--- a/nuttx/arch/arm/src/armv7-m/up_copystate.c
+++ b/nuttx/arch/arm/src/armv7-m/up_copystate.c
@@ -2,7 +2,7 @@
* arch/arm/src/armv7-m/up_copystate.c
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/armv7-m/up_doirq.c b/nuttx/arch/arm/src/armv7-m/up_doirq.c
index 7ac1ec34db..375054fba6 100644
--- a/nuttx/arch/arm/src/armv7-m/up_doirq.c
+++ b/nuttx/arch/arm/src/armv7-m/up_doirq.c
@@ -2,7 +2,7 @@
* arch/arm/src/armv7-m/up_doirq.c
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/armv7-m/up_fullcontextrestore.S b/nuttx/arch/arm/src/armv7-m/up_fullcontextrestore.S
index 3ce51c9cd6..4c77b66b89 100755
--- a/nuttx/arch/arm/src/armv7-m/up_fullcontextrestore.S
+++ b/nuttx/arch/arm/src/armv7-m/up_fullcontextrestore.S
@@ -69,7 +69,7 @@
* Description:
* Restore the current thread context. Full prototype is:
*
- * void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
+ * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
*
* Return:
* None
diff --git a/nuttx/arch/arm/src/armv7-m/up_hardfault.c b/nuttx/arch/arm/src/armv7-m/up_hardfault.c
index a9eea81036..cb3ce9e8a9 100644
--- a/nuttx/arch/arm/src/armv7-m/up_hardfault.c
+++ b/nuttx/arch/arm/src/armv7-m/up_hardfault.c
@@ -2,7 +2,7 @@
* arch/arm/src/armv7-m/up_hardfault.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/armv7-m/up_memfault.c b/nuttx/arch/arm/src/armv7-m/up_memfault.c
index bbe3f6573f..ab93c7697d 100644
--- a/nuttx/arch/arm/src/armv7-m/up_memfault.c
+++ b/nuttx/arch/arm/src/armv7-m/up_memfault.c
@@ -2,7 +2,7 @@
* arch/arm/src/armv7-m/up_memfault.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/armv7-m/up_mpu.c b/nuttx/arch/arm/src/armv7-m/up_mpu.c
index 27936562c9..4bb3f21d98 100644
--- a/nuttx/arch/arm/src/armv7-m/up_mpu.c
+++ b/nuttx/arch/arm/src/armv7-m/up_mpu.c
@@ -2,7 +2,7 @@
* arch/arm/src/armv7-m/up_mpu.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/armv7-m/up_releasepending.c b/nuttx/arch/arm/src/armv7-m/up_releasepending.c
old mode 100755
new mode 100644
diff --git a/nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c b/nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c
old mode 100755
new mode 100644
diff --git a/nuttx/arch/arm/src/armv7-m/up_saveusercontext.S b/nuttx/arch/arm/src/armv7-m/up_saveusercontext.S
index c8da074303..06eb183d21 100755
--- a/nuttx/arch/arm/src/armv7-m/up_saveusercontext.S
+++ b/nuttx/arch/arm/src/armv7-m/up_saveusercontext.S
@@ -2,7 +2,7 @@
* arch/arm/src/armv7-m/up_saveusercontext.S
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c b/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c
index 3c340b8d3c..38673c41d4 100644
--- a/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c
+++ b/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c
@@ -2,7 +2,7 @@
* arch/arm/src/armv7-m/up_sigdeliver.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/armv7-m/up_svcall.c b/nuttx/arch/arm/src/armv7-m/up_svcall.c
index 5a4d64fe20..d32f0afc2a 100644
--- a/nuttx/arch/arm/src/armv7-m/up_svcall.c
+++ b/nuttx/arch/arm/src/armv7-m/up_svcall.c
@@ -280,7 +280,7 @@ int up_svcall(int irq, FAR void *context)
/* R0=SYS_restore_context: This a restore context command:
*
- * void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
+ * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
*
* At this point, the following values are saved in context:
*
diff --git a/nuttx/arch/arm/src/armv7-m/up_switchcontext.S b/nuttx/arch/arm/src/armv7-m/up_switchcontext.S
index 854f6fa162..762e2066e8 100755
--- a/nuttx/arch/arm/src/armv7-m/up_switchcontext.S
+++ b/nuttx/arch/arm/src/armv7-m/up_switchcontext.S
@@ -2,7 +2,7 @@
* arch/arm/src/armv7-m/up_switchcontext.S
*
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/armv7-m/up_unblocktask.c b/nuttx/arch/arm/src/armv7-m/up_unblocktask.c
old mode 100755
new mode 100644
diff --git a/nuttx/arch/arm/src/common/up_allocateheap.c b/nuttx/arch/arm/src/common/up_allocateheap.c
index fbd1421a74..d4b763196e 100644
--- a/nuttx/arch/arm/src/common/up_allocateheap.c
+++ b/nuttx/arch/arm/src/common/up_allocateheap.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_allocateheap.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_arch.h b/nuttx/arch/arm/src/common/up_arch.h
index b612f6af25..af29bbf652 100644
--- a/nuttx/arch/arm/src/common/up_arch.h
+++ b/nuttx/arch/arm/src/common/up_arch.h
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_arch.h
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_checkstack.c b/nuttx/arch/arm/src/common/up_checkstack.c
index 6c13f63d13..ac8d9e7b91 100644
--- a/nuttx/arch/arm/src/common/up_checkstack.c
+++ b/nuttx/arch/arm/src/common/up_checkstack.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_checkstack.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_etherstub.c b/nuttx/arch/arm/src/common/up_etherstub.c
old mode 100755
new mode 100644
index 1c4a71ce68..407e7b45bc
--- a/nuttx/arch/arm/src/common/up_etherstub.c
+++ b/nuttx/arch/arm/src/common/up_etherstub.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_etherstub.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_idle.c b/nuttx/arch/arm/src/common/up_idle.c
index 62557c3a8d..187af76e7d 100644
--- a/nuttx/arch/arm/src/common/up_idle.c
+++ b/nuttx/arch/arm/src/common/up_idle.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_idle.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
index 45cb1dcc09..9f20775c09 100644
--- a/nuttx/arch/arm/src/common/up_internal.h
+++ b/nuttx/arch/arm/src/common/up_internal.h
@@ -40,7 +40,10 @@
* Included Files
****************************************************************************/
+#include
+
#ifndef __ASSEMBLY__
+# include
# include
# include
#endif
@@ -223,7 +226,7 @@ extern void up_boot(void);
extern void up_copystate(uint32_t *dest, uint32_t *src);
extern void up_decodeirq(uint32_t *regs);
extern int up_saveusercontext(uint32_t *saveregs);
-extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
+extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
/* Signal handling **********************************************************/
diff --git a/nuttx/arch/arm/src/common/up_interruptcontext.c b/nuttx/arch/arm/src/common/up_interruptcontext.c
index b67ad523a2..0039692bcd 100644
--- a/nuttx/arch/arm/src/common/up_interruptcontext.c
+++ b/nuttx/arch/arm/src/common/up_interruptcontext.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_interruptcontext.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_lowputs.c b/nuttx/arch/arm/src/common/up_lowputs.c
index 8b2919a05e..890167e0ef 100644
--- a/nuttx/arch/arm/src/common/up_lowputs.c
+++ b/nuttx/arch/arm/src/common/up_lowputs.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_lowputs.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_mdelay.c b/nuttx/arch/arm/src/common/up_mdelay.c
index b9b9ffc0e4..2c04476206 100644
--- a/nuttx/arch/arm/src/common/up_mdelay.c
+++ b/nuttx/arch/arm/src/common/up_mdelay.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_mdelay.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_modifyreg16.c b/nuttx/arch/arm/src/common/up_modifyreg16.c
index e488a6eee3..32ebd6f96a 100644
--- a/nuttx/arch/arm/src/common/up_modifyreg16.c
+++ b/nuttx/arch/arm/src/common/up_modifyreg16.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_modifyreg16.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_modifyreg32.c b/nuttx/arch/arm/src/common/up_modifyreg32.c
index 8b93f6b84f..a878732847 100644
--- a/nuttx/arch/arm/src/common/up_modifyreg32.c
+++ b/nuttx/arch/arm/src/common/up_modifyreg32.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_modifyreg32.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_modifyreg8.c b/nuttx/arch/arm/src/common/up_modifyreg8.c
index 2c9dbac250..92ed48eff2 100644
--- a/nuttx/arch/arm/src/common/up_modifyreg8.c
+++ b/nuttx/arch/arm/src/common/up_modifyreg8.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_modifyreg8.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_puts.c b/nuttx/arch/arm/src/common/up_puts.c
index 4e74f0cdc3..f56dbf07e5 100644
--- a/nuttx/arch/arm/src/common/up_puts.c
+++ b/nuttx/arch/arm/src/common/up_puts.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_puts.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_releasestack.c b/nuttx/arch/arm/src/common/up_releasestack.c
index 407bd1b544..82f5db88ff 100644
--- a/nuttx/arch/arm/src/common/up_releasestack.c
+++ b/nuttx/arch/arm/src/common/up_releasestack.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_releasestack.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_udelay.c b/nuttx/arch/arm/src/common/up_udelay.c
index d2d5b74d93..8fcb935223 100644
--- a/nuttx/arch/arm/src/common/up_udelay.c
+++ b/nuttx/arch/arm/src/common/up_udelay.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_udelay.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/common/up_usestack.c b/nuttx/arch/arm/src/common/up_usestack.c
index f46be0cc90..a3f4f48163 100644
--- a/nuttx/arch/arm/src/common/up_usestack.c
+++ b/nuttx/arch/arm/src/common/up_usestack.c
@@ -2,7 +2,7 @@
* arch/arm/src/common/up_usestack.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig
index bf7c59c11a..b5d0306dab 100644
--- a/nuttx/arch/arm/src/stm32/Kconfig
+++ b/nuttx/arch/arm/src/stm32/Kconfig
@@ -3,81 +3,188 @@
# see misc/tools/kconfig-language.txt.
#
+comment "STM32 Configuration Options"
+
choice
prompt "STM32 Chip Selection"
default ARCH_CHIP_STM32F103ZET6
depends on ARCH_CHIP_STM32
-config ARCH_CHIP_STM32F103ZET6
- bool "STM32F103ZET6"
+config ARCH_CHIP_STM32F100C8
+ bool "STM32F100C8"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_VALUELINE
+
+config ARCH_CHIP_STM32F100CB
+ bool "STM32F100CB"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_VALUELINE
+
+config ARCH_CHIP_STM32F100R8
+ bool "STM32F100R8"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_VALUELINE
+
+config ARCH_CHIP_STM32F100RB
+ bool "STM32F100RB"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_VALUELINE
+
+config ARCH_CHIP_STM32F100V8
+ bool "STM32F100V8"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_VALUELINE
+
+config ARCH_CHIP_STM32F100VB
+ bool "STM32F100VB"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_VALUELINE
config ARCH_CHIP_STM32F103RET6
bool "STM32F103RET6"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_HIGHDENSITY
config ARCH_CHIP_STM32F103VCT6
bool "STM32F103VCT6"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_HIGHDENSITY
+
+config ARCH_CHIP_STM32F103VET6
+ bool "STM32F103VET6"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_HIGHDENSITY
+
+config ARCH_CHIP_STM32F103ZET6
+ bool "STM32F103ZET6"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
config ARCH_CHIP_STM32F105VBT7
bool "STM32F105VBT7"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_CONNECTIVITYLINE
config ARCH_CHIP_STM32F107VC
bool "STM32F107VC"
+ select ARCH_CORTEXM3
+ select STM32_STM32F10XX
+ select STM32_CONNECTIVITYLINE
config ARCH_CHIP_STM32F207IG
bool "STM32F207IG"
+ select ARCH_CORTEXM3
+ select STM32_STM32F20XX
config ARCH_CHIP_STM32F405RG
bool "STM32F405RG"
+ select ARCH_CORTEXM4
+ select STM32_STM32F40XX
config ARCH_CHIP_STM32F405VG
bool "STM32F405VG"
+ select ARCH_CORTEXM4
+ select STM32_STM32F40XX
config ARCH_CHIP_STM32F405ZG
bool "STM32F405ZG"
+ select ARCH_CORTEXM4
+ select STM32_STM32F40XX
config ARCH_CHIP_STM32F407VE
bool "STM32F407VE"
+ select ARCH_CORTEXM4
+ select STM32_STM32F40XX
config ARCH_CHIP_STM32F407VG
bool "STM32F407VG"
+ select ARCH_CORTEXM3
+ select STM32_STM32F40XX
config ARCH_CHIP_STM32F407ZE
bool "STM32F407ZE"
+ select ARCH_CORTEXM4
+ select STM32_STM32F40XX
config ARCH_CHIP_STM32F407ZG
bool "STM32F407ZG"
+ select ARCH_CORTEXM4
+ select STM32_STM32F40XX
config ARCH_CHIP_STM32F407IE
bool "STM32F407IE"
+ select ARCH_CORTEXM4
+ select STM32_STM32F40XX
config ARCH_CHIP_STM32F407IG
bool "STM32F407IG"
+ select ARCH_CORTEXM4
+ select STM32_STM32F40XX
endchoice
config STM32_STM32F10XX
bool
- default y if ARCH_CHIP_STM32F103ZET6 || ARCH_CHIP_STM32F103RET6 || ARCH_CHIP_STM32F103VCT6 || ARCH_CHIP_STM32F105VBT7 || ARCH_CHIP_STM32F107VC
+
+config STM32_VALUELINE
+ bool
+
+config STM32_HIGHDENSITY
+ bool
config STM32_CONNECTIVITYLINE
bool
- default y if ARCH_CHIP_STM32F105VBT7 || ARCH_CHIP_STM32F107VC
config STM32_STM32F20XX
bool
- default y if ARCH_CHIP_STM32F207IG
config STM32_STM32F40XX
bool
- default y if ARCH_CHIP_STM32F405RG || ARCH_CHIP_STM32F405VG || ARCH_CHIP_STM32F405ZG || ARCH_CHIP_STM32F407VE || ARCH_CHIP_STM32F407VG || ARCH_CHIP_STM32F407ZE || ARCH_CHIP_STM32F407ZG || ARCH_CHIP_STM32F407IE || ARCH_CHIP_STM32F407IE
-config ARCH_CORTEXM3
- bool
- default y if !STM32_STM32F40XX
+choice
+ prompt "Toolchain Selection"
+ default STM32_CODESOURCERYW
+ depends on ARCH_CHIP_STM32
-config ARCH_CORTEXM4
- bool
- default y if STM32_STM32F40XX
+config STM32_CODESOURCERYW
+ bool "CodeSourcery for Windows"
+
+config STM32_CODESOURCERYL
+ bool "CodeSourcery for Linux"
+
+config STM32_ATOLLIC_LITE
+ bool "Atollic Lite for Windows"
+
+config STM32_ATOLLIC_PRO
+ bool "Atollic Pro for Windows"
+
+config STM32_DEVKITARM
+ bool "DevkitARM (Windows)"
+
+config STM32_RAISONANCE
+ bool "STMicro Raisonance for Windows"
+
+config STM32_BUILDROOT
+ bool "NuttX buildroot (Cygwin or Linux)"
+
+endchoice
+
+config STM32_DFU
+ bool "DFU bootloader"
+ default n
+ ---help---
+ Configure and position code for use with the STMicro DFU bootloader. Do
+ not select this option if you will load code using JTAG/SWM.
menu "STM32 Peripheral Support"
@@ -100,10 +207,12 @@ config STM32_CRC
config STM32_DMA1
bool "DMA1"
default n
+ select ARCH_DMA
config STM32_DMA2
bool "DMA2"
default n
+ select ARCH_DMA
config STM32_BKP
bool "BKP"
@@ -118,11 +227,13 @@ config STM32_BKPSRAM
config STM32_CAN1
bool "CAN1"
default n
+ select CAN
config STM32_CAN2
bool "CAN2"
default n
depends on STM32_STM32F20XX || STM32_STM32F40XX
+ select CAN
config STM32_CCMDATARAM
bool "CMD/DATA RAM"
@@ -150,11 +261,12 @@ config STM32_DCMI
config STM32_ETHMAC
bool "Ethernet MAC"
default n
- depends on STM32_STM32F20XX || STM32_STM32F40XX
+ depends on STM32_CONNECTIVITYLINE || STM32_STM32F20XX || STM32_STM32F40XX
config STM32_FSMC
bool "FSMC"
default n
+ depends on !STM32_CONNECTIVITYLINE
config STM32_HASH
bool "HASH"
@@ -177,6 +289,7 @@ config STM32_I2C3
config STM32_IWDG
bool "IWDG"
default n
+ select WATCHDOG
config STM32_OTGFS
bool "OTG FS"
@@ -200,28 +313,33 @@ config STM32_RNG
config STM32_SDIO
bool "SDIO"
default n
+ depends on !STM32_CONNECTIVITYLINE
config STM32_SPI1
bool "SPI1"
default n
+ select SPI
config STM32_SPI2
bool "SPI2"
default n
+ select SPI
config STM32_SPI3
bool "SPI3"
default n
depends on STM32_STM32F20XX || STM32_STM32F40XX
+ select SPI
config STM32_SPI4
bool "SPI4"
default n
depends on STM32_STM32F10XX
+ select SPI
config STM32_SYSCFG
bool "SYSCFG"
- default n
+ default y
depends on STM32_STM32F20XX || STM32_STM32F40XX
config STM32_TIM1
@@ -289,36 +407,44 @@ config STM32_TIM14
config STM32_USART1
bool "USART1"
default n
+ select ARCH_HAVE_USART1
config STM32_USART2
bool "USART2"
default n
+ select ARCH_HAVE_USART2
config STM32_USART3
bool "USART3"
default n
+ select ARCH_HAVE_USART3
config STM32_UART4
bool "UART4"
default n
+ select ARCH_HAVE_UART4
config STM32_UART5
bool "UART5"
default n
+ select ARCH_HAVE_UART5
config STM32_USART6
bool "USART6"
default n
depends on STM32_STM32F20XX || STM32_STM32F40XX
+ select ARCH_HAVE_USART6
config STM32_USB
bool "USB Device"
default n
depends on STM32_STM32F10XX
+ select USBDEV
config STM32_WWDG
bool "WWDG"
default n
+ select WATCHDOG
endmenu
@@ -334,14 +460,12 @@ config STM32_SPI
bool
default y if STM32_SPI1 || STM32_SPI2 || STM32_SPI3 || STM32_SPI4
-config STM32_DMA
- bool
- default y if STM32_DMA1 || STM32_DMA2
-
config STM32_CAN
bool
default y if STM32_CAN1 || STM32_CAN2
+menu "Alternate Pin Mapping"
+
choice
prompt "TIM1 Alternate Pin Mappings"
depends on STM32_STM32F10XX && STM32_TIM1
@@ -447,18 +571,25 @@ choice
config STM32_CAN1_NO_REMAP
bool "No pin remapping"
-config STM32_CAN1_FULL_REMAP
- bool "Full pin remapping"
+config CONFIG_STM32_CAN1_REMAP1
+ bool "CAN1 alternate pin remapping #1"
-config STM32_CAN1_PARTIAL_REMAP
- bool "Partial pin remapping"
+config CONFIG_STM32_CAN1_REMAP2
+ bool "CAN1 alternate pin remapping #2"
endchoice
config STM32_CAN2_REMAP
bool "CAN2 Alternate Pin Mapping"
default n
- depends on STM32_STM32F10XX && STM32_CAN2
+ depends on STM32_CONNECTIVITYLINE && STM32_CAN2
+
+config STM32_ETH_REMAP
+ bool "Ethernet Alternate Pin Mapping"
+ default n
+ depends on STM32_CONNECTIVITYLINE && STM32_ETHMAC
+
+endmenu
choice
prompt "JTAG Configuration"
@@ -497,39 +628,18 @@ config ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG
config STM32_CCMEXCLUDE
bool "Exclude CCM SRAM from the heap"
depends on STM32_STM32F20XX || STM32_STM32F40XX
- default y if STM32_DMA1 || STM32_DMA2
+ default y if ARCH_DMA
---help---
Exclude CCM SRAM from the HEAP because it cannot be used for DMA.
config STM32_FSMC_SRAM
bool "External SRAM on FSMC"
default n
- depends on FSMC
+ depends on STM32_FSMC
+ select ARCH_HAVE_HEAP2
---help---
In addition to internal SRAM, SRAM may also be available through the FSMC.
-config HEAP2_BASE
- hex "FSMC SRAM base address"
- default 0x00000000
- depends on STM32_FSMC_SRAM
- ---help---
- The base address of the SRAM in the FSMC address space.
-
-config HEAP2_END
- hex "FSMC SRAM end+1 address"
- default 0x00000000
- depends on STM32_FSMC_SRAM
- ---help---
- The end (+1) of the SRAM in the FSMC address space
-
-config ARCH_FPU
- bool "FPU support"
- default y
- depends on ARCH_CORTEXM4
- ---help---
- Build in support for the ARM Cortex-M4 FPU. Only the STM3240xxx supports
- a floating point unit (FPU)
-
config STM32_TIM1_PWM
bool "TIM1 PWM"
default n
@@ -1420,342 +1530,48 @@ config STM32_TIM14_DAC2
endchoice
-menu "USART1 Configuration"
- depends on STM32_USART1
-
-config USART1_SERIAL_CONSOLE
- bool "USART1 serial console"
- default y
- ---help---
- Selects the USART1 for the console and ttys0 (default is the USART1).
-
-config USART1_RXBUFSIZE
- int "USART1 Rx buffer size"
- default 256
- ---help---
- Characters are buffered as received. This specific the size of the receive
- buffer.
-
-config USART1_TXBUFSIZE
- int "USART1 Tx buffer size"
- default 256
- ---help---
- Characters are buffered before being sent. This specific the size of the
- transmit buffer
-
-config USART1_BAUD
- int "USART1 BAUD"
- default 11520
- ---help---
- The configured BAUD of the UART
-
-config USART1_BITS
- int "USART1 number of bits"
- default 8
- ---help---
- The number of bits. Must be either 7 or 8.
-
-config USART1_PARITY
- int "USART1 parity"
- default 0
- ---help---
- 0=no parity, 1=odd parity, 2=even parity
-
-config USART1_2STOP
- bool "USART1 two stop bits"
- default n
- ---help---
- Two stop bits
-
config USART1_RXDMA
bool "USART1 Rx DMA"
default n
- depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA2
+ depends on STM32_STM32F40XX && STM32_DMA2
---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors
-endmenu
-
-menu "USART2 Configuration"
- depends on STM32_USART2
-
-config USART2_SERIAL_CONSOLE
- bool "USART2 serial console"
- default y if !STM32_USART1
- ---help---
- Selects the USART2 for the console and ttys0 (default is the USART2).
-
-config USART2_RXBUFSIZE
- int "USART2 Rx buffer size"
- default 256
- ---help---
- Characters are buffered as received. This specific the size of the receive
- buffer.
-
-config USART2_TXBUFSIZE
- int "USART2 Tx buffer size"
- default 256
- ---help---
- Characters are buffered before being sent. This specific the size of the
- transmit buffer
-
-config USART2_BAUD
- int "USART2 BAUD"
- default 11520
- ---help---
- The configured BAUD of the UART
-
-config USART2_BITS
- int "USART2 number of bits"
- default 8
- ---help---
- The number of bits. Must be either 7 or 8.
-
-config USART2_PARITY
- int "USART2 parity"
- default 0
- ---help---
- 0=no parity, 1=odd parity, 2=even parity
-
-config USART2_2STOP
- bool "USART2 two stop bits"
- default n
- ---help---
- Two stop bits
-
config USART2_RXDMA
bool "USART2 Rx DMA"
default n
- depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1
+ depends on STM32_STM32F40XX && STM32_DMA1
---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors
-endmenu
-
-menu "USART3 Configuration"
- depends on STM32_USART3
-
-config USART3_SERIAL_CONSOLE
- bool "USART3 serial console"
- default y if !STM32_USART1 && !STM32_USART2
- ---help---
- Selects the USART3 for the console and ttys0 (default is the USART3).
-
-config USART3_RXBUFSIZE
- int "USART3 Rx buffer size"
- default 256
- ---help---
- Characters are buffered as received. This specific the size of the receive
- buffer.
-
-config USART3_TXBUFSIZE
- int "USART3 Tx buffer size"
- default 256
- ---help---
- Characters are buffered before being sent. This specific the size of the
- transmit buffer
-
-config USART3_BAUD
- int "USART3 BAUD"
- default 11520
- ---help---
- The configured BAUD of the UART
-
-config USART3_BITS
- int "USART3 number of bits"
- default 8
- ---help---
- The number of bits. Must be either 7 or 8.
-
-config USART3_PARITY
- int "USART3 parity"
- default 0
- ---help---
- 0=no parity, 1=odd parity, 2=even parity
-
-config USART3_2STOP
- bool "USART3 two stop bits"
- default n
- ---help---
- Two stop bits
-
config USART3_RXDMA
bool "USART3 Rx DMA"
default n
- depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1
+ depends on STM32_STM32F40XX && STM32_DMA1
---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors
-endmenu
-
-menu "UART4 Configuration"
- depends on STM32_UART4
-
-config USART4_SERIAL_CONSOLE
- bool "UART4 serial console"
- default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3
- ---help---
- Selects the UART4 for the console and ttys0 (default is the USART1).
-
-config USART4_RXBUFSIZE
- int "UART4 Rx buffer size"
- default 256
- ---help---
- Characters are buffered as received. This specific the size of the receive
- buffer.
-
-config USART4_TXBUFSIZE
- int "UART4 Tx buffer size"
- default 256
- ---help---
- Characters are buffered before being sent. This specific the size of the
- transmit buffer
-
-config USART4_BAUD
- int "UART4 BAUD"
- default 11520
- ---help---
- The configured BAUD of the UART
-
-config USART4_BITS
- int "UART4 number of bits"
- default 8
- ---help---
- The number of bits. Must be either 7 or 8.
-
-config USART4_PARITY
- int "UART4 parity"
- default 0
- ---help---
- 0=no parity, 1=odd parity, 2=even parity
-
-config USART4_2STOP
- bool "UART4 two stop bits"
+config UART4_RXDMA
+ bool "UART4 Rx DMA"
default n
- ---help---
- Two stop bits
-
-config USART4_RXDMA
- bool "USART4 Rx DMA"
- default n
- depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1
+ depends on STM32_STM32F40XX && STM32_DMA1
---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors
-endmenu
-
-menu "UART5 Configuration"
- depends on STM32_UART5
-
-config USART5_SERIAL_CONSOLE
- bool "UART5 serial console"
- default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3 && !STM32_UART4
- ---help---
- Selects the UART5 for the console and ttys0 (default is the USART1).
-
-config USART5_RXBUFSIZE
- int "USART5 Rx buffer size"
- default 256
- ---help---
- Characters are buffered as received. This specific the size of the receive
- buffer.
-
-config USART5_TXBUFSIZE
- int "UART5 Tx buffer size"
- default 256
- ---help---
- Characters are buffered before being sent. This specific the size of the
- transmit buffer
-
-config USART5_BAUD
- int "UART5 BAUD"
- default 11520
- ---help---
- The configured BAUD of the UART
-
-config USART5_BITS
- int "UART5 number of bits"
- default 8
- ---help---
- The number of bits. Must be either 7 or 8.
-
-config USART5_PARITY
- int "UART5 parity"
- default 0
- ---help---
- 0=no parity, 1=odd parity, 2=even parity
-
-config USART5_2STOP
- bool "UART5 two stop bits"
+config UART5_RXDMA
+ bool "UART5 Rx DMA"
default n
- ---help---
- Two stop bits
-
-config USART5_RXDMA
- bool "USART5 Rx DMA"
- default n
- depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1
+ depends on STM32_STM32F40XX && STM32_DMA1
---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors
-endmenu
-
-menu "USART6 Configuration"
- depends on STM32_USART6
-
-config USART6_SERIAL_CONSOLE
- bool "USART6 serial console"
- default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3 && !STM32_UART4 && !STM32_UART5
- ---help---
- Selects the USART6 for the console and ttys0 (default is the USART6).
-
-config USART6_RXBUFSIZE
- int "USART6 Rx buffer size"
- default 256
- ---help---
- Characters are buffered as received. This specific the size of the receive
- buffer.
-
-config USART6_TXBUFSIZE
- int "USART6 Tx buffer size"
- default 256
- ---help---
- Characters are buffered before being sent. This specific the size of the
- transmit buffer
-
-config USART6_BAUD
- int "USART6 BAUD"
- default 11520
- ---help---
- The configured BAUD of the UART
-
-config USART6_BITS
- int "USART6 number of bits"
- default 8
- ---help---
- The number of bits. Must be either 7 or 8.
-
-config USART6_PARITY
- int "USART6 parity"
- default 0
- ---help---
- 0=no parity, 1=odd parity, 2=even parity
-
-config USART6_2STOP
- bool "USART6 two stop bits"
- default n
- ---help---
- Two stop bits
-
config USART6_RXDMA
bool "USART6 Rx DMA"
default n
- depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA2
+ depends on STM32_STM32F40XX && STM32_DMA2
---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors
-endmenu
-
config SERIAL_TERMIOS
bool "Serial driver TERMIOS supported"
depends on STM32_USART1 || STM32_USART2 || STM32_USART3 || STM32_UART4 || STM32_UART5 || STM32_USART6
@@ -1819,32 +1635,60 @@ menu "Ethernet MAC configuration"
config STM32_PHYADDR
int "PHY address"
+ default 1
---help---
- The 5-bit address of the PHY on the board
+ The 5-bit address of the PHY on the board. Default: 1
config STM32_MII
bool "Use MII interface"
default n
+ depends on STM32_ETHMAC
---help---
Support Ethernet MII interface.
+choice
+ prompt "MII clock configuration"
+ default STM32_MII_MCO if STM32_STM32F10XX
+ default STM32_MII_MCO1 if STM32_STM32F20XX || STM32_STM32F40XX
+ depends on STM32_MII
+
+config STM32_MII_MCO
+ bool "Use MC0 as MII clock"
+ depends on STM32_STM32F10XX
+ ---help---
+ Use MCO to clock the MII interface. Default: Use MC0
+
+config STM32_MII_MCO1
+ bool "Use MC01 as MII clock"
+ depends on (STM32_STM32F20XX || STM32_STM32F40XX)
+ ---help---
+ Use MCO1 to clock the MII interface. Default: Use MC01
+
config STM32_MII_MCO2
bool "Use MC02 as MII clock"
- default n
- depends on STM32_MII
+ depends on (STM32_STM32F20XX || STM32_STM32F40XX)
---help---
Use MCO2 to clock the MII interface. Default: Use MC01
+config STM32_MII_EXTCLK
+ bool "External MII clock"
+ ---help---
+ Clocking is provided by external logic. Don't use MCO for MII
+ clock. Default: Use MC0[1]
+
+endchoice
+
config STM32_AUTONEG
bool "Use autonegtiation"
default y
+ depends on STM32_ETHMAC
---help---
Use PHY autonegotion to determine speed and mode
config STM32_ETHFD
bool "Full duplex"
default n
- depends on !STM32_AUTONEG
+ depends on STM32_ETHMAC && !STM32_AUTONEG
---help---
If STM32_AUTONEG is not defined, then this may be defined to select full duplex
mode. Default: half-duplex
@@ -1852,7 +1696,7 @@ config STM32_ETHFD
config STM32_ETH100MBPS
bool "100 Mbps"
default n
- depends on !STM32_AUTONEG
+ depends on STM32_ETHMAC && !STM32_AUTONEG
---help---
If STM32_AUTONEG is not defined, then this may be defined to select 100 MBps
speed. Default: 10 Mbps
@@ -1896,6 +1740,7 @@ config STM32_PHYSR_FULLDUPLEX
config STM32_ETH_PTP
bool "Precision Time Protocol (PTP)"
default n
+ depends on STM32_ETHMAC
---help---
Precision Time Protocol (PTP). Not supported but some hooks are indicated
with this condition.
@@ -1905,11 +1750,39 @@ endmenu
config STM32_RMII
bool
default y if !STM32_MII
+ depends on STM32_ETHMAC
-config STM32_MII_MCO1
- bool
- default y if !STM32_MII_MCO2
- depends on STM32_MII
+choice
+ prompt "RMII clock configuration"
+ default STM32_RMII_MCO if STM32_STM32F10XX
+ default STM32_RMII_MCO1 if STM32_STM32F20XX || STM32_STM32F40XX
+ depends on STM32_RMII
+
+config STM32_RMII_MCO
+ bool "Use MC0 as RMII clock"
+ depends on STM32_STM32F10XX
+ ---help---
+ Use MCO to clock the RMII interface. Default: Use MC0
+
+config STM32_RMII_MCO1
+ bool "Use MC01 as RMII clock"
+ depends on (STM32_STM32F20XX || STM32_STM32F40XX)
+ ---help---
+ Use MCO1 to clock the RMII interface. Default: Use MC01
+
+config STM32_RMII_MCO2
+ bool "Use MC02 as RMII clock"
+ depends on (STM32_STM32F20XX || STM32_STM32F40XX)
+ ---help---
+ Use MCO2 to clock the RMII interface. Default: Use MC01
+
+config STM32_RMII_EXTCLK
+ bool "External RMII clock"
+ ---help---
+ Clocking is provided by external logic. Don't use MCO for RMII
+ clock. Default: Use MC0[1]
+
+endchoice
menu "USB Host Configuration"
diff --git a/nuttx/arch/arm/src/stm32/chip.h b/nuttx/arch/arm/src/stm32/chip.h
index cc3ee1f96b..3fac597ef2 100644
--- a/nuttx/arch/arm/src/stm32/chip.h
+++ b/nuttx/arch/arm/src/stm32/chip.h
@@ -48,24 +48,51 @@
/* Include the chip pin configuration file */
+/* STM32 F1 Family ******************************************************************/
#if defined(CONFIG_STM32_STM32F10XX)
+
+/* STM32F100 Value Line */
+
# if defined(CONFIG_STM32_VALUELINE)
# include "chip/stm32f100_pinmap.h"
-# elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
-# include "chip/stm32f103ze_pinmap.h"
+
+/* STM32 F103 High Density Family */
+/* STM32F103RC, STM32F103RD, and STM32F103RE are all provided in 64 pin packages and differ
+ * only in the available FLASH and SRAM.
+ */
+
# elif defined(CONFIG_ARCH_CHIP_STM32F103RET6)
# include "chip/stm32f103re_pinmap.h"
-# elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6)
+
+/* STM32F103VC, STM32F103VD, and STM32F103VE are all provided in 100 pin packages and differ
+ * only in the available FLASH and SRAM.
+ */
+
+# elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) || defined(CONFIG_ARCH_CHIP_STM32F103VET6)
# include "chip/stm32f103vc_pinmap.h"
+
+/* STM32F103ZC, STM32F103ZD, and STM32F103ZE are all provided in 144 pin packages and differ
+ * only in the available FLASH and SRAM.
+ */
+# elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
+# include "chip/stm32f103ze_pinmap.h"
+
+/* STM32 F105/F107 Connectivity Line */
+
# elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7)
# include "chip/stm32f105vb_pinmap.h"
+
# elif defined(CONFIG_ARCH_CHIP_STM32F107VC)
# include "chip/stm32f107vc_pinmap.h"
# else
# error "Unsupported STM32F10XXX chip"
# endif
+
+/* STM32 F2 Family ******************************************************************/
#elif defined(CONFIG_STM32_STM32F20XX)
# include "chip/stm32f20xxx_pinmap.h"
+
+/* STM32 F4 Family ******************************************************************/
#elif defined(CONFIG_STM32_STM32F40XX)
# include "chip/stm32f40xxx_pinmap.h"
#else
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32_bkp.h b/nuttx/arch/arm/src/stm32/chip/stm32_bkp.h
index 1788bdee08..5bda839a88 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32_bkp.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32_bkp.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/chip/stm32_bkp.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32_exti.h b/nuttx/arch/arm/src/stm32/chip/stm32_exti.h
index 82477db549..5386a260fb 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32_exti.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32_exti.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/chip/stm32_exti.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32_memorymap.h
index a53c7441cf..36813b5651 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32_memorymap.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32_memorymap.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/chip/stm32_memorymap.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f100_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f100_pinmap.h
index 18e8435f77..01d6e1ce06 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32f100_pinmap.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32f100_pinmap.h
@@ -4,7 +4,7 @@
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Copyright (C) 2012 Michael Smith. All Rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
* Uros Platise
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f103re_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f103re_pinmap.h
index d0b5a6386b..042f57f74a 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32f103re_pinmap.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32f103re_pinmap.h
@@ -3,7 +3,7 @@
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2011 Uros Platise. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
* Uros Platise
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h
index fde8dd9358..7a5ec3381e 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/chip/stm32f105vb_pinmap.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h
index 82f1fa5e78..9bbc214798 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/chip/stm32f107vc_pinmap.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -93,41 +93,41 @@
#define GPIO_ETH_MDC (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN1)
#define GPIO_ETH_MDIO (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN2)
-#define GPIO_ETH_MIICOL (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN3)
-#define GPIO_ETH_MIICRSWKUP (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN0)
-#define GPIO_ETH_MIIRXCLK (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1)
+#define GPIO_ETH_MII_COL (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN3)
+#define GPIO_ETH_MII_CRS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN0)
+#define GPIO_ETH_MII_RX_CLK (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1)
#if defined(CONFIG_STM32_ETH_REMAP)
-# define GPIO_ETH_MIIRXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN9)
-# define GPIO_ETH_MIIRXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN10)
-# define GPIO_ETH_MIIRXD2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN11)
-# define GPIO_ETH_MIIRXD3 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN12)
-# define GPIO_ETH_MIIRXDV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN8)
+# define GPIO_ETH_MII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN9)
+# define GPIO_ETH_MII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN10)
+# define GPIO_ETH_MII_RXD2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN11)
+# define GPIO_ETH_MII_RXD3 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN12)
+# define GPIO_ETH_MII_RX_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN8)
#else
-# define GPIO_ETH_MIIRXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4)
-# define GPIO_ETH_MIIRXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5)
-# define GPIO_ETH_MIIRXD2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN0)
-# define GPIO_ETH_MIIRXD3 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN1)
-# define GPIO_ETH_MIIRXDV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7)
+# define GPIO_ETH_MII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4)
+# define GPIO_ETH_MII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5)
+# define GPIO_ETH_MII_RXD2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN0)
+# define GPIO_ETH_MII_RXD3 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN1)
+# define GPIO_ETH_MII_RX_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7)
#endif
-#define GPIO_ETH_MIIRXER (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10)
-#define GPIO_ETH_MIITXCLK (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN3)
-#define GPIO_ETH_MIITXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12)
-#define GPIO_ETH_MIITXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13)
-#define GPIO_ETH_MIITXD2 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN2)
-#define GPIO_ETH_MIITXD3 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8)
-#define GPIO_ETH_MIITXEN (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11)
+#define GPIO_ETH_MII_RX_ER (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10)
+#define GPIO_ETH_MII_TX_CLK (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN3)
+#define GPIO_ETH_MII_TXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12)
+#define GPIO_ETH_MII_TXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13)
+#define GPIO_ETH_MII_TXD2 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN2)
+#define GPIO_ETH_MII_TXD3 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8)
+#define GPIO_ETH_MII_TX_EN (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11)
#define GPIO_ETH_PPS_OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5)
#define GPIO_ETH_RMII_REF_CLK (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1)
#if defined(CONFIG_STM32_ETH_REMAP)
-# define GPIO_ETH_RMII_CRS_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN8)
-# define GPIO_ETH_RMII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN9)
-# define GPIO_ETH_RMII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN10)
+# define GPIO_ETH_RMII_CRS_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN8)
+# define GPIO_ETH_RMII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN9)
+# define GPIO_ETH_RMII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN10)
#else
-# define GPIO_ETH_RMII_CRS_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7)
-# define GPIO_ETH_RMII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4)
-# define GPIO_ETH_RMII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5)
+# define GPIO_ETH_RMII_CRS_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7)
+# define GPIO_ETH_RMII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4)
+# define GPIO_ETH_RMII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5)
#endif
#define GPIO_ETH_RMII_TXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12)
#define GPIO_ETH_RMII_TXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13)
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h
index 80b38a89fe..ed1bc26259 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -47,6 +47,9 @@
#define STM32_SRAMBB_BASE 0x22000000
#define STM32_PERIPH_BASE 0x40000000
+#define STM32_REGION_MASK 0xf0000000
+#define STM32_IS_SRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_SRAM_BASE)
+
/* Register Base Address ************************************************************/
/* APB1 bus */
@@ -123,7 +126,13 @@
/* Flexible SRAM controller (FSMC) */
-#define STM32_FSMC_BASE 0xa0000000
+#define STM32_FSMC_BANK1 0x60000000 /* 0x60000000-0x6fffffff: 256Mb NOR/SRAM */
+#define STM32_FSMC_BANK2 0x70000000 /* 0x70000000-0x7fffffff: 256Mb NAND FLASH */
+#define STM32_FSMC_BANK3 0x80000000 /* 0x80000000-0x8fffffff: 256Mb NAND FLASH */
+#define STM32_FSMC_BANK4 0x90000000 /* 0x90000000-0x9fffffff: 256Mb PC CARD*/
+#define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1)
+
+#define STM32_FSMC_BASE 0xa0000000 /* 0xa0000000-0xbfffffff: 512Mb FSMC register block */
/* Other registers -- see armv7-m/nvic.h for standard Cortex-M3 registers in this
* address range
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h
index 2fa7056076..777b9595fe 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h
@@ -46,11 +46,19 @@
#define STM32_SRAM_BASE 0x20000000 /* 0x20000000-0x3fffffff: 512Mb sram block */
#define STM32_PERIPH_BASE 0x40000000 /* 0x40000000-0x5fffffff: 512Mb peripheral block */
#define STM32_FSMC_BASE12 0x60000000 /* 0x60000000-0x7fffffff: 512Mb FSMC bank1&2 block */
+# define STM32_FSMC_BANK1 0x60000000 /* 0x60000000-0x6fffffff: 256Mb NOR/SRAM */
+# define STM32_FSMC_BANK2 0x70000000 /* 0x70000000-0x7fffffff: 256Mb NAND FLASH */
#define STM32_FSMC_BASE34 0x80000000 /* 0x80000000-0x8fffffff: 512Mb FSMC bank3&4 block */
+# define STM32_FSMC_BANK3 0x80000000 /* 0x80000000-0x8fffffff: 256Mb NAND FLASH */
+# define STM32_FSMC_BANK4 0x90000000 /* 0x90000000-0x9fffffff: 256Mb PC CARD*/
#define STM32_FSMC_BASE 0xa0000000 /* 0xa0000000-0xbfffffff: 512Mb FSMC register block */
/* 0xc0000000-0xdfffffff: 512Mb (not used) */
#define STM32_CORTEX_BASE 0xe0000000 /* 0xe0000000-0xffffffff: 512Mb Cortex-M4 block */
+#define STM32_REGION_MASK 0xf0000000
+#define STM32_IS_SRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_SRAM_BASE)
+#define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1)
+
/* Code Base Addresses **************************************************************/
#define STM32_BOOT_BASE 0x00000000 /* 0x00000000-0x000fffff: Aliased boot memory */
@@ -185,7 +193,7 @@
#define STM32_HASH_BASE 0x50060400 /* 0x50060400-0x500607ff: HASH */
#define STM32_RNG_BASE 0x50060800 /* 0x50060800-0x50060bff: RNG */
-/* Cortex-M4 Base Addresses *********************************************************/
+/* Cortex-M3 Base Addresses *********************************************************/
/* Other registers -- see armv7-m/nvic.h for standard Cortex-M3 registers in this
* address range
*/
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_pinmap.h
index c59cd565a2..817e747f71 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_pinmap.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_pinmap.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/chip/stm32f20xxx_pinmap.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_gpio.h b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_gpio.h
index aa7353ed9d..3a5f8bc6a1 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_gpio.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_gpio.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/chip/stm32f40xxx_gpio.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h
index c7f7ff2ec3..6b99121216 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h
@@ -46,11 +46,19 @@
#define STM32_SRAM_BASE 0x20000000 /* 0x20000000-0x3fffffff: 512Mb sram block */
#define STM32_PERIPH_BASE 0x40000000 /* 0x40000000-0x5fffffff: 512Mb peripheral block */
#define STM32_FSMC_BASE12 0x60000000 /* 0x60000000-0x7fffffff: 512Mb FSMC bank1&2 block */
+# define STM32_FSMC_BANK1 0x60000000 /* 0x60000000-0x6fffffff: 256Mb NOR/SRAM */
+# define STM32_FSMC_BANK2 0x70000000 /* 0x70000000-0x7fffffff: 256Mb NAND FLASH */
#define STM32_FSMC_BASE34 0x80000000 /* 0x80000000-0x8fffffff: 512Mb FSMC bank3&4 block */
+# define STM32_FSMC_BANK3 0x80000000 /* 0x80000000-0x8fffffff: 256Mb NAND FLASH */
+# define STM32_FSMC_BANK4 0x90000000 /* 0x90000000-0x9fffffff: 256Mb PC CARD*/
#define STM32_FSMC_BASE 0xa0000000 /* 0xa0000000-0xbfffffff: 512Mb FSMC register block */
/* 0xc0000000-0xdfffffff: 512Mb (not used) */
#define STM32_CORTEX_BASE 0xe0000000 /* 0xe0000000-0xffffffff: 512Mb Cortex-M4 block */
+#define STM32_REGION_MASK 0xf0000000
+#define STM32_IS_SRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_SRAM_BASE)
+#define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1)
+
/* Code Base Addresses **************************************************************/
#define STM32_BOOT_BASE 0x00000000 /* 0x00000000-0x000fffff: Aliased boot memory */
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_rtc.h b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_rtc.h
index fdfa9b3230..a656cfda04 100644
--- a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_rtc.h
+++ b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_rtc.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/chip/stm32f40xxx_rtc.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
index 4c186a852b..4b8707a2b7 100644
--- a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
+++ b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
@@ -73,13 +73,14 @@
*
* CONFIG_STM32_FSMC=y : Enables the FSMC
* CONFIG_STM32_FSMC_SRAM=y : Indicates that SRAM is available via the
- * FSMC (as opposed to an LCD or FLASH).
+ * FSMC (as opposed to an LCD or FLASH).
* CONFIG_HEAP2_BASE : The base address of the SRAM in the FSMC
- * address space
- * CONFIG_HEAP2_END : The end (+1) of the SRAM in the FSMC
- * address space
+ * address space
+ * CONFIG_HEAP2_SIZE : The size of the SRAM in the FSMC
+ * address space
* CONFIG_MM_REGIONS : Must be set to a large enough value to
- * include the FSMC SRAM (as determined by the rules provided below)
+ * include the FSMC SRAM (as determined by
+ * the rules provided below)
*/
#ifndef CONFIG_STM32_FSMC
@@ -211,7 +212,7 @@
* should be 3.
*/
-# ifdef CONFIG_STM32_DMA
+# ifdef CONFIG_ARCH_DMA
# warning "CCM SRAM is included in the heap AND DMA is enabled"
# endif
# if CONFIG_MM_REGIONS != 3
@@ -237,7 +238,7 @@
* should be disabled and CONFIG_MM_REGIONS should be 2.
*/
-# ifdef CONFIG_STM32_DMA
+# ifdef CONFIG_ARCH_DMA
# warning "CCM SRAM is included in the heap AND DMA is enabled"
# endif
# if CONFIG_MM_REGIONS < 2
@@ -256,12 +257,12 @@
/* If FSMC SRAM is going to be used as heap, then verify that the starting
* address and size of the external SRAM region has been provided in the
- * configuration (as CONFIG_HEAP2_BASE and CONFIG_HEAP2_END).
+ * configuration (as CONFIG_HEAP2_BASE and CONFIG_HEAP2_SIZE).
*/
#ifdef CONFIG_STM32_FSMC_SRAM
-# if !defined(CONFIG_HEAP2_BASE) || !defined(CONFIG_HEAP2_END)
-# error "CONFIG_HEAP2_BASE and CONFIG_HEAP2_END must be provided"
+# if !defined(CONFIG_HEAP2_BASE) || !defined(CONFIG_HEAP2_SIZE)
+# error "CONFIG_HEAP2_BASE and CONFIG_HEAP2_SIZE must be provided"
# undef CONFIG_STM32_FSMC_SRAM
# endif
#endif
@@ -317,7 +318,7 @@ void up_addregion(void)
/* Add the external FSMC SRAM heap region. */
#ifdef CONFIG_STM32_FSMC_SRAM
- mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_END - CONFIG_HEAP2_BASE);
+ mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
#endif
}
#endif
diff --git a/nuttx/arch/arm/src/stm32/stm32_dbgmcu.h b/nuttx/arch/arm/src/stm32/stm32_dbgmcu.h
index 080f4bec5d..5fb1921866 100644
--- a/nuttx/arch/arm/src/stm32/stm32_dbgmcu.h
+++ b/nuttx/arch/arm/src/stm32/stm32_dbgmcu.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/stm32_dbgmcu.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/stm32/stm32_eth.c b/nuttx/arch/arm/src/stm32/stm32_eth.c
index 57d4cc2d33..59f3def7f6 100644
--- a/nuttx/arch/arm/src/stm32/stm32_eth.c
+++ b/nuttx/arch/arm/src/stm32/stm32_eth.c
@@ -102,11 +102,32 @@
#endif
#ifdef CONFIG_STM32_MII
-# if !defined(CONFIG_STM32_MII_MCO1) && !defined(CONFIG_STM32_MII_MCO2)
-# warning "Neither CONFIG_STM32_MII_MCO1 nor CONFIG_STM32_MII_MCO2 defined"
+# if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX)
+# if !defined(CONFIG_STM32_MII_MCO1) && !defined(CONFIG_STM32_MII_MCO2) && !defined(CONFIG_STM32_MII_EXTCLK)
+# warning "Neither CONFIG_STM32_MII_MCO1, CONFIG_STM32_MII_MCO2, nor CONFIG_STM32_MII_EXTCLK defined"
+# endif
+# if defined(CONFIG_STM32_MII_MCO1) && defined(CONFIG_STM32_MII_MCO2)
+# error "Both CONFIG_STM32_MII_MCO1 and CONFIG_STM32_MII_MCO2 defined"
+# endif
+# elif defined(CONFIG_STM32_CONNECTIVITYLINE)
+# if !defined(CONFIG_STM32_MII_MCO) && !defined(CONFIG_STM32_MII_EXTCLK)
+# warning "Neither CONFIG_STM32_MII_MCO nor CONFIG_STM32_MII_EXTCLK defined"
+# endif
# endif
-# if defined(CONFIG_STM32_MII_MCO1) && defined(CONFIG_STM32_MII_MCO2)
-# error "Both CONFIG_STM32_MII_MCO1 and CONFIG_STM32_MII_MCO2 defined"
+#endif
+
+#ifdef CONFIG_STM32_RMII
+# if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX)
+# if !defined(CONFIG_STM32_RMII_MCO1) && !defined(CONFIG_STM32_RMII_MCO2) && !defined(CONFIG_STM32_RMII_EXTCLK)
+# warning "Neither CONFIG_STM32_RMII_MCO1, CONFIG_STM32_RMII_MCO2, nor CONFIG_STM32_RMII_EXTCLK defined"
+# endif
+# if defined(CONFIG_STM32_RMII_MCO1) && defined(CONFIG_STM32_RMII_MCO2)
+# error "Both CONFIG_STM32_RMII_MCO1 and CONFIG_STM32_RMII_MCO2 defined"
+# endif
+# elif defined(CONFIG_STM32_CONNECTIVITYLINE)
+# if !defined(CONFIG_STM32_RMII_MCO) && !defined(CONFIG_STM32_RMII_EXTCLK)
+# warning "Neither CONFIG_STM32_RMII_MCO nor CONFIG_STM32_RMII_EXTCLK defined"
+# endif
# endif
#endif
@@ -608,6 +629,12 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv);
/* MAC/DMA Initialization */
+#ifdef CONFIG_STM32_MII
+static inline void stm32_selectmii(void);
+#endif
+#ifdef CONFIG_STM32_RMII
+static inline void stm32_selectrmii(void);
+#endif
static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv);
static void stm32_ethreset(FAR struct stm32_ethmac_s *priv);
static int stm32_macconfig(FAR struct stm32_ethmac_s *priv);
@@ -2570,6 +2597,66 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv)
return OK;
}
+/************************************************************************************
+ * Name: stm32_selectmii
+ *
+ * Description:
+ * Selects the MII inteface.
+ *
+ * Input Parameters:
+ * None
+ *
+ * Returned Value:
+ * None
+ *
+ ************************************************************************************/
+
+#ifdef CONFIG_STM32_MII
+static inline void stm32_selectmii(void)
+{
+ uint32_t regval;
+
+#ifdef CONFIG_STM32_CONNECTIVITYLINE
+ regval = getreg32(STM32_AFIO_MAPR);
+ regval &= ~AFIO_MAPR_MII_RMII_SEL;
+ putreg32(regval, STM32_AFIO_MAPR);
+#else
+ regval = getreg32(STM32_SYSCFG_PMC);
+ regval &= ~SYSCFG_PMC_MII_RMII_SEL;
+ putreg32(regval, STM32_SYSCFG_PMC);
+#endif
+}
+#endif
+
+/************************************************************************************
+ * Name: stm32_selectrmii
+ *
+ * Description:
+ * Selects the RMII inteface.
+ *
+ * Input Parameters:
+ * None
+ *
+ * Returned Value:
+ * None
+ *
+ ************************************************************************************/
+
+static inline void stm32_selectrmii(void)
+{
+ uint32_t regval;
+
+#ifdef CONFIG_STM32_CONNECTIVITYLINE
+ regval = getreg32(STM32_AFIO_MAPR);
+ regval |= AFIO_MAPR_MII_RMII_SEL;
+ putreg32(regval, STM32_AFIO_MAPR);
+#else
+ regval = getreg32(STM32_SYSCFG_PMC);
+ regval |= SYSCFG_PMC_MII_RMII_SEL;
+ putreg32(regval, STM32_SYSCFG_PMC);
+#endif
+}
+
/****************************************************************************
* Function: stm32_ethgpioconfig
*
@@ -2605,7 +2692,7 @@ static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv)
stm32_selectmii();
- /* Provide clocking via MCO1 or MCO2:
+ /* Provide clocking via MCO, MCO1 or MCO2:
*
* "MCO1 (microcontroller clock output), used to output HSI, LSE, HSE or PLL
* clock (through a configurable prescaler) on PA8 pin."
@@ -2614,7 +2701,7 @@ static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv)
* PLLI2S clock (through a configurable prescaler) on PC9 pin."
*/
-# if defined(CONFIG_STM32_MII_MCO1)
+# if defined(CONFIG_STM32_MII_MCO1)
/* Configure MC01 to drive the PHY. Board logic must provide MC01 clocking
* info.
*/
@@ -2622,14 +2709,20 @@ static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv)
stm32_configgpio(GPIO_MCO1);
stm32_mco1config(BOARD_CFGR_MC01_SOURCE, BOARD_CFGR_MC01_DIVIDER);
-# elif defined(CONFIG_STM32_MII_MCO2)
+# elif defined(CONFIG_STM32_MII_MCO2)
/* Configure MC02 to drive the PHY. Board logic must provide MC02 clocking
* info.
*/
stm32_configgpio(GPIO_MCO2);
stm32_mco2config(BOARD_CFGR_MC02_SOURCE, BOARD_CFGR_MC02_DIVIDER);
-# endif
+
+# elif defined(CONFIG_STM32_MII_MCO)
+ /* Setup MCO pin for alternative usage */
+
+ stm32_configgpio(GPIO_MCO);
+ stm32_mcoconfig(BOARD_CFGR_MCO_SOURCE);
+# endif
/* MII interface pins (17):
*
@@ -2657,17 +2750,42 @@ static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv)
#elif defined(CONFIG_STM32_RMII)
- /* Setup MCO pin for alternative usage */
-
-#if defined(CONFIG_STM32_RMII_MCO)
- stm32_configgpio(GPIO_MCO);
- stm32_mcoconfig(BOARD_CFGR_MCO_SOURCE);
-#endif
-
/* Select the RMII interface */
stm32_selectrmii();
+ /* Provide clocking via MCO, MCO1 or MCO2:
+ *
+ * "MCO1 (microcontroller clock output), used to output HSI, LSE, HSE or PLL
+ * clock (through a configurable prescaler) on PA8 pin."
+ *
+ * "MCO2 (microcontroller clock output), used to output HSE, PLL, SYSCLK or
+ * PLLI2S clock (through a configurable prescaler) on PC9 pin."
+ */
+
+# if defined(CONFIG_STM32_RMII_MCO1)
+ /* Configure MC01 to drive the PHY. Board logic must provide MC01 clocking
+ * info.
+ */
+
+ stm32_configgpio(GPIO_MCO1);
+ stm32_mco1config(BOARD_CFGR_MC01_SOURCE, BOARD_CFGR_MC01_DIVIDER);
+
+# elif defined(CONFIG_STM32_RMII_MCO2)
+ /* Configure MC02 to drive the PHY. Board logic must provide MC02 clocking
+ * info.
+ */
+
+ stm32_configgpio(GPIO_MCO2);
+ stm32_mco2config(BOARD_CFGR_MC02_SOURCE, BOARD_CFGR_MC02_DIVIDER);
+
+# elif defined(CONFIG_STM32_RMII_MCO)
+ /* Setup MCO pin for alternative usage */
+
+ stm32_configgpio(GPIO_MCO);
+ stm32_mcoconfig(BOARD_CFGR_MCO_SOURCE);
+# endif
+
/* RMII interface pins (7):
*
* RMII_TXD[1:0], RMII_TX_EN, RMII_RXD[1:0], RMII_CRS_DV, MDC, MDIO,
diff --git a/nuttx/arch/arm/src/stm32/stm32_eth.h b/nuttx/arch/arm/src/stm32/stm32_eth.h
index 188dc10d36..f0c14b5b1f 100644
--- a/nuttx/arch/arm/src/stm32/stm32_eth.h
+++ b/nuttx/arch/arm/src/stm32/stm32_eth.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/stm32_eth.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/nuttx/arch/arm/src/stm32/stm32_gpio.h b/nuttx/arch/arm/src/stm32/stm32_gpio.h
index 34623c5253..fde564cbbf 100644
--- a/nuttx/arch/arm/src/stm32/stm32_gpio.h
+++ b/nuttx/arch/arm/src/stm32/stm32_gpio.h
@@ -3,7 +3,7 @@
*
* Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2011 Uros Platise. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt
* Uros Platise
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/arch/arm/src/stm32/stm32_i2c.c b/nuttx/arch/arm/src/stm32/stm32_i2c.c
index 2d1a7142c5..a4b10b55c6 100644
--- a/nuttx/arch/arm/src/stm32/stm32_i2c.c
+++ b/nuttx/arch/arm/src/stm32/stm32_i2c.c
@@ -1199,7 +1199,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv)
stm32_i2c_traceevent(priv, I2CEVENT_RCVBYTE, priv->dcnt);
#ifdef CONFIG_I2C_POLLED
- //irqstate_t state = irqsave();
+ irqstate_t state = irqsave();
#endif
/* Receive a byte */
@@ -1215,7 +1215,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv)
priv->dcnt--;
#ifdef CONFIG_I2C_POLLED
- //irqrestore(state);
+ irqrestore(state);
#endif
}
diff --git a/nuttx/arch/arm/src/stm32/stm32_i2c.h b/nuttx/arch/arm/src/stm32/stm32_i2c.h
index 23a06bc051..b914c4247b 100644
--- a/nuttx/arch/arm/src/stm32/stm32_i2c.h
+++ b/nuttx/arch/arm/src/stm32/stm32_i2c.h
@@ -2,7 +2,7 @@
* arch/arm/src/stm32/stm32_i2c.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Author: Gregory Nutt