aboutsummaryrefslogtreecommitdiffstats
path: root/demos/SPC5
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-07-17 12:24:19 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-07-17 12:24:19 +0000
commit3b9e182f11d0110765b11e4d53afe899aa795c5f (patch)
tree62b4908b12d623e312e01f47d3feff9183f9bb28 /demos/SPC5
parent25069afdb7ca113779cf4bcc9e3879d6db7afae8 (diff)
downloadChibiOS-3b9e182f11d0110765b11e4d53afe899aa795c5f.tar.gz
ChibiOS-3b9e182f11d0110765b11e4d53afe899aa795c5f.tar.bz2
ChibiOS-3b9e182f11d0110765b11e4d53afe899aa795c5f.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7041 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/SPC5')
-rw-r--r--demos/SPC5/NIL-SPC560D-EVB/main.c70
-rw-r--r--demos/SPC5/NIL-SPC560D-EVB/nilconf.h2
2 files changed, 2 insertions, 70 deletions
diff --git a/demos/SPC5/NIL-SPC560D-EVB/main.c b/demos/SPC5/NIL-SPC560D-EVB/main.c
index 2c63168c4..0e3ad525e 100644
--- a/demos/SPC5/NIL-SPC560D-EVB/main.c
+++ b/demos/SPC5/NIL-SPC560D-EVB/main.c
@@ -18,74 +18,6 @@
#include "hal.h"
//#include "test.h"
-#if 0
-#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(1024)
-#define TEST_WA_SIZE THD_WORKING_AREA_SIZE(256)
-
-static void cmd_mem(BaseSequentialStream *chp, int argc, char *argv[]) {
- size_t n, size;
-
- (void)argv;
- if (argc > 0) {
- chprintf(chp, "Usage: mem\r\n");
- return;
- }
- n = chHeapStatus(NULL, &size);
- chprintf(chp, "core free memory : %u bytes\r\n", chCoreStatus());
- chprintf(chp, "heap fragments : %u\r\n", n);
- chprintf(chp, "heap free total : %u bytes\r\n", size);
-}
-
-static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) {
- static const char *states[] = {CH_STATE_NAMES};
- thread_t *tp;
-
- (void)argv;
- if (argc > 0) {
- chprintf(chp, "Usage: threads\r\n");
- return;
- }
- chprintf(chp, " addr stack prio refs state time\r\n");
- tp = chRegFirstThread();
- do {
- chprintf(chp, "%.8lx %.8lx %4lu %4lu %9s\r\n",
- (uint32_t)tp, (uint32_t)tp->p_ctx.sp,
- (uint32_t)tp->p_prio, (uint32_t)(tp->p_refs - 1),
- states[tp->p_state]);
- tp = chRegNextThread(tp);
- } while (tp != NULL);
-}
-
-static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) {
- thread_t *tp;
-
- (void)argv;
- if (argc > 0) {
- chprintf(chp, "Usage: test\r\n");
- return;
- }
- tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriorityX(),
- TestThread, chp);
- if (tp == NULL) {
- chprintf(chp, "out of memory\r\n");
- return;
- }
- chThdWait(tp);
-}
-
-static const ShellCommand commands[] = {
- {"mem", cmd_mem},
- {"threads", cmd_threads},
- {"test", cmd_test},
- {NULL, NULL}
-};
-
-static const ShellConfig shell_cfg1 = {
- (BaseSequentialStream *)&SD1,
- commands
-};
-#endif
-
/*
* LEDs blinker thread, times are in milliseconds.
*/
@@ -174,7 +106,7 @@ int main(void) {
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
-// halInit();
+ halInit();
chSysInit();
/* This is now the idle thread loop, you may perform here a low priority
diff --git a/demos/SPC5/NIL-SPC560D-EVB/nilconf.h b/demos/SPC5/NIL-SPC560D-EVB/nilconf.h
index ff54fbe41..ad25ddc22 100644
--- a/demos/SPC5/NIL-SPC560D-EVB/nilconf.h
+++ b/demos/SPC5/NIL-SPC560D-EVB/nilconf.h
@@ -40,7 +40,7 @@
* @note This number is not inclusive of the idle thread which is
* Implicitly handled.
*/
-#define NIL_CFG_NUM_THREADS 3
+#define NIL_CFG_NUM_THREADS 1
/** @} */