diff --git a/targets/nuttx-stm32f4/Kconfig b/targets/nuttx-stm32f4/Kconfig index 9b34cf81d..d47567982 100644 --- a/targets/nuttx-stm32f4/Kconfig +++ b/targets/nuttx-stm32f4/Kconfig @@ -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 diff --git a/targets/nuttx-stm32f4/Makefile b/targets/nuttx-stm32f4/Makefile index 074227995..f1774522e 100644 --- a/targets/nuttx-stm32f4/Makefile +++ b/targets/nuttx-stm32f4/Makefile @@ -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