From 7a8790f1b49844dc99f8449f8be210e28ae3bd17 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 30 Jan 2020 10:43:04 -0600 Subject: [PATCH] apps/testing/mm: Make stacksize configurable (#40) Make stacksize as well as program name and priority configurable. The defaults are the same as the previous hardcoded values. The default stacksize of 2048 bytes is more than enough for most target applications. However, when running on the simulator, much large stack sizes are needed. --- testing/mm/Kconfig | 16 ++++++++++++++++ testing/mm/Makefile | 8 ++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/testing/mm/Kconfig b/testing/mm/Kconfig index ac51e5407..972ccb25d 100644 --- a/testing/mm/Kconfig +++ b/testing/mm/Kconfig @@ -10,4 +10,20 @@ config TESTING_MM Enable the memory management test if TESTING_MM + +config TESTING_MM_PROGNAME + string "Program name" + default "mm" + ---help--- + This is the name of the program that will be used when the NSH ELF + program is installed. + +config TESTING_MM_PRIORITY + int "Task priority" + default 100 + +config TESTING_MM_STACKSIZE + int "Stack size" + default 2048 + endif diff --git a/testing/mm/Makefile b/testing/mm/Makefile index a5abe93dc..6c5640f8e 100644 --- a/testing/mm/Makefile +++ b/testing/mm/Makefile @@ -37,10 +37,10 @@ # Memory Management Test -PROGNAME = mm -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 -MODULE = $(CONFIG_TESTING_MM) +PROGNAME = $(CONFIG_TESTING_MM_PROGNAME) +PRIORITY = $(CONFIG_TESTING_MM_PRIORITY) +STACKSIZE = $(CONFIG_TESTING_MM_STACKSIZE) +MODULE = $(CONFIG_TESTING_MM) MAINSRC = mm_main.c