reading the how-to about threads http://www.chibios.org/dokuwiki/doku.php?id=chibios:howtos:createthread I am stumbling across this:
Code: Select all
static WORKING_AREA(myThreadWorkingArea, 128);
/*
* LED flashing thread.
*/
static msg_t myThread(void *arg) {
/* Blink, blink*/
}
return (msg_t)i;
}
int main(int argc, char *argv[]) {
Thread *tp = chThdCreateFromHeap(NULL, THD_WA_SIZE(128), NORMALPRIO+1, myThread, NULL);
if (tp == NULL) chSysHalt(); /* Memory exausted. */
//...
//...
}
I can see what the " static WORKING_AREA(myThreadWorkingArea, 128); " is doing for the static threads explained on the same page but not why it's here for the dynamic ones?
Thanks