From: rtel Date: Fri, 8 Feb 2019 01:18:08 +0000 (+0000) Subject: Ensure eTaskGetState() is brought in automatically if INCLUDE_xTaskAbortDelay is... X-Git-Tag: V10.2.0~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a86530bda161a79deddeb7fa9b08be47a09f1ff;p=freertos Ensure eTaskGetState() is brought in automatically if INCLUDE_xTaskAbortDelay is set to 1, as it is a dependency of eTaskGetState(). Added the portTASK_FUNCTION_PROTO macros around the timer task, as the macros are already used by the idle task. Add a PDF of the RISC-V documentation into the repo as the web page is not yet live. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2626 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.settings/language.settings.xml b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.settings/language.settings.xml index 8ae7de984..7c565872e 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.settings/language.settings.xml +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/.settings/language.settings.xml b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/.settings/language.settings.xml index de3b5289a..ea282ff86 100644 --- a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/.settings/language.settings.xml +++ b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + diff --git a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/blinky_demo/main_blinky.c b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/blinky_demo/main_blinky.c index 7688ed8c7..2c49c05db 100644 --- a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/blinky_demo/main_blinky.c +++ b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/blinky_demo/main_blinky.c @@ -121,7 +121,7 @@ void main_blinky( void ) file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ - configMINIMAL_STACK_SIZE * 2U, /* The size of the stack to allocate to the task. */ + configMINIMAL_STACK_SIZE * 2U, /* The size of the stack to allocate to the task. */ NULL, /* The parameter passed to the task - not used in this case. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ diff --git a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/main_full.c b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/main_full.c index cb6ebb1ca..9e68df4f2 100644 --- a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/main_full.c +++ b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/main_full.c @@ -150,13 +150,6 @@ void vFullDemoTickHook( void ); /*-----------------------------------------------------------*/ -/* Timers used to exercise external interrupt processing. */ -//static timer_instance_t g_timer0, g_timer1; - -/* Variables incremented by the peripheral timers used to exercise external -interrupts. */ -volatile uint32_t ulTimer0Interrupts = 0, ulTimer1Interrupts = 0; - /* The following two variables are used to communicate the status of the register check tasks to the check task. If the variables keep incrementing, then the register check tasks have not discovered any errors. If a variable @@ -224,7 +217,6 @@ static void prvCheckTask( void *pvParameters ) TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD; TickType_t xLastExecutionTime; uint32_t ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; -uint32_t ulLastTimer0Interrupts = 0, ulLastTimer1Interrupts = 0; char * const pcPassMessage = "."; char * pcStatusMessage = pcPassMessage; extern void vSendString( const char * const pcString ); @@ -259,17 +251,17 @@ extern void vToggleLED( void ); pcStatusMessage = "ERROR: Dynamic priority demo/tests.\r\n"; } - if ( xAreBlockTimeTestTasksStillRunning() == pdFALSE ) + if( xAreBlockTimeTestTasksStillRunning() == pdFALSE ) { pcStatusMessage = "ERROR: Block time demo/tests.\r\n"; } - if ( xAreGenericQueueTasksStillRunning() == pdFALSE ) + if( xAreGenericQueueTasksStillRunning() == pdFALSE ) { pcStatusMessage = "ERROR: Generic queue demo/tests.\r\n"; } - if ( xAreRecursiveMutexTasksStillRunning() == pdFALSE ) + if( xAreRecursiveMutexTasksStillRunning() == pdFALSE ) { pcStatusMessage = "ERROR: Recursive mutex demo/tests.\r\n"; } @@ -333,19 +325,6 @@ extern void vToggleLED( void ); } ulLastRegTest2Value = ulRegTest2LoopCounter; - /* Check interrupts from the peripheral timers are being handled. */ - if( ulLastTimer0Interrupts == ulTimer0Interrupts ) - { -// pcStatusMessage = "ERROR: Peripheral timer 0.\r\n"; - } - ulLastTimer0Interrupts = ulTimer0Interrupts; - - if( ulLastTimer1Interrupts == ulTimer1Interrupts ) - { -// pcStatusMessage = "ERROR: Peripheral timer 1.\r\n"; - } - ulLastTimer1Interrupts = ulTimer1Interrupts; - /* Write the status message to the UART. */ vToggleLED(); vSendString( pcStatusMessage ); @@ -426,17 +405,3 @@ static void prvSetupPeripheralTimers( void ) } /*-----------------------------------------------------------*/ -/*Core Timer 0 Interrupt Handler*/ -uint8_t External_30_IRQHandler( void ) -{ - ulTimer0Interrupts++; - return 0; -} -/*-----------------------------------------------------------*/ - -/*Core Timer 1 Interrupt Handler*/ -uint8_t External_31_IRQHandler( void ) -{ - ulTimer1Interrupts++; - return 0; -} diff --git a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/.settings/language.settings.xml b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/.settings/language.settings.xml index eb590e9ea..7f0bcb6f7 100644 --- a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/.settings/language.settings.xml +++ b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/.settings/language.settings.xml @@ -11,7 +11,7 @@ - + diff --git a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/main_full.c b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/main_full.c index dc7d76863..b9b9df43c 100644 --- a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/main_full.c +++ b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/main_full.c @@ -261,17 +261,17 @@ extern void vToggleLED( void ); pcStatusMessage = "ERROR: Dynamic priority demo/tests.\r\n"; } - if ( xAreBlockTimeTestTasksStillRunning() == pdFALSE ) + if( xAreBlockTimeTestTasksStillRunning() == pdFALSE ) { pcStatusMessage = "ERROR: Block time demo/tests.\r\n"; } - if ( xAreGenericQueueTasksStillRunning() == pdFALSE ) + if( xAreGenericQueueTasksStillRunning() == pdFALSE ) { pcStatusMessage = "ERROR: Generic queue demo/tests.\r\n"; } - if ( xAreRecursiveMutexTasksStillRunning() == pdFALSE ) + if( xAreRecursiveMutexTasksStillRunning() == pdFALSE ) { pcStatusMessage = "ERROR: Recursive mutex demo/tests.\r\n"; } diff --git a/FreeRTOS/Source/portable/GCC/RISC-V-RV32/FreeRTOS for RISC-V RV32.pdf b/FreeRTOS/Source/portable/GCC/RISC-V-RV32/FreeRTOS for RISC-V RV32.pdf new file mode 100644 index 000000000..7576907f2 Binary files /dev/null and b/FreeRTOS/Source/portable/GCC/RISC-V-RV32/FreeRTOS for RISC-V RV32.pdf differ diff --git a/FreeRTOS/Source/portable/GCC/RISC-V-RV32/port.c b/FreeRTOS/Source/portable/GCC/RISC-V-RV32/port.c index 8793ee6fc..8e32f81be 100644 --- a/FreeRTOS/Source/portable/GCC/RISC-V-RV32/port.c +++ b/FreeRTOS/Source/portable/GCC/RISC-V-RV32/port.c @@ -35,7 +35,7 @@ #include "portmacro.h" #ifndef configCLINT_BASE_ADDRESS - #warning configCLINT_BASE_ADDRESS must be defined in FreeRTOSConfig.h. If the target chip includes a Core Local Interrupter (CLINT) then set configCLINT_BASE_ADDRESS to the CLINT's base address. Otherwise set configCLINT_BASE_ADDRESS to 0. + #warning configCLINT_BASE_ADDRESS must be defined in FreeRTOSConfig.h. If the target chip includes a Core Local Interrupter (CLINT) then set configCLINT_BASE_ADDRESS to the CLINT base address. Otherwise set configCLINT_BASE_ADDRESS to 0. #endif /* Let the user override the pre-loading of the initial LR with the address of diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c index c8c5ef389..2842d9e7b 100644 --- a/FreeRTOS/Source/tasks.c +++ b/FreeRTOS/Source/tasks.c @@ -1352,7 +1352,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB ) #endif /* INCLUDE_vTaskDelay */ /*-----------------------------------------------------------*/ -#if( ( INCLUDE_eTaskGetState == 1 ) || ( configUSE_TRACE_FACILITY == 1 ) ) +#if( ( INCLUDE_eTaskGetState == 1 ) || ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_xTaskAbortDelay == 1 ) ) eTaskState eTaskGetState( TaskHandle_t xTask ) { diff --git a/FreeRTOS/Source/timers.c b/FreeRTOS/Source/timers.c index 837fe3d14..3c0b46267 100644 --- a/FreeRTOS/Source/timers.c +++ b/FreeRTOS/Source/timers.c @@ -166,7 +166,7 @@ static void prvCheckForValidListAndQueue( void ) PRIVILEGED_FUNCTION; * task. Other tasks communicate with the timer service task using the * xTimerQueue queue. */ -static void prvTimerTask( void *pvParameters ) PRIVILEGED_FUNCTION; +static portTASK_FUNCTION_PROTO( prvTimerTask, pvParameters ) PRIVILEGED_FUNCTION; /* * Called by the timer service task to interpret and process a command it @@ -520,7 +520,7 @@ Timer_t * const pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTi } /*-----------------------------------------------------------*/ -static void prvTimerTask( void *pvParameters ) +static portTASK_FUNCTION( prvTimerTask, pvParameters ) { TickType_t xNextExpireTime; BaseType_t xListWasEmpty;