Add C++ HelloWorld example
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1706 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
ad69d90fa6
commit
f51ecc4741
@ -693,3 +693,4 @@
|
||||
* eZ8Encore!: Add an I2C driver.
|
||||
* Add support for the Freescale i.MX1/L architecture and a configuration for
|
||||
the Freescale MX1ADS development board.
|
||||
* examples/helloxx: Added a simple C++ hello world example
|
||||
|
@ -8,7 +8,7 @@
|
||||
<tr align="center" bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
||||
<p>Last Updated: April 12, 2009</p>
|
||||
<p>Last Updated: April 19, 2009</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1387,12 +1387,18 @@ nuttx-0.4.5 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* eZ8Encore!: Add an I2C driver.
|
||||
* Add support for the Freescale i.MX1/L architecture and a configuration for
|
||||
the Freescale MX1ADS development board.
|
||||
* examples/helloxx: Added a simple C++ hello world example
|
||||
|
||||
pascal-0.1.3 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
buildroot-0.1.4 2009-xx-xx <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Add support for a blackfin toolchain using GCC 4.2.4 and binutils 2.19
|
||||
* GCC 4.2.4 no longer attempts to build libstdc++. Now we can build g++!
|
||||
* The ARM GCC-4.2.4 configuration was changed so that it now builds g++.
|
||||
* Removed building of initial and final GCC. that is not necessary because
|
||||
we do not build a libc. Now it builds almost twice as fast.
|
||||
* Removed logic to build the target GCC. That is never used.
|
||||
|
||||
</pre></ul>
|
||||
|
||||
|
@ -37,6 +37,7 @@ include ${TOPDIR}/.config
|
||||
|
||||
CROSSDEV = arm-elf-
|
||||
CC = $(CROSSDEV)gcc
|
||||
CXX = $(CROSSDEV)g++
|
||||
CPP = $(CROSSDEV)gcc -E
|
||||
LD = $(CROSSDEV)ld
|
||||
AR = $(CROSSDEV)ar rcs
|
||||
@ -47,6 +48,11 @@ OBJDUMP = $(CROSSDEV)objdump
|
||||
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
|
||||
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||
ARCHWARNINGSXX = -Wall -Wshadow
|
||||
|
||||
ifeq ("${CONFIG_DEBUG}","y")
|
||||
ARCHOPTIMIZATION = -g
|
||||
else
|
||||
@ -55,17 +61,19 @@ else
|
||||
endif
|
||||
|
||||
ifeq ($(ARCHCCMAJOR),4)
|
||||
ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv4t -msoft-float -fno-builtin
|
||||
ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv4t -msoft-float
|
||||
else
|
||||
ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv4t -msoft-float -fno-builtin
|
||||
ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv4t -msoft-float
|
||||
endif
|
||||
ARCHPICFLAGS = -fpic
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||
|
||||
ARCHPICFLAGS = -fpic
|
||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
@ -88,6 +96,11 @@ define COMPILE
|
||||
@$(CC) -c $(CFLAGS) $1 -o $2
|
||||
endef
|
||||
|
||||
define COMPILEXX
|
||||
@echo "CXX: $1"
|
||||
@$(CXX) -c $(CXXFLAGS) $1 -o $2
|
||||
endef
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
@$(CC) -c $(AFLAGS) $1 -o $2
|
||||
|
@ -21,7 +21,7 @@ examples/dhcpd
|
||||
cd examples/dhcpd
|
||||
make -f Makefile.host
|
||||
|
||||
Kernel configuratin settings:
|
||||
NuttX configuration settings:
|
||||
|
||||
CONFIG_EXAMPLE_DHCPD_NOMAC - (May be defined to use software assigned MAC)
|
||||
CONFIG_EXAMPLE_DHCPD_IPADDR - Target IP address
|
||||
@ -39,6 +39,21 @@ examples/hello
|
||||
than examples/null with a single printf statement. Again 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++
|
||||
library suupport is available, and that class are instantiated
|
||||
correctly.
|
||||
|
||||
examples/mount
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -314,13 +314,13 @@ EXTERN void weak_function fs_initialize(void);
|
||||
|
||||
EXTERN STATUS register_driver(const char *path,
|
||||
const struct file_operations *fops,
|
||||
mode_t mode, void *private);
|
||||
mode_t mode, void *priv);
|
||||
|
||||
/* fs_registerdriver.c ******************************************************/
|
||||
|
||||
EXTERN STATUS register_blockdriver(const char *path,
|
||||
const struct block_operations *bops,
|
||||
mode_t mode, void *private);
|
||||
mode_t mode, void *priv);
|
||||
|
||||
/* fs_unregisterdriver.c ****************************************************/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user