diff options
Diffstat (limited to 'apps/interpreters')
-rw-r--r-- | apps/interpreters/Kconfig | 21 | ||||
-rw-r--r-- | apps/interpreters/Make.defs | 43 | ||||
-rw-r--r-- | apps/interpreters/Makefile | 76 | ||||
-rw-r--r-- | apps/interpreters/README.txt | 67 | ||||
-rw-r--r-- | apps/interpreters/ficl/Kconfig | 16 | ||||
-rw-r--r-- | apps/interpreters/ficl/Makefile | 118 | ||||
-rw-r--r-- | apps/interpreters/ficl/README.txt | 42 | ||||
-rwxr-xr-x | apps/interpreters/ficl/configure.sh | 47 | ||||
-rw-r--r-- | apps/interpreters/ficl/src/nuttx.c | 65 | ||||
-rw-r--r-- | apps/interpreters/ficl/src/nuttx.h | 19 |
10 files changed, 0 insertions, 514 deletions
diff --git a/apps/interpreters/Kconfig b/apps/interpreters/Kconfig deleted file mode 100644 index 6e7d1ac4f..000000000 --- a/apps/interpreters/Kconfig +++ /dev/null @@ -1,21 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see misc/tools/kconfig-language.txt. -# - -comment "Interpreters" - -source "$APPSDIR/interpreters/ficl/Kconfig" - -config INTERPRETERS_PCODE - bool "Pascal p-code interpreter" - default n - ---help--- - Enable support for the Pascal p-code interpreter. See README file at misc/pascal - and also the README.txt file in the apps/interpreter directory. Use of this - configuration implies that you have performed the required installation of the - Pascal run-time code. - -if INTERPRETERS_PCODE -endif - diff --git a/apps/interpreters/Make.defs b/apps/interpreters/Make.defs deleted file mode 100644 index 5d808d5d6..000000000 --- a/apps/interpreters/Make.defs +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################ -# apps/interpreters/Make.defs -# Adds selected applications to apps/ build -# -# Copyright (C) 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt <gnutt@nuttx.org> -# -# 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. -# -############################################################################ - -ifeq ($(CONFIG_INTERPRETERS_PCODE),y) -CONFIGURED_APPS += interpreters/pcode -endif - -ifeq ($(CONFIG_INTERPRETERS_FICL),y) -CONFIGURED_APPS += interpreters/ficl -endif diff --git a/apps/interpreters/Makefile b/apps/interpreters/Makefile deleted file mode 100644 index f78528714..000000000 --- a/apps/interpreters/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -############################################################################ -# apps/interpreters/Makefile -# -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt <gnutt@nuttx.org> -# -# 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. -# -############################################################################ - --include $(TOPDIR)/.config - -# Sub-directories containing interpreter runtime - -SUBDIRS = pcode ficl - -# Create the list of installed runtime modules (INSTALLED_DIRS) - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define ADD_DIRECTORY -INSTALLED_DIRS += ${shell if exist $1\Makefile (echo $1)} -endef -else -define ADD_DIRECTORY -INSTALLED_DIRS += ${shell if [ -r $1/Makefile ]; then echo "$1"; fi} -endef -endif - -$(foreach DIR, $(SUBDIRS), $(eval $(call ADD_DIRECTORY,$(DIR)))) - -all: nothing -.PHONY: nothing context depend clean distclean - -define SDIR_template -$(1)_$(2): - $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" -endef - -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),depend))) -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),clean))) -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) - -nothing: - -context: - -depend: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_depend) - -clean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_clean) - -distclean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_distclean) diff --git a/apps/interpreters/README.txt b/apps/interpreters/README.txt deleted file mode 100644 index f33c75df1..000000000 --- a/apps/interpreters/README.txt +++ /dev/null @@ -1,67 +0,0 @@ -apps/interpreters README file -============================= - -This apps/ directory is set aside to hold interpreters that may be -incorporated into NuttX. - -ficl ----- - - This is DIY port of Ficl (the "Forth Inspired Command Language"). See - http://ficl.sourceforge.net/. It is a "DIY" port because the Ficl source - is not in that directory, only an environment and instructions that will - let you build Ficl under NuttX. The rest is up to you. - -pcode ------ - - At present, only the NuttX Pascal add-on is supported. This NuttX add-on - must be downloaded separately (or is available in an SVN snapshot in the - misc/pascal directory). - - This Pascal add-on must be installed into the NuttX apps/ directory. After - unpacking the Pascal add-on package, an installation script and README.txt - instructions can be found at pascal/nuttx. - - INSTALL.sh -- The script that performs the operation. Usage: - - ./INSTALL.sh [-16|-32] <install-dir> - - If you are using this standard NuttX apps/ package, the correct - location for the <install-dir> is apps/interpreters. That is - where the examples and build logic will expect to find the pcode - sub-directory. - - Example: - - ./INSTALL.sh -16 $PWD/../../../apps/interpreters - - After installation, the NuttX apps/interpresters directory will contain - the following files - - pcode - |-- Makefile - |-- include - | `-- Common header files - |-- libboff - | `-- Pascal object format (POFF) library - `--insn - |-- include - | `-- model-specific header files - `-- prun - `-- model-specific source files - - pashello - - There is a simple Pascal example at apps/examples/pashello. This is the - standard "Hello, World!" example written in Pascal and interpreted from - Pascal P-Code at runtime. To use this example, place the following in - your appconfig file" - - # Path to example in apps/examples containing the passhello_main entry point - - CONFIGURED_APPS += examples/pashello - - # Path to the Pascal p-code runtime interpreter module - - CONFIGURED_APPS += interpreters/pcode diff --git a/apps/interpreters/ficl/Kconfig b/apps/interpreters/ficl/Kconfig deleted file mode 100644 index ba6a7bc35..000000000 --- a/apps/interpreters/ficl/Kconfig +++ /dev/null @@ -1,16 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see misc/tools/kconfig-language.txt. -# - -config INTERPRETERS_FICL - bool "Ficl Forth interpreter" - default n - ---help--- - Enable support for the Ficl interpreter interpreter. See README.txt file in the - apps/interpreters/ficl directory. Use of this configuration assumes - that you have performed the required installation of the Ficl run-time code. - -if INTERPRETERS_FICL -endif - diff --git a/apps/interpreters/ficl/Makefile b/apps/interpreters/ficl/Makefile deleted file mode 100644 index 3b2dc7ab9..000000000 --- a/apps/interpreters/ficl/Makefile +++ /dev/null @@ -1,118 +0,0 @@ -############################################################################ -# apps/interpreters/ficl/Makefile -# -# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt <gnutt@nuttx.org> -# -# 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. -# -############################################################################ - -BUILDDIR := ${shell pwd | sed -e 's/ /\\ /g'} - --include $(TOPDIR)/Make.defs -include $(APPDIR)/Make.defs - -# Tools - -ifeq ($(WINTOOL),y) -INCDIROPT = -w -endif - -# Include paths - -CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(BUILDDIR)/$(FICL_SUBDIR) $(BUILDDIR)/src} - -# Source Files - -ASRCS = -CXXSRCS = -CSRCS = nuttx.c - --include Make.srcs - -ASRCS += $(FICL_ASRCS) -CXXSRCS += $(FICL_CXXSRCS) -CSRCS += $(FICL_CSRCS) - -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) -else -ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) -else - BIN = ../../libapps$(LIBEXT) -endif -endif - -ROOT_DEPPATH = --dep-path . -SRC_DEPPATH = --dep-path src - -VPATH = src:$(FICL_SUBDIR) - -all: .built -.PHONY: debug context depend clean distclean - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -debug: - @#echo "FICL: $(FICL_SUBDIR)" - @#echo "VPATH: $(VPATH)" - @#echo "CFLAGS: $(CFLAGS)" - -.built: debug $(OBJS) - $(call ARCHIVE, $(BIN), $(OBJS)) - $(Q) touch .built - -context: - -.depend: debug Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOT_DEPPATH) $(SRC_DEPPATH) $(FICL_DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep diff --git a/apps/interpreters/ficl/README.txt b/apps/interpreters/ficl/README.txt deleted file mode 100644 index bac9f3148..000000000 --- a/apps/interpreters/ficl/README.txt +++ /dev/null @@ -1,42 +0,0 @@ -apps/interpreter/README.txt -=========================== - -Ficl is a programming language interpreter designed to be embedded into -other systems as a command, macro, and development prototyping language. -Ficl is an acronym for "Forth Inspired Command Language". See -http://ficl.sourceforge.net/ - -Build Instructions ------------------- - -Disclaimer: This installation steps have only been exercised using Ficl -4.1.0. With new versions you will likely have to make some adjustments -to this instructtions or to the files within this directory. Think of this -information as "recommendations" -- not necessarily proven instructions. - -1. CD to apps/interpreters/ficl - -2. Download Ficl: http://sourceforge.net/projects/ficl/files/ - -3. Uznip the Ficl compressed file. - - For example, 'unzip ficl-4.1.0.zip' will leave the file - apps/interpreters/ficl/ficl-4.1.0 - -4. Configure to build Ficl in the apps/interpreters/ficl directory using - the configure.sh script. - - For example, './configure.sh ficl-4.1.0' will leave the Makefile - fragment 'Make.srcs' in the ficl build directory. - -5. Create your NuttX configuration. The appconfig file should include - (1) the path to your application code, and (2) the path to the Ficl - build directory. That latter would appear as the following line in - your appconfig file: - - CONFIGURED_APPS += interpreters/ficl - - 6. Configure and build NuttX. On successful completion, the Ficl objects - will be available in apps/libapps.a and that NuttX binary will be - linked against that file. Of course, Ficl will do nothing unless - you have written some application code that uses it! diff --git a/apps/interpreters/ficl/configure.sh b/apps/interpreters/ficl/configure.sh deleted file mode 100755 index cadc1d48a..000000000 --- a/apps/interpreters/ficl/configure.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -USAGE="$0 <Ficl-dir>" - -FICLDIR=$1 -if [ -z "${FICLDIR}" ]; then - echo "Missing command line argument" - echo $USAGE - exit 1 -fi - -if [ ! -d "${FICLDIR}" ]; then - echo "Sub-directory ${FICLDIR} does not exist" - echo $USAGE - exit 1 -fi - -if [ ! -r "${FICLDIR}/Makefile" ]; then - echo "Readable ${FICLDIR}/Makefile does not exist" - echo $USAGE - exit 1 -fi - -OBJECTS=`grep "^OBJECTS" ${FICLDIR}/Makefile` -if [ -z "${OBJECTS}" ]; then - echo "No OBJECTS found in ${FICLDIR}/Makefile" - echo $USAGE - exit 1 -fi - -OBJLIST=`echo ${OBJECTS} | cut -d'=' -f2 | sed -e "s/unix\.o//g"` - -rm -f Make.srcs -echo "# apps/interpreters/ficl/Make.obs" >> Make.srcs -echo "# Auto-generated file.. Do not edit" >> Make.srcs -echo "" >> Make.srcs -echo "FICL_SUBDIR = ${1}" >> Make.srcs -echo "FICL_DEPPATH = --dep-path ${1}" >> Make.srcs - -unset CSRCS -for OBJ in ${OBJLIST}; do - SRC=`echo ${OBJ} | sed -e "s/\.o/\.c/g"` - CSRCS=${CSRCS}" ${SRC}" -done -echo "FICL_ASRCS = " >> Make.srcs -echo "FICL_CXXSRCS = " >> Make.srcs -echo "FICL_CSRCS = ${CSRCS}" >> Make.srcs diff --git a/apps/interpreters/ficl/src/nuttx.c b/apps/interpreters/ficl/src/nuttx.c deleted file mode 100644 index 16b3fa1db..000000000 --- a/apps/interpreters/ficl/src/nuttx.c +++ /dev/null @@ -1,65 +0,0 @@ -#include <sys/stat.h> -#include <sys/statfs.h> - -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#include "ficl.h" - -void *ficlMalloc(size_t size) -{ - return malloc(size); -} - -void *ficlRealloc(void *p, size_t size) -{ - return realloc(p, size); -} - -void ficlFree(void *p) -{ - free(p); -} - -void ficlCallbackDefaultTextOut(ficlCallback *callback, char *message) -{ - FICL_IGNORE(callback); - if (message != NULL) - fputs(message, stdout); - else - fflush(stdout); - return; -} - -int ficlFileStatus(char *filename, int *status) -{ - struct stat statbuf; - if (stat(filename, &statbuf) == 0) - { - *status = statbuf.st_mode; - return 0; - } - *status = ENOENT; - return -1; -} - -long ficlFileSize(ficlFile *ff) -{ - struct stat statbuf; - if (ff == NULL) - return -1; - - statbuf.st_size = -1; - if (fstat(fileno(ff->f), &statbuf) != 0) - return -1; - - return statbuf.st_size; -} - -void ficlSystemCompilePlatform(ficlSystem *system) -{ - return; -} - - diff --git a/apps/interpreters/ficl/src/nuttx.h b/apps/interpreters/ficl/src/nuttx.h deleted file mode 100644 index e44031066..000000000 --- a/apps/interpreters/ficl/src/nuttx.h +++ /dev/null @@ -1,19 +0,0 @@ -#include <stdint.h> - -typedef int8_t ficlInteger8; -typedef uint8_t ficlUnsigned8; -typedef int16_t ficlInteger16; -typedef uint16_t ficlUnsigned16; -typedef int32_t ficlInteger32; -typedef uint32_t ficlUnsigned32; - -typedef intptr_t ficlInteger; -typedef uintptr_t ficlUnsigned; -typedef float ficlFloat; - -#define FICL_PLATFORM_BASIC_TYPES (1) -#define FICL_PLATFORM_HAS_2INTEGER (0) -#define FICL_PLATFORM_HAS_FTRUNCATE (0) - -#define FICL_PLATFORM_OS "ansi" -#define FICL_PLATFORM_ARCHITECTURE "unknown" |