make working area of shell thread static

This commit is contained in:
TT 2016-11-19 13:19:18 +09:00
parent 9a63892480
commit 1f64bb759b

7
main.c
View file

@ -1061,7 +1061,8 @@ static void cmd_stat(BaseSequentialStream *chp, int argc, char *argv[])
#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(454)
#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(400)
static THD_WORKING_AREA(waThread2, SHELL_WA_SIZE);
static const ShellCommand commands[] =
{
@ -1178,8 +1179,8 @@ int main(void)
while (1) {
if (SDU1.config->usbp->state == USB_ACTIVE) {
//palSetPad(GPIOC, GPIOC_LED);
thread_t *shelltp = chThdCreateFromHeap(NULL, SHELL_WA_SIZE,
"shell", NORMALPRIO + 1,
thread_t *shelltp = chThdCreateStatic(waThread2, sizeof(waThread2),
NORMALPRIO + 1,
shellThread, (void *)&shell_cfg1);
chThdWait(shelltp); /* Waiting termination. */
//palClearPad(GPIOC, GPIOC_LED);