summaryrefslogtreecommitdiff
path: root/core/cortex-m
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-04-04 21:38:22 +0800
committerChromeBot <chrome-bot@google.com>2013-04-10 01:08:45 -0700
commit8a06eb1d35cb460fb5669c720262d437f54b0101 (patch)
tree9a029fc001ed24bf023f89d35b5696926085e539 /core/cortex-m
parent64ae15f3b3c743a8b98af7754871c0ba7470becd (diff)
downloadchrome-ec-8a06eb1d35cb460fb5669c720262d437f54b0101.tar.gz
Only includes necessary tasks for test binaries
This changes current TASK() syntax to TASK_BASE() and TASK_NORMAL(), where TASK_BASE is necessary for the EC to boot on a board and TASK_NORMAL represents the task that can be removed in a test binary. Tasks introduced by a test should be listed as TASK_TEST(). Note that this CL breaks current tests (many of them are broken anyway), which will be fixed in up coming CLs. BUG=chrome-os-partner:18598 TEST=Build link/bds/spring/snow/daisy/mccroskey. (mccroskey failed for unrelated issue) BRANCH=none Change-Id: Ic645cdae0906ed21dc473553f1f43c2537ec4bb9 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47531
Diffstat (limited to 'core/cortex-m')
-rw-r--r--core/cortex-m/task.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index 485e58e06d..47bbbee1e9 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -33,17 +33,17 @@ typedef union {
/* declare task routine prototypes */
#define TASK(n, r, d, s) int r(void *);
-#include TASK_LIST
void __idle(void);
CONFIG_TASK_LIST
+CONFIG_TEST_TASK_LIST
#undef TASK
/* Task names for easier debugging */
#define TASK(n, r, d, s) #n,
-#include TASK_LIST
static const char * const task_names[] = {
"<< idle >>",
CONFIG_TASK_LIST
+ CONFIG_TEST_TASK_LIST
};
#undef TASK
@@ -96,7 +96,6 @@ static void task_exit_trap(void)
.pc = (uint32_t)r, \
.stack_size = s, \
},
-#include TASK_LIST
static const struct {
uint32_t r0;
uint32_t pc;
@@ -104,6 +103,7 @@ static const struct {
} const tasks_init[] = {
TASK(IDLE, __idle, 0, IDLE_TASK_STACK_SIZE)
CONFIG_TASK_LIST
+ CONFIG_TEST_TASK_LIST
};
#undef TASK
@@ -112,10 +112,10 @@ static task_ tasks[TASK_ID_COUNT];
/* Stacks for all tasks */
#define TASK(n, r, d, s) + s
-#include TASK_LIST
uint8_t task_stacks[0
TASK(IDLE, __idle, 0, IDLE_TASK_STACK_SIZE)
CONFIG_TASK_LIST
+ CONFIG_TEST_TASK_LIST
] __attribute__((aligned(8)));
#undef TASK