summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYicheng Li <yichengli@chromium.org>2020-01-16 17:23:50 -0800
committerCommit Bot <commit-bot@chromium.org>2020-02-05 01:20:42 +0000
commitc7313be9af31a4a2cd833b2e2440404aab52c04e (patch)
treeb4aea0f41b0d3dabd7697b01a18b52ee785c5668
parent6d413f37a1224aa53f76b62f4139b6106e661737 (diff)
downloadchrome-ec-c7313be9af31a4a2cd833b2e2440404aab52c04e.tar.gz
stm32: Enlarge console task stack for testing
For on-device unit tests, we use the console to "runtest" and view results. A small console size would result in console stack overflow after the test finishes. Use a larger console stack if it's a test build. BRANCH=None BUG=b:146059307 TEST=make BOARD=nucleo-h743zi tests -j (Flash the build/nucleo-h743zi/test-aes.bin) (Connect to UART console) runtest (Repeat for test-sha256.bin and test-sha256_unrolled.bin) Change-Id: I5c48ae10f5808ed2d3854fdc72275a3a416cf76d Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2006709 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
-rw-r--r--board/hatch_fp/ec.tasklist2
-rw-r--r--board/nocturne_fp/ec.tasklist2
-rw-r--r--board/nucleo-h743zi/ec.tasklist2
-rw-r--r--chip/stm32/config_chip.h7
4 files changed, 10 insertions, 3 deletions
diff --git a/board/hatch_fp/ec.tasklist b/board/hatch_fp/ec.tasklist
index e8040bba5e..ed1e6ed294 100644
--- a/board/hatch_fp/ec.tasklist
+++ b/board/hatch_fp/ec.tasklist
@@ -11,4 +11,4 @@
TASK_ALWAYS(HOOKS, hook_task, NULL, 1024) \
TASK_ALWAYS_RW(FPSENSOR, fp_task, NULL, 4096) \
TASK_ALWAYS(HOSTCMD, host_command_task, NULL, 4096) \
- TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE)
+ TASK_ALWAYS(CONSOLE, console_task, NULL, CONSOLE_TASK_STACK_SIZE)
diff --git a/board/nocturne_fp/ec.tasklist b/board/nocturne_fp/ec.tasklist
index e8040bba5e..ed1e6ed294 100644
--- a/board/nocturne_fp/ec.tasklist
+++ b/board/nocturne_fp/ec.tasklist
@@ -11,4 +11,4 @@
TASK_ALWAYS(HOOKS, hook_task, NULL, 1024) \
TASK_ALWAYS_RW(FPSENSOR, fp_task, NULL, 4096) \
TASK_ALWAYS(HOSTCMD, host_command_task, NULL, 4096) \
- TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE)
+ TASK_ALWAYS(CONSOLE, console_task, NULL, CONSOLE_TASK_STACK_SIZE)
diff --git a/board/nucleo-h743zi/ec.tasklist b/board/nucleo-h743zi/ec.tasklist
index ec42cd45eb..4437e9b38c 100644
--- a/board/nucleo-h743zi/ec.tasklist
+++ b/board/nucleo-h743zi/ec.tasklist
@@ -10,4 +10,4 @@
TASK_ALWAYS_RO(RWSIG, rwsig_task, NULL, 1280) \
TASK_ALWAYS(HOOKS, hook_task, NULL, 1024) \
TASK_NOTEST(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
- TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE)
+ TASK_ALWAYS(CONSOLE, console_task, NULL, CONSOLE_TASK_STACK_SIZE)
diff --git a/chip/stm32/config_chip.h b/chip/stm32/config_chip.h
index d0223aba09..44b374da3a 100644
--- a/chip/stm32/config_chip.h
+++ b/chip/stm32/config_chip.h
@@ -105,6 +105,13 @@
/* Even bigger */
#define VENTI_TASK_STACK_SIZE 768
+/*
+ * Console stack size. For test builds, the console is used to interact with
+ * the test, and insufficient stack size causes console stack overflow after
+ * running the on-device tests.
+ */
+#define CONSOLE_TASK_STACK_SIZE 4096
+
/* Interval between HOOK_TICK notifications */
#define HOOK_TICK_INTERVAL_MS 500
#define HOOK_TICK_INTERVAL (HOOK_TICK_INTERVAL_MS * MSEC)