From 5ae93326e7c60b0219a7f91d06b80ad5ff324da9 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 12 May 2011 19:39:51 +0000 Subject: [PATCH] Changes for clean RGMP compile git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3598 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 7 ++++- arch/rgmp/src/com.c | 4 +-- configs/rgmp/README.txt | 41 +++++++++++++++++++++++++++- configs/rgmp/default/defconfig | 20 +++++++------- configs/rgmp/nsh/defconfig | 49 +++++++++++++++++++++++++++------- include/stdint.h | 4 +-- 6 files changed, 99 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c6e0a8ac9..919f34062e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1744,4 +1744,9 @@ * graphics/nxbe/nxbe_colormap.c: Fix error noted by Bassem Fahmy. The function nxbe_colormap was change to nxbe_configure... apparently "search-and-replace" error. This error was not noticed before because most NX platforms do not use - colormapping. \ No newline at end of file + colormapping. + * arch/rgmp and configs/rgmp. Add architecture support and build + configuration for RGMP. RGMP is a project for running GPOS and + RTOS simultaneously on multi-processor platforms. See + http://rgmp.sourceforge.net/wiki/index.php/Main_Page for further + information about RGMP. \ No newline at end of file diff --git a/arch/rgmp/src/com.c b/arch/rgmp/src/com.c index 206a2ddc9a..7f3f5028e5 100644 --- a/arch/rgmp/src/com.c +++ b/arch/rgmp/src/com.c @@ -172,11 +172,11 @@ static uart_dev_t *up_alloc_com(unsigned int base, int irq) uart_dev_t *dev; struct up_dev_s *priv; - priv = kzmalloc(sizeof(struct up_dev_s)); + priv = kzalloc(sizeof(struct up_dev_s)); if (priv == NULL) goto err0; - dev = kzmalloc(sizeof(uart_dev_t)); + dev = kzalloc(sizeof(uart_dev_t)); if (dev == NULL) goto err1; diff --git a/configs/rgmp/README.txt b/configs/rgmp/README.txt index 34f39f732b..da58a1e3e1 100755 --- a/configs/rgmp/README.txt +++ b/configs/rgmp/README.txt @@ -8,4 +8,43 @@ hybrid operating system. This makes your application able to use both RTOS and GPOS feathures. See http://rgmp.sourceforge.net/wiki/index.php/Main_Page for further -information about RGMP. \ No newline at end of file +information about RGMP. + +Build Instructions +------------------ + +1. Download RGMP from rgmp.svn.sourceforge.net: + + cd + + svn co https://rgmp.svn.sourceforge.net/svnroot/rgmp/trunk rgmp + +2. Configure NuttX. For example, for the RGMP NSH configuration, do the + following: + + cd + cd tools + ./configure.sh rgmp/nsh + cd .. + +3. Edit Make.defs so that it can determine the include paths to the RGMP + installation directory. I made this change to /Make.defs: + + --- configs/rgmp/nsh/Make.defs 2011-05-12 11:19:26.527273500 -0600 + +++ ./Make.defs 2011-05-12 12:52:42.847364700 -0600 + @@ -37,6 +37,7 @@ + + include ${TOPDIR}/.config + + +RGMP_INST_DIR := /home/patacongo/projects/rgmp/rgmp/rtos + RGMPLIBDIR := $(RGMP_INST_DIR)/lib + RGMPINCDIR := $(RGMP_INST_DIR)/include + RGMPLKSCPT := $(RGMP_INST_DIR)/etc/x86.ld + +NOTE: This needs to be better integrated with the RGMP build process. If +you follow the above instructions, NuttX for RGMP will compile error-free +but will fail at link time: + + LD: nuttx.exe + ld: cannot open linker script file /home/patacongo/projects/rgmp/rgmp/rtos/etc/x86.ld: No such file or directory + diff --git a/configs/rgmp/default/defconfig b/configs/rgmp/default/defconfig index 13b3047673..02dfcd7efa 100644 --- a/configs/rgmp/default/defconfig +++ b/configs/rgmp/default/defconfig @@ -340,16 +340,16 @@ CONFIG_EXAMPLE_NETTEST_CLIENTIP=(192<<24|168<<16|0<<8|106) # # Settings for examples/nsh -CONFIG_EXAMPLES_NSH_CONSOLE=y -CONFIG_EXAMPLES_NSH_TELNET=n -CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE=512 -CONFIG_EXAMPLES_NSH_CMD_SIZE=40 -CONFIG_EXAMPLES_NSH_STACKSIZE=4096 -CONFIG_EXAMPLES_NSH_DHCPC=n -CONFIG_EXAMPLES_NSH_NOMAC=n -CONFIG_EXAMPLES_NSH_IPADDR=(10<<24|0<<16|0<<8|2) -CONFIG_EXAMPLES_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1) -CONFIG_EXAMPLES_NSH_NETMASK=(255<<24|255<<16|255<<8|0) +CONFIG_NSH_CONSOLE=y +CONFIG_NSH_TELNET=n +CONFIG_NSH_IOBUFFER_SIZE=512 +CONFIG_NSH_CMD_SIZE=40 +CONFIG_NSH_STACKSIZE=4096 +CONFIG_NSH_DHCPC=n +CONFIG_NSH_NOMAC=n +CONFIG_NSH_IPADDR=(10<<24|0<<16|0<<8|2) +CONFIG_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1) +CONFIG_NSH_NETMASK=(255<<24|255<<16|255<<8|0) # # Stack and heap information diff --git a/configs/rgmp/nsh/defconfig b/configs/rgmp/nsh/defconfig index 578b053dfd..4bef966e14 100644 --- a/configs/rgmp/nsh/defconfig +++ b/configs/rgmp/nsh/defconfig @@ -341,16 +341,45 @@ CONFIG_EXAMPLE_NETTEST_CLIENTIP=(192<<24|168<<16|0<<8|106) # # Settings for apps/nshlib # -CONFIG_EXAMPLES_NSH_CONSOLE=y -CONFIG_EXAMPLES_NSH_TELNET=n -CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE=512 -CONFIG_EXAMPLES_NSH_CMD_SIZE=40 -CONFIG_EXAMPLES_NSH_STACKSIZE=4096 -CONFIG_EXAMPLES_NSH_DHCPC=n -CONFIG_EXAMPLES_NSH_NOMAC=n -CONFIG_EXAMPLES_NSH_IPADDR=(192<<24|168<<16|10<<8|2) -CONFIG_EXAMPLES_NSH_DRIPADDR=(192<<24|168<<16|10<<8|1) -CONFIG_EXAMPLES_NSH_NETMASK=(255<<24|255<<16|255<<8|0) +# CONFIG_NSH_FILEIOSIZE - Size of a static I/O buffer +# CONFIG_NSH_STRERROR - Use strerror(errno) +# CONFIG_NSH_LINELEN - Maximum length of one command line +# CONFIG_NSH_STACKSIZE - Stack size to use for new threads. +# CONFIG_NSH_NESTDEPTH - Max number of nested if-then[-else]-fi +# CONFIG_NSH_DISABLESCRIPT - Disable scripting support +# CONFIG_NSH_DISABLEBG - Disable background commands +# CONFIG_NSH_ROMFSETC - Use startup script in /etc +# CONFIG_NSH_CONSOLE - Use serial console front end +# CONFIG_NSH_TELNET - Use telnetd console front end +# +# If CONFIG_NSH_TELNET is selected: +# CONFIG_NSH_IOBUFFER_SIZE -- Telnetd I/O buffer size +# CONFIG_NSH_DHCPC - Obtain address using DHCP +# CONFIG_NSH_IPADDR - Provides static IP address +# CONFIG_NSH_DRIPADDR - Provides static router IP address +# CONFIG_NSH_NETMASK - Provides static network mask +# CONFIG_NSH_NOMAC - Use a bogus MAC address +# +# If CONFIG_NSH_ROMFSETC is selected: +# CONFIG_NSH_ROMFSMOUNTPT - ROMFS mountpoint +# CONFIG_NSH_INITSCRIPT - Relative path to init script +# CONFIG_NSH_ROMFSDEVNO - ROMFS RAM device minor +# CONFIG_NSH_ROMFSSECTSIZE - ROMF sector size +# CONFIG_NSH_FATDEVNO - FAT FS RAM device minor +# CONFIG_NSH_FATSECTSIZE - FAT FS sector size +# CONFIG_NSH_FATNSECTORS - FAT FS number of sectors +# CONFIG_NSH_FATMOUNTPT - FAT FS mountpoint +# +CONFIG_NSH_CONSOLE=y +CONFIG_NSH_TELNET=n +CONFIG_NSH_IOBUFFER_SIZE=512 +CONFIG_NSH_CMD_SIZE=40 +CONFIG_NSH_STACKSIZE=4096 +CONFIG_NSH_DHCPC=n +CONFIG_NSH_NOMAC=n +CONFIG_NSH_IPADDR=(192<<24|168<<16|10<<8|2) +CONFIG_NSH_DRIPADDR=(192<<24|168<<16|10<<8|1) +CONFIG_NSH_NETMASK=(255<<24|255<<16|255<<8|0) # # Stack and heap information diff --git a/include/stdint.h b/include/stdint.h index 9e814bce58..f6d2fcfcd3 100755 --- a/include/stdint.h +++ b/include/stdint.h @@ -42,8 +42,8 @@ #include -#ifdef CONFIG_ARCH_STDBOOL_H -# include +#ifdef CONFIG_ARCH_STDINT_H +# include #else # include # include