aboutsummaryrefslogtreecommitdiffstats
path: root/demos/PPC-SPC560D-GCC/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/PPC-SPC560D-GCC/main.c')
-rw-r--r--demos/PPC-SPC560D-GCC/main.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/demos/PPC-SPC560D-GCC/main.c b/demos/PPC-SPC560D-GCC/main.c
index b98716e94..afbc87b61 100644
--- a/demos/PPC-SPC560D-GCC/main.c
+++ b/demos/PPC-SPC560D-GCC/main.c
@@ -15,12 +15,11 @@
*/
#include "ch.h"
-//#include "hal.h"
-//#include "test.h"
-//#include "shell.h"
-//#include "chprintf.h"
+#include "hal.h"
+#include "test.h"
+#include "shell.h"
+#include "chprintf.h"
-#if 0
#define SHELL_WA_SIZE THD_WA_SIZE(1024)
#define TEST_WA_SIZE THD_WA_SIZE(256)
@@ -86,7 +85,6 @@ static const ShellConfig shell_cfg1 = {
(BaseSequentialStream *)&SD1,
commands
};
-#endif
/*
* LEDs blinker thread, times are in milliseconds.
@@ -162,7 +160,7 @@ static msg_t Thread1(void *arg) {
* Application entry point.
*/
int main(void) {
-// Thread *shelltp = NULL;
+ Thread *shelltp = NULL;
/*
* System initializations.
@@ -175,6 +173,11 @@ int main(void) {
chSysInit();
/*
+ * Shell manager initialization.
+ */
+ shellInit();
+
+ /*
* Activates the serial driver 1 using the driver default configuration.
*/
sdStart(&SD1, NULL);
@@ -188,14 +191,12 @@ int main(void) {
* Normal main() thread activity.
*/
while (TRUE) {
-#if 0
if (!shelltp)
shelltp = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO);
else if (chThdTerminated(shelltp)) {
chThdRelease(shelltp); /* Recovers memory of the previous shell. */
shelltp = NULL; /* Triggers spawning of a new shell. */
}
-#endif
chThdSleepMilliseconds(1000);
}
return 0;