mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Move SmartFusion configuration options into FreeRTOSConfig.h.
This commit is contained in:
parent
5c5c1c406d
commit
94f178c8d1
|
@ -75,9 +75,10 @@
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* NOTE 1: This project provides two demo applications. A simple blinky style
|
* NOTE 1: This project provides two demo applications. A simple blinky style
|
||||||
* project, and a more comprehensive test and demo application. The
|
* project, and a more comprehensive test and demo application. The
|
||||||
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select
|
* configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in FreeRTOSConifg.h is used to
|
||||||
* between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
|
* select between the two. See the notes on using
|
||||||
* in main.c. This file implements the simply blinky style version.
|
* 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
|
* NOTE 2: This file only contains the source code that is specific to the
|
||||||
* basic demo. Generic functions, such FreeRTOS hook functions, and functions
|
* 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
|
* 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 );
|
void main_blinky( void );
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,20 @@
|
||||||
*/
|
*/
|
||||||
//#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
|
//#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.
|
* Application specific definitions.
|
||||||
*
|
*
|
||||||
|
|
|
@ -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";
|
static const uint8_t * const pcNewLine = ( uint8_t * ) "\r\n";
|
||||||
|
|
||||||
/* The UART used by the CLI. */
|
/* The UART used by the CLI. */
|
||||||
|
#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 mss_uart_instance_t * const pxUART = &g_mss_uart0;
|
||||||
static const IRQn_Type xUART_IRQ = UART0_IRQn;
|
static const IRQn_Type xUART_IRQ = UART0_IRQn;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Because characters are received slowly (at the speed somebody can type) then
|
/* 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
|
it is ok to pass received characters from the Rx interrupt to the task on a
|
||||||
|
|
|
@ -75,9 +75,10 @@
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* NOTE 1: This project provides two demo applications. A simple blinky style
|
* NOTE 1: This project provides two demo applications. A simple blinky style
|
||||||
* project, and a more comprehensive test and demo application. The
|
* project, and a more comprehensive test and demo application. The
|
||||||
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select
|
* configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in FreeRTOSConifg.h is used to
|
||||||
* between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
|
* select between the two. See the notes on using
|
||||||
* in main.c. This file implements the comprehensive test and demo version.
|
* 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
|
* NOTE 2: This file only contains the source code that is specific to the
|
||||||
* full demo. Generic functions, such FreeRTOS hook functions, and functions
|
* full demo. Generic functions, such FreeRTOS hook functions, and functions
|
||||||
|
|
|
@ -94,7 +94,11 @@
|
||||||
/* Remember the state of the outputs for easy toggling. */
|
/* Remember the state of the outputs for easy toggling. */
|
||||||
static unsigned char ucPortState = 0;
|
static unsigned char ucPortState = 0;
|
||||||
|
|
||||||
|
#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 };
|
static const mss_gpio_id_t ucLEDs[ partstNUM_LEDS ] = { MSS_GPIO_0, MSS_GPIO_1 };
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -75,10 +75,10 @@
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* This project provides two demo applications. A simple blinky style project,
|
* This project provides two demo applications. A simple blinky style project,
|
||||||
* and a more comprehensive test and demo application. The
|
* and a more comprehensive test and demo application. The
|
||||||
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to
|
* configCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in FreeRTOSConfig.h) is
|
||||||
* select between the two. The simply blinky demo is implemented and described
|
* used to select between the two. The simply blinky demo is implemented and
|
||||||
* in main_blinky.c. The more comprehensive test and demo application is
|
* described in main_blinky.c. The more comprehensive test and demo application
|
||||||
* implemented and described in main_full.c.
|
* is implemented and described in main_full.c.
|
||||||
*
|
*
|
||||||
* This file implements the code that is not demo specific, including the
|
* This file implements the code that is not demo specific, including the
|
||||||
* hardware setup and FreeRTOS hook functions.
|
* hardware setup and FreeRTOS hook functions.
|
||||||
|
@ -96,18 +96,14 @@
|
||||||
function. */
|
function. */
|
||||||
#include "partest.h"
|
#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.
|
* Set up the hardware ready to run this demo.
|
||||||
*/
|
*/
|
||||||
static void prvSetupHardware( void );
|
static void prvSetupHardware( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
|
* main_blinky() is used when configCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
|
||||||
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
|
* main_full() is used when configCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
|
||||||
*/
|
*/
|
||||||
extern void main_blinky( void );
|
extern void main_blinky( void );
|
||||||
extern void main_full( void );
|
extern void main_full( void );
|
||||||
|
@ -128,9 +124,9 @@ int main( void )
|
||||||
/* Prepare the hardware to run this demo. */
|
/* Prepare the hardware to run this demo. */
|
||||||
prvSetupHardware();
|
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. */
|
of this file. */
|
||||||
#if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1
|
#if configCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1
|
||||||
{
|
{
|
||||||
main_blinky();
|
main_blinky();
|
||||||
}
|
}
|
||||||
|
@ -182,7 +178,7 @@ void vApplicationIdleHook( void )
|
||||||
function, because it is the responsibility of the idle task to clean up
|
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. */
|
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
|
/* 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
|
F_FS_THREAD_AWARE can be set to 0 and the set of example files is created
|
||||||
|
|
Loading…
Reference in a new issue