9
0
Fork 0

Move P-Code execution logic from interpreters/prun to system/prun

This commit is contained in:
Gregory Nutt 2014-05-09 11:09:43 -06:00
parent 892b3598ff
commit db7257ad48
14 changed files with 30 additions and 16 deletions

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/include/interpreters/prun.h
* apps/include/prun.h
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -33,8 +33,8 @@
*
****************************************************************************/
#ifndef __APPS_INCLUDE_INTERPRETERS_PRUN_H
#define __APPS_INCLUDE_INTERPRETERS_PRUN_H
#ifndef __APPS_INCLUDE_PRUN_H
#define __APPS_INCLUDE_PRUN_H
/****************************************************************************
* Included Files
@ -87,4 +87,4 @@ int prun(FAR char *exepath, size_t varsize, size_t strsize);
}
#endif
#endif /* __APPS_INCLUDE_INTERPRETERS_PRUN_H */
#endif /* __APPS_INCLUDE_PRUN_H */

View File

@ -15,6 +15,4 @@ config INTERPRETERS_PCODE
Pascal run-time code.
if INTERPRETERS_PCODE
source "$APPSDIR/interpreters/prun/Kconfig"
endif

View File

@ -38,10 +38,6 @@ ifeq ($(CONFIG_INTERPRETERS_PCODE),y)
CONFIGURED_APPS += interpreters/pcode
endif
ifeq ($(CONFIG_INTERPRETERS_PRUN),y)
CONFIGURED_APPS += interpreters/prun
endif
ifeq ($(CONFIG_INTERPRETERS_FICL),y)
CONFIGURED_APPS += interpreters/ficl
endif

View File

@ -39,6 +39,10 @@ menu "readline()"
source "$APPSDIR/system/readline/Kconfig"
endmenu
menu "P-Code Support"
source "$APPSDIR/system/prun/Kconfig"
endmenu
menu "Power Off"
source "$APPSDIR/system/poweroff/Kconfig"
endmenu

View File

@ -66,6 +66,10 @@ ifeq ($(CONFIG_SYSTEM_NXPLAYER),y)
CONFIGURED_APPS += system/nxplayer
endif
ifeq ($(CONFIG_SYSTEM_PRUN),y)
CONFIGURED_APPS += sysem/prun
endif
ifeq ($(CONFIG_SYSTEM_RAMTEST),y)
CONFIGURED_APPS += system/ramtest
endif

View File

@ -3,12 +3,20 @@
# see misc/tools/kconfig-language.txt.
#
config INTERPRETERS_PRUN
config SYSTEM_PRUN
bool "Pascal P-Code interpreter"
default n
depends on INTERPRETERS_PCODE
---help---
Build the Pascal P-Code interpreter / Virtual machine
if INTERPRETERS_PRUN
if SYSTEM_PRUN
config SYSTEM_PEXEC
bool "Pascal P-Code command"
default n
---help---
Generates an NSH built-in task that may be used to execute P-Code
from the NSH command line.
endif

View File

@ -1,5 +1,5 @@
############################################################################
# apps/interpreters/prun/Makefile
# apps/system/prun/Makefile
#
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -44,7 +44,7 @@
#include <errno.h>
#include <debug.h>
#include <apps/interpreters/prun.h>
#include <apps/prun.h>
#include "pexec.h"
#include "pedefs.h"

View File

@ -72,7 +72,7 @@ endif
config PCODE
bool "Support P-Code Applications"
default n
depends on INTERPRETERS_PCODE && INTERPRETERS_PRUN && (!NUTTX_KERNEL || EXPERIMENTAL)
depends on INTERPRETERS_PCODE && SYSTEM_PRUN && (!NUTTX_KERNEL || EXPERIMENTAL)
---help---
Enable support for interpreted P-Code binaries. P-Code binaries are
generated by the NuttX Pascal compiler.

View File

@ -74,6 +74,10 @@ Here is a simple test configuration using the NuttX simulator:
CONFIG_INTERPRETERS_PCODE=y
And the P-Code runtime support:
CONFIG_SYSTEM_PRUN=y
This enables building the PCODE binary format
CONFIG_PCODE=y

View File

@ -47,7 +47,7 @@
#include <errno.h>
#include <debug.h>
#include <apps/interpreters/prun.h>
#include <apps/prun.h>
#include <nuttx/kmalloc.h>
#include <nuttx/poff.h>