/******************************************************************************\r
* NOTE 1: This project provides two demo applications. A simple blinky style\r
* project, and a more comprehensive test and demo application. The\r
- * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select\r
- * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\r
- * in main.c. This file implements the simply blinky style version.\r
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in FreeRTOSConifg.h is used to\r
+ * select between the two. See the notes on using\r
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY in main.c. This file implements the\r
+ * simply blinky style version.\r
*\r
* NOTE 2: This file only contains the source code that is specific to the\r
* basic demo. Generic functions, such FreeRTOS hook functions, and functions\r
\r
/*\r
* Called by main() to create the simply blinky style application if\r
- * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
*/\r
void main_blinky( void );\r
\r
*/\r
//#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.\r
\r
+/*\r
+ * Set configCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
+ * or 0 to run the more comprehensive test and demo application.\r
+ */\r
+#define configCREATE_SIMPLE_BLINKY_DEMO_ONLY 0\r
+\r
+/*\r
+ * Set configBUILD_FOR_DEVELOPMENT_KIT to 1 to run the demo on the SmartFusion2\r
+ * development kit, or 0 to run the demo on the SmartFusion2 starter kit. Refer\r
+ * to the documentation page for this demo on the FreeRTOS.org website for\r
+ * instruction on switching between the two hardware platforms.
+ */\r
+#define configBUILD_FOR_DEVELOPMENT_KIT 0\r
+\r
/*-----------------------------------------------------------\r
* Application specific definitions.\r
*\r
static const uint8_t * const pcNewLine = ( uint8_t * ) "\r\n";\r
\r
/* The UART used by the CLI. */\r
-static const mss_uart_instance_t * const pxUART = &g_mss_uart0;\r
-static const IRQn_Type xUART_IRQ = UART0_IRQn;\r
+#if configBUILD_FOR_DEVELOPMENT_KIT == 1\r
+ static const mss_uart_instance_t * const pxUART = &g_mss_uart1;\r
+ static const IRQn_Type xUART_IRQ = UART1_IRQn;\r
+#else\r
+ static const mss_uart_instance_t * const pxUART = &g_mss_uart0;\r
+ static const IRQn_Type xUART_IRQ = UART0_IRQn;\r
+#endif\r
\r
/* Because characters are received slowly (at the speed somebody can type) then\r
it is ok to pass received characters from the Rx interrupt to the task on a\r
/******************************************************************************\r
* NOTE 1: This project provides two demo applications. A simple blinky style\r
* project, and a more comprehensive test and demo application. The\r
- * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select\r
- * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\r
- * in main.c. This file implements the comprehensive test and demo version.\r
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in FreeRTOSConifg.h is used to\r
+ * select between the two. See the notes on using\r
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY in mainc. This file implements the\r
+ * comprehensive test and demo version.\r
*\r
* NOTE 2: This file only contains the source code that is specific to the\r
* full demo. Generic functions, such FreeRTOS hook functions, and functions\r
/* Remember the state of the outputs for easy toggling. */\r
static unsigned char ucPortState = 0;\r
\r
-static const mss_gpio_id_t ucLEDs[ partstNUM_LEDS ] = { MSS_GPIO_0, MSS_GPIO_1 };\r
+#if configBUILD_FOR_DEVELOPMENT_KIT == 1\r
+ static const mss_gpio_id_t ucLEDs[ partstNUM_LEDS ] = { MSS_GPIO_14, MSS_GPIO_15 };\r
+#else\r
+ static const mss_gpio_id_t ucLEDs[ partstNUM_LEDS ] = { MSS_GPIO_0, MSS_GPIO_1 };\r
+#endif\r
\r
/*-----------------------------------------------------------*/\r
\r
/******************************************************************************\r
* This project provides two demo applications. A simple blinky style project,\r
* and a more comprehensive test and demo application. The\r
- * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to\r
- * select between the two. The simply blinky demo is implemented and described\r
- * in main_blinky.c. The more comprehensive test and demo application is\r
- * implemented and described in main_full.c.\r
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in FreeRTOSConfig.h) is\r
+ * used to select between the two. The simply blinky demo is implemented and\r
+ * described in main_blinky.c. The more comprehensive test and demo application\r
+ * is implemented and described in main_full.c.\r
*\r
* This file implements the code that is not demo specific, including the\r
* hardware setup and FreeRTOS hook functions.\r
function. */\r
#include "partest.h"\r
\r
-/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
-or 0 to run the more comprehensive test and demo application. */\r
-#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0\r
-\r
/*\r
* Set up the hardware ready to run this demo.\r
*/\r
static void prvSetupHardware( void );\r
\r
/*\r
- * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
- * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.\r
+ * main_blinky() is used when configCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
+ * main_full() is used when configCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.\r
*/\r
extern void main_blinky( void );\r
extern void main_full( void );\r
/* Prepare the hardware to run this demo. */\r
prvSetupHardware();\r
\r
- /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top\r
+ /* The configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top\r
of this file. */\r
- #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1\r
+ #if configCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1\r
{\r
main_blinky();\r
}\r
function, because it is the responsibility of the idle task to clean up\r
memory allocated by the kernel to any task that has since been deleted. */\r
\r
- #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY != 1\r
+ #if configCREATE_SIMPLE_BLINKY_DEMO_ONLY != 1\r
{\r
/* If the file system is only going to be accessed from one task then\r
F_FS_THREAD_AWARE can be set to 0 and the set of example files is created\r