summaryrefslogtreecommitdiff
path: root/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2013-05-13 10:51:31 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2013-05-13 10:51:31 +0000
commitb971f4c1d1ad1b420a95513a810191aaa23e7aad (patch)
treed64d25462d4c058cde6582141d138c9d0035f644 /FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole
parent43c26c8c88fb668af215c21791f4767b0f5c96fc (diff)
downloadfreertos-b971f4c1d1ad1b420a95513a810191aaa23e7aad.tar.gz
Move SmartFusion configuration options into FreeRTOSConfig.h.
git-svn-id: http://svn.code.sf.net/p/freertos/code/trunk@1896 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole')
-rw-r--r--FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c9
-rw-r--r--FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h14
-rw-r--r--FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c9
-rw-r--r--FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c7
-rw-r--r--FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/ParTest.c6
-rw-r--r--FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c22
6 files changed, 44 insertions, 23 deletions
diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c
index f399c9021..d155146aa 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c
@@ -75,9 +75,10 @@
/******************************************************************************
* NOTE 1: This project provides two demo applications. A simple blinky style
* project, and a more comprehensive test and demo application. The
- * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select
- * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
- * in main.c. This file implements the simply blinky style version.
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in FreeRTOSConifg.h is used to
+ * select between the two. See the notes on using
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY in main.c. This file implements the
+ * simply blinky style version.
*
* NOTE 2: This file only contains the source code that is specific to the
* basic demo. Generic functions, such FreeRTOS hook functions, and functions
@@ -148,7 +149,7 @@ static void prvQueueSendTask( void *pvParameters );
/*
* Called by main() to create the simply blinky style application if
- * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
*/
void main_blinky( void );
diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h
index 53c13135f..64d4d9ee5 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h
@@ -83,6 +83,20 @@
*/
//#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
+/*
+ * Set configCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
+ * or 0 to run the more comprehensive test and demo application.
+ */
+#define configCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
+
+/*
+ * Set configBUILD_FOR_DEVELOPMENT_KIT to 1 to run the demo on the SmartFusion2
+ * development kit, or 0 to run the demo on the SmartFusion2 starter kit. Refer
+ * to the documentation page for this demo on the FreeRTOS.org website for
+ * instruction on switching between the two hardware platforms.
+ */
+#define configBUILD_FOR_DEVELOPMENT_KIT 0
+
/*-----------------------------------------------------------
* Application specific definitions.
*
diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c
index 7115e6ff4..19d758c1f 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c
@@ -106,8 +106,13 @@ static const uint8_t * const pcEndOfOutputMessage = ( uint8_t * ) "\r\n[Press EN
static const uint8_t * const pcNewLine = ( uint8_t * ) "\r\n";
/* The UART used by the CLI. */
-static const mss_uart_instance_t * const pxUART = &g_mss_uart0;
-static const IRQn_Type xUART_IRQ = UART0_IRQn;
+#if configBUILD_FOR_DEVELOPMENT_KIT == 1
+ static const mss_uart_instance_t * const pxUART = &g_mss_uart1;
+ static const IRQn_Type xUART_IRQ = UART1_IRQn;
+#else
+ static const mss_uart_instance_t * const pxUART = &g_mss_uart0;
+ static const IRQn_Type xUART_IRQ = UART0_IRQn;
+#endif
/* Because characters are received slowly (at the speed somebody can type) then
it is ok to pass received characters from the Rx interrupt to the task on a
diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c
index 16f4eadcc..61cacb91c 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c
@@ -75,9 +75,10 @@
/******************************************************************************
* NOTE 1: This project provides two demo applications. A simple blinky style
* project, and a more comprehensive test and demo application. The
- * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select
- * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
- * in main.c. This file implements the comprehensive test and demo version.
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in FreeRTOSConifg.h is used to
+ * select between the two. See the notes on using
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY in mainc. This file implements the
+ * comprehensive test and demo version.
*
* NOTE 2: This file only contains the source code that is specific to the
* full demo. Generic functions, such FreeRTOS hook functions, and functions
diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/ParTest.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/ParTest.c
index 9119fe591..1c458302e 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/ParTest.c
@@ -94,7 +94,11 @@
/* Remember the state of the outputs for easy toggling. */
static unsigned char ucPortState = 0;
-static const mss_gpio_id_t ucLEDs[ partstNUM_LEDS ] = { MSS_GPIO_0, MSS_GPIO_1 };
+#if configBUILD_FOR_DEVELOPMENT_KIT == 1
+ static const mss_gpio_id_t ucLEDs[ partstNUM_LEDS ] = { MSS_GPIO_14, MSS_GPIO_15 };
+#else
+ static const mss_gpio_id_t ucLEDs[ partstNUM_LEDS ] = { MSS_GPIO_0, MSS_GPIO_1 };
+#endif
/*-----------------------------------------------------------*/
diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c
index e96a299f3..4b37eb57d 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c
@@ -75,10 +75,10 @@
/******************************************************************************
* This project provides two demo applications. A simple blinky style project,
* and a more comprehensive test and demo application. The
- * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to
- * select between the two. The simply blinky demo is implemented and described
- * in main_blinky.c. The more comprehensive test and demo application is
- * implemented and described in main_full.c.
+ * configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in FreeRTOSConfig.h) is
+ * used to select between the two. The simply blinky demo is implemented and
+ * described in main_blinky.c. The more comprehensive test and demo application
+ * is implemented and described in main_full.c.
*
* This file implements the code that is not demo specific, including the
* hardware setup and FreeRTOS hook functions.
@@ -96,18 +96,14 @@
function. */
#include "partest.h"
-/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
-or 0 to run the more comprehensive test and demo application. */
-#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
-
/*
* Set up the hardware ready to run this demo.
*/
static void prvSetupHardware( void );
/*
- * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
- * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
+ * main_blinky() is used when configCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
+ * main_full() is used when configCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
*/
extern void main_blinky( void );
extern void main_full( void );
@@ -128,9 +124,9 @@ int main( void )
/* Prepare the hardware to run this demo. */
prvSetupHardware();
- /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
+ /* The configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
of this file. */
- #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1
+ #if configCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1
{
main_blinky();
}
@@ -182,7 +178,7 @@ void vApplicationIdleHook( void )
function, because it is the responsibility of the idle task to clean up
memory allocated by the kernel to any task that has since been deleted. */
- #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY != 1
+ #if configCREATE_SIMPLE_BLINKY_DEMO_ONLY != 1
{
/* If the file system is only going to be accessed from one task then
F_FS_THREAD_AWARE can be set to 0 and the set of example files is created