You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/01/30 16:43:11 UTC

[incubator-nuttx-apps] branch master updated: apps/testing/mm: Make stacksize configurable (#40)

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a8790f  apps/testing/mm:  Make stacksize configurable (#40)
7a8790f is described below

commit 7a8790f1b49844dc99f8449f8be210e28ae3bd17
Author: patacongo <sp...@yahoo.com>
AuthorDate: Thu Jan 30 10:43:04 2020 -0600

    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 ac51e54..972ccb2 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 a5abe93..6c5640f 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