From 5d4653befc8b26bbf04f69558cee8f4fcb0c7035 Mon Sep 17 00:00:00 2001 From: rtel Date: Thu, 9 Oct 2014 15:42:43 +0000 Subject: [PATCH] Demo projects only: + Remove some #warnings messages from the Cycle 5 - which were left in the code as reminders of tests that were not yet completed but are now. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2312 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../Demo/CORTEX_A9_Cyclone_V_SoC_DK/.cproject | 18 ++++-------- .../Demo/CORTEX_A9_Cyclone_V_SoC_DK/.project | 29 +++++++++++++++++-- .../Altera_Code/SoCSupport/uart0_support.c | 2 +- .../FreeRTOSConfig.h | 11 +++++++ .../Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c | 21 ++++++++++---- 5 files changed, 59 insertions(+), 22 deletions(-) diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/.cproject b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/.cproject index 72d6f0a04..5aee497bd 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/.cproject +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/.cproject @@ -69,18 +69,6 @@ - - - - @@ -99,5 +87,9 @@ - + + + + + diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/.project b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/.project index b15285eb0..0efd9f6da 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/.project +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/.project @@ -40,10 +40,15 @@ FREERTOS_ROOT/FreeRTOS/Demo/Common - FreeRTOS+CLI/Examples + FreeRTOS+CLI/CLI_Examples 2 FREERTOS_ROOT/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos + + FreeRTOS+CLI/Examples + 2 + C:/E/Dev/FreeRTOS/WorkingCopy/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos + @@ -65,7 +70,25 @@ - 1412167807232 + 1412856477507 + FreeRTOS+CLI/CLI_Examples + 5 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-Sample-CLI-commands.c + + + + 1412856477537 + FreeRTOS+CLI/CLI_Examples + 5 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-UARTCommandConsole.c + + + + 1412859886777 FreeRTOS+CLI/Examples 5 @@ -74,7 +97,7 @@ - 1412167807242 + 1412859886785 FreeRTOS+CLI/Examples 5 diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/Altera_Code/SoCSupport/uart0_support.c b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/Altera_Code/SoCSupport/uart0_support.c index 356a3e1a9..855f4ba1a 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/Altera_Code/SoCSupport/uart0_support.c +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/Altera_Code/SoCSupport/uart0_support.c @@ -56,7 +56,7 @@ ALT_STATUS_CODE uart0_init(void) { ALT_STATUS_CODE uart0_uninit(void) { - ALT_STATUS_CODE status; + ALT_STATUS_CODE status = 0; status += alt_16550_disable(&g_uart0_handle); diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/FreeRTOSConfig.h index 5f5d9d57e..cfa2a3fd9 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/FreeRTOSConfig.h @@ -109,6 +109,17 @@ */ #define configMAX_API_CALL_INTERRUPT_PRIORITY 18 +/* The application will define the array used as the RTOS heap to ensure it can +be located in the (faster) on-chip RAM. Whe this parameter is set to 1 the +application must define an array using the name and size as follows below, but +is free to locate the array in any suitable RAM region (the faster the better as +the stacks used by the tasks are allocated from this array): + +uint8_t ucHeap[ configTOTAL_HEAP_SIZE ]; + +*/ +#define configAPPLICATION_ALLOCATED_HEAP 1 + #define configCPU_CLOCK_HZ /* Not used in this portabsciex.com. */ #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 #define configUSE_TICKLESS_IDLE 0 diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c index 27580cdb1..5847350b9 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c @@ -114,7 +114,7 @@ * When mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0 the comprehensive test * and demo application will be run. */ -#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0 +#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1 /*-----------------------------------------------------------*/ @@ -142,6 +142,21 @@ void vApplicationTickHook( void ); /*-----------------------------------------------------------*/ +/* configAPPLICATION_ALLOCATED_HEAP is set to 1 in FreeRTOSConfig.h so the +application can define the array used as the FreeRTOS heap. This is done so the +heap can be forced into fast internal RAM - useful because the stacks used by +the tasks come from this space. */ +uint8_t ucHeap[ configTOTAL_HEAP_SIZE ] __attribute__ ( ( section( ".oc_ram" ) ) ); + +/* FreeRTOS uses its own interrupt handler code. This code cannot use the array +of handlers defined by the Altera drivers because the array is declared static, +and so not accessible outside of the dirver's source file. Instead declare an +array for use by the FreeRTOS handler. See: +http://www.freertos.org/Using-FreeRTOS-on-Cortex-A-Embedded-Processors.html. */ +static INT_DISPATCH_t xISRHandlers[ ALT_INT_PROVISION_INT_COUNT ]; + +/*-----------------------------------------------------------*/ + int main( void ) { /* Configure the hardware ready to run the demo. */ @@ -305,7 +320,6 @@ void FreeRTOS_Tick_Handler( void ); vRegisterIRQHandler( ALT_INT_INTERRUPT_PPI_TIMER_PRIVATE, ( alt_int_callback_t ) FreeRTOS_Tick_Handler, NULL ); /* This tick interrupt must run at the lowest priority. */ -#warning Is this the correct way of specifying the priority value? alt_int_dist_priority_set( ALT_INT_INTERRUPT_PPI_TIMER_PRIVATE, portLOWEST_USABLE_INTERRUPT_PRIORITY << portPRIORITY_SHIFT ); /* Ensure the interrupt is forwarded to the CPU. */ @@ -318,9 +332,6 @@ void FreeRTOS_Tick_Handler( void ); } /*-----------------------------------------------------------*/ -#warning A separate array of handlers is maintained as the drivers array is static so cannot be reached and the handler is incompatible. -static INT_DISPATCH_t xISRHandlers[ ALT_INT_PROVISION_INT_COUNT ]; - void vRegisterIRQHandler( uint32_t ulID, alt_int_callback_t pxHandlerFunction, void *pvContext ) { if( ulID < ALT_INT_PROVISION_INT_COUNT ) -- 2.39.2