summaryrefslogtreecommitdiff
path: root/apps/examples/README.txt
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-03 21:10:11 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-03 21:10:11 +0000
commit0da537768a85ab863bd1a46425db167d6333e51c (patch)
tree9ad543d3e99f65e9ce51a8a56d02d559f46bdf7f /apps/examples/README.txt
parent6be41fe54a04032f4516c5eb8a84bf5407cc55ee (diff)
downloadnuttx-0da537768a85ab863bd1a46425db167d6333e51c.tar.gz
nuttx-0da537768a85ab863bd1a46425db167d6333e51c.tar.bz2
nuttx-0da537768a85ab863bd1a46425db167d6333e51c.zip
Verify C++ support with CodeSourcery
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4016 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/README.txt')
-rw-r--r--apps/examples/README.txt36
1 files changed, 27 insertions, 9 deletions
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index d7da89152..0e7ad7b5c 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -131,24 +131,42 @@ examples/hello
^^^^^^^^^^^^^^
This is the mandatory, "Hello, World!!" example. It is little more
- than examples/null with a single printf statement. Again useful only
+ than examples/null with a single printf statement. Really useful only
for bringing up new NuttX architectures.
- NuttX configuration settings:
-
- CONFIG_EXAMPLE_HELLOXX_NOSTATICCONST - Set if system does not support
- static constructors.
- CONFIG_EXAMPLE_HELLOXX_NOSTACKCONST - Set if the systgem does not
- support constructionof objects on the stack.
-
examples/helloxx
^^^^^^^^^^^^^^^^
This is C++ version of the "Hello, World!!" example. It is intended
- only to verify that the C++ compiler is function, that basic C++
+ only to verify that the C++ compiler is functional, that basic C++
library suupport is available, and that class are instantiated
correctly.
+ NuttX configuration settings:
+
+ CONFIG_EXAMPLES_HELLOXX_BUILTIN -- Build the helloxx example as a
+ "built-in" that can be executed from the NSH command line.
+ CONFIG_EXAMPLE_HELLOXX_NOSTATICCONST - Set if system does not support
+ static constructors.
+ CONFIG_EXAMPLE_HELLOXX_NOSTACKCONST - Set if the system does not
+ support construction of objects on the stack.
+
+ Also needed:
+
+ CONFIG_HAVE_CXX=y
+
+ And you may have to tinker with the following to get libxx to compile
+ properly:
+
+ CONFIG_CXX_NEWLONG=y or =n
+
+ The argument of the 'new' operators should take a type of size_t. But size_t
+ has an unknown underlying. In the nuttx sys/types.h header file, size_t
+ is typed as uint32_t (which is determined by architecture-specific logic).
+ But the C++ compiler may believe that size_t is of a different type resulting
+ in compilation errors in the operator. Using the underlying integer type
+ Instead of size_t seems to resolve the compilation issues.
+
examples/hidkbd
^^^^^^^^^^^^^^^^