Set available features from nuttx menuconfig (nuttx-stm32f4 target). (#1607)

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
Robert Sipka 2017-02-22 12:36:31 +01:00 committed by GitHub
parent 39dc4a6273
commit 993f1ce896
2 changed files with 31 additions and 0 deletions

View File

@ -31,4 +31,22 @@ config JERRYSCRIPT_HEAPSIZE
int "Jerryscript heap size"
default 107520
config JERRYSCRIPT_MEM_STATS
bool "Enable memory statistics"
default n
config JERRYSCRIPT_SHOW_OPCODES
bool "Enable parser byte-code dumps"
default n
config JERRYSCRIPT_DEBUGGER
bool "Jerryscript debugger"
default n
if JERRYSCRIPT_DEBUGGER
config JERRYSCRIPT_DEBUGGER_PORT
int "Jerryscript debugger port"
default 5001
endif
endif

View File

@ -19,6 +19,7 @@
CONFIG_JERRYSCRIPT_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_JERRYSCRIPT_STACKSIZE ?= 16384
CONFIG_JERRYSCRIPT_HEAPSIZE ?= 107520
CONFIG_JERRY_DEBUGGER_PORT ?= 5001
APPNAME = jerry
# path to the project dir, "jerry-nuttx" by default
@ -28,6 +29,18 @@ STACKSIZE = $(CONFIG_JERRYSCRIPT_STACKSIZE)
CFLAGS += -std=c99 -DJERRY_NDEBUG -DJERRY_JS_PARSER '-DCONFIG_MEM_HEAP_AREA_SIZE=$(CONFIG_JERRYSCRIPT_HEAPSIZE)'
CFLAGS += -I$(ROOT_DIR)/ $(shell find $(ROOT_DIR)/jerryscript/jerry-core -type d | sed -r -e 's/^/-I/g')
ifeq ($(CONFIG_JERRYSCRIPT_MEM_STATS),y)
CFLAGS += -DJMEM_STATS
endif
ifeq ($(CONFIG_JERRYSCRIPT_SHOW_OPCODES),y)
CFLAGS += -DPARSER_DUMP_BYTE_CODE
endif
ifeq ($(CONFIG_JERRYSCRIPT_DEBUGGER),y)
CFLAGS += -DJERRY_DEBUGGER '-DJERRY_DEBUGGER_PORT=$(CONFIG_JERRY_DEBUGGER_PORT)'
endif
# Jerryscript
.PHONY: jerry_core_allin.c