From: rtel Date: Wed, 4 Sep 2019 00:13:17 +0000 (+0000) Subject: Minor bug fix in NTPDemo.c -> use of FREERTOS_INVALID_SOCKET in place of NULL. X-Git-Tag: V10.3.0~104 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=704f0f76a7645c232157e1dbf6ed0a062f990954;p=freertos Minor bug fix in NTPDemo.c -> use of FREERTOS_INVALID_SOCKET in place of NULL. Update trace recorder code to account for uxPendedTicks renaming to xPendedTicks. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2719 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/NTP/NTPDemo.c b/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/NTP/NTPDemo.c index 7795c41da..20c0e9b8f 100644 --- a/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/NTP/NTPDemo.c +++ b/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/NTP/NTPDemo.c @@ -135,7 +135,7 @@ void vStartNTPTask( uint16_t usTaskStackSize, UBaseType_t uxTaskPriority ) else { xUDPSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); - if( xUDPSocket != NULL ) + if( xUDPSocket != FREERTOS_INVALID_SOCKET ) { struct freertos_sockaddr xAddress; #if( ipconfigUSE_CALLBACKS != 0 ) diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WIN32.vcxproj b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WIN32.vcxproj index a550436f7..4fafe8f50 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WIN32.vcxproj +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WIN32.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -13,19 +13,20 @@ {C686325E-3261-42F7-AEB1-DDE5280E1CEB} RTOSDemo + 10.0 Application false MultiByte - v140 + v142 Application false MultiByte - v140 + v142 diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c index f5ae5eb41..beae122f0 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c @@ -88,7 +88,7 @@ connections on the standard echo port (port 7), then echos back any data received on that connection. */ #define mainCREATE_SIMPLE_UDP_CLIENT_SERVER_TASKS 1 -#define mainCREATE_TCP_ECHO_TASKS_SINGLE 1 +#define mainCREATE_TCP_ECHO_TASKS_SINGLE 0 #define mainCREATE_TCP_ECHO_SERVER_TASK 0 /*-----------------------------------------------------------*/ @@ -292,7 +292,7 @@ const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL; static void prvSRand( UBaseType_t ulSeed ) { /* Utility function to seed the pseudo random number generator. */ - ulNextRand = ulSeed; + ulNextRand = ulSeed; } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h index a7ba816bd..2cfcbbfd5 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h @@ -3,7 +3,7 @@ * Percepio AB, www.percepio.com * * Terms of Use - * This file is part of the trace recorder library (RECORDER), which is the + * This file is part of the trace recorder library (RECORDER), which is the * intellectual property of Percepio AB (PERCEPIO) and provided under a * license as follows. * The RECORDER may be used free of charge for the purpose of recording data @@ -12,14 +12,14 @@ * You may distribute the RECORDER in its original source code form, assuming * this text (terms of use, disclaimer, copyright notice) is unchanged. You are * allowed to distribute the RECORDER with minor modifications intended for - * configuration or porting of the RECORDER, e.g., to allow using it on a + * configuration or porting of the RECORDER, e.g., to allow using it on a * specific processor, processor family or with a specific communication * interface. Any such modifications should be documented directly below - * this comment block. + * this comment block. * * Disclaimer * The RECORDER is being delivered to you AS IS and PERCEPIO makes no warranty - * as to its use or performance. PERCEPIO does not and cannot warrant the + * as to its use or performance. PERCEPIO does not and cannot warrant the * performance or results you may obtain by using the RECORDER or documentation. * PERCEPIO make no warranties, express or implied, as to noninfringement of * third party rights, merchantability, or fitness for any particular purpose. @@ -60,15 +60,15 @@ extern "C" { #define TRC_FREERTOS_VERSION_7_4 2 #define TRC_FREERTOS_VERSION_7_5_OR_7_6 3 #define TRC_FREERTOS_VERSION_8_X 4 /* Any v8.x.x*/ -#define TRC_FREERTOS_VERSION_9_0_0 5 -#define TRC_FREERTOS_VERSION_9_0_1 6 +#define TRC_FREERTOS_VERSION_9_0_0 5 +#define TRC_FREERTOS_VERSION_9_0_1 6 #define TRC_FREERTOS_VERSION_9_0_2 7 #define TRC_FREERTOS_VERSION_10_0_0 8 /* If using FreeRTOS v10.0.0 or later version */ #define TRC_FREERTOS_VERSION_9_X 42 /* Not allowed anymore */ #if (TRC_CFG_FREERTOS_VERSION == TRC_FREERTOS_VERSION_9_X) -/* This setting for TRC_CFG_FREERTOS_VERSION is no longer allowed as v9.0.1 needs special handling. */ +/* This setting for TRC_CFG_FREERTOS_VERSION is no longer allowed as v9.0.1 needs special handling. */ #error "Please specify your exact FreeRTOS version in trcConfig.h, from the options listed above." #endif @@ -78,10 +78,10 @@ extern "C" { #define prvGetStreamBufferType(x) 0 #endif -/* Added mainly for our internal testing. This makes it easier to create test applications that +/* Added mainly for our internal testing. This makes it easier to create test applications that runs on multiple FreeRTOS versions. */ #if (TRC_CFG_FREERTOS_VERSION < TRC_FREERTOS_VERSION_8_X) - /* FreeRTOS v7.0 and later */ + /* FreeRTOS v7.0 and later */ #define STRING_CAST(x) ( (signed char*) x ) #define TickType portTickType #else @@ -183,8 +183,8 @@ void vTraceSetMessageBufferName(void* object, const char* name); #endif /* (TRC_CFG_SCHEDULING_ONLY == 0) */ /******************************************************************************* - * Note: Setting names for event groups is difficult to support, this has been - * excluded intentionally. This since we don't know if event_groups.c is + * Note: Setting names for event groups is difficult to support, this has been + * excluded intentionally. This since we don't know if event_groups.c is * included in the build, so referencing it from the recorder may cause errors. ******************************************************************************/ @@ -211,7 +211,7 @@ unsigned char prvTraceIsSchedulerSuspended(void); #define TRACE_GET_OS_TICKS() (uiTraceTickCount) /* Streaming only */ /* If using dynamic allocation of snapshot trace buffer... */ -#define TRACE_MALLOC(size) pvPortMalloc(size) +#define TRACE_MALLOC(size) pvPortMalloc(size) #if defined(configUSE_TIMERS) #if (configUSE_TIMERS == 1) @@ -221,7 +221,7 @@ unsigned char prvTraceIsSchedulerSuspended(void); #endif /* configUSE_TIMERS */ /* For ARM Cortex-M devices - assumes the ARM CMSIS API is available */ -#if (defined (__CORTEX_M)) +#if (defined (__CORTEX_M)) #define TRACE_ALLOC_CRITICAL_SECTION() uint32_t __irq_status; #define TRACE_ENTER_CRITICAL_SECTION() {__irq_status = __get_PRIMASK(); __set_PRIMASK(1);} /* PRIMASK disables ALL interrupts - allows for tracing in any ISR */ #define TRACE_EXIT_CRITICAL_SECTION() {__set_PRIMASK(__irq_status);} @@ -242,11 +242,11 @@ unsigned char prvTraceIsSchedulerSuspended(void); #if (TRC_CFG_HARDWARE_PORT == TRC_HARDWARE_PORT_POWERPC_Z4) #if (TRC_CFG_FREERTOS_VERSION >= TRC_FREERTOS_VERSION_8_X) - /* FreeRTOS v8.0 or later */ + /* FreeRTOS v8.0 or later */ #define TRACE_ALLOC_CRITICAL_SECTION() UBaseType_t __irq_status; #define TRACE_ENTER_CRITICAL_SECTION() {__irq_status = portSET_INTERRUPT_MASK_FROM_ISR();} #define TRACE_EXIT_CRITICAL_SECTION() {portCLEAR_INTERRUPT_MASK_FROM_ISR(__irq_status);} -#else +#else /* FreeRTOS v7.x */ #define TRACE_ALLOC_CRITICAL_SECTION() unsigned portBASE_TYPE __irq_status; #define TRACE_ENTER_CRITICAL_SECTION() {__irq_status = portSET_INTERRUPT_MASK_FROM_ISR();} @@ -342,7 +342,7 @@ void prvTraceSetStreamBufferNumberHigh16(void* handle, uint16_t value); #else /* (TRC_CFG_FREERTOS_VERSION >= TRC_FREERTOS_VERSION_10_0_0) */ /* FreeRTOS versions before v10.0 does not support filtering for event groups */ #define TRACE_GET_EVENTGROUP_FILTER(pxObject) 1 -#define TRACE_SET_EVENTGROUP_FILTER(pxObject, group) +#define TRACE_SET_EVENTGROUP_FILTER(pxObject, group) #endif /* (TRC_CFG_FREERTOS_VERSION >= TRC_FREERTOS_VERSION_10_0_0) */ #if (TRC_CFG_FREERTOS_VERSION >= TRC_FREERTOS_VERSION_10_0_0) @@ -351,7 +351,7 @@ void prvTraceSetStreamBufferNumberHigh16(void* handle, uint16_t value); #else /* (TRC_CFG_FREERTOS_VERSION >= TRC_FREERTOS_VERSION_10_0_0) */ /* FreeRTOS versions before v10.0 does not support filtering for timers */ #define TRACE_GET_TIMER_FILTER(pxObject) 1 -#define TRACE_SET_TIMER_FILTER(pxObject, group) +#define TRACE_SET_TIMER_FILTER(pxObject, group) #endif /* (TRC_CFG_FREERTOS_VERSION >= TRC_FREERTOS_VERSION_10_0_0) */ #define TRACE_GET_STREAMBUFFER_FILTER(pxObject) prvTraceGetStreamBufferNumberHigh16((void*)pxObject) @@ -363,7 +363,7 @@ void prvTraceSetStreamBufferNumberHigh16(void* handle, uint16_t value); #define TRACE_SET_OBJECT_FILTER(CLASS, pxObject, group) TRACE_SET_##CLASS##_FILTER(pxObject, group) #else /* (TRC_CFG_FREERTOS_VERSION >= TRC_FREERTOS_VERSION_7_4) */ #define TRACE_GET_OBJECT_FILTER(CLASS, pxObject) 1 -#define TRACE_SET_OBJECT_FILTER(CLASS, pxObject, group) +#define TRACE_SET_OBJECT_FILTER(CLASS, pxObject, group) #endif /* (TRC_CFG_FREERTOS_VERSION >= TRC_FREERTOS_VERSION_7_4) */ /******************************************************************************/ @@ -451,7 +451,7 @@ void* prvTraceGetCurrentTaskHandle(void); * TraceQueueClassTable * Translates a FreeRTOS QueueType into trace objects classes (TRACE_CLASS_). * Has one entry for each QueueType, gives TRACE_CLASS ID. - ******************************************************************************/ + ******************************************************************************/ extern traceObjectClass TraceQueueClassTable[5]; @@ -824,11 +824,11 @@ extern traceObjectClass TraceQueueClassTable[5]; #define TRACE_GET_TASK_PRIORITY(pxTCB) ((uint8_t)pxTCB->uxPriority) #define TRACE_GET_TASK_NAME(pxTCB) ((char*)pxTCB->pcTaskName) -/*** The trace macros for snapshot mode **************************************/ +/*** The trace macros for snapshot mode **************************************/ /* A macro that will update the tick count when returning from tickless idle */ #undef traceINCREASE_TICK_COUNT -#define traceINCREASE_TICK_COUNT( xCount ) +#define traceINCREASE_TICK_COUNT( xCount ) /* Called for each task that becomes ready */ #undef traceMOVED_TASK_TO_READY_STATE @@ -847,7 +847,7 @@ extern traceObjectClass TraceQueueClassTable[5]; #else #define traceTASK_INCREMENT_TICK( xTickCount ) \ - if (uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdTRUE || uxPendedTicks == 0) { trcKERNEL_HOOKS_INCREMENT_TICK(); } \ + if (uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdTRUE || xPendedTicks == 0) { trcKERNEL_HOOKS_INCREMENT_TICK(); } \ if (uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdFALSE) { trcKERNEL_HOOKS_NEW_TIME(DIV_NEW_TIME, xTickCount + 1); } #endif @@ -955,7 +955,7 @@ extern traceObjectClass TraceQueueClassTable[5]; #undef traceCREATE_MUTEX #define traceCREATE_MUTEX( pxNewQueue ) \ trcKERNEL_HOOKS_OBJECT_CREATE(TRACE_GET_OBJECT_EVENT_CODE(CREATE_OBJ, TRCSUCCESS, QUEUE, pxNewQueue), QUEUE, pxNewQueue); - + /* Called in xQueueCreateMutex when the operation fails (when memory allocation fails) */ #undef traceCREATE_MUTEX_FAILED #define traceCREATE_MUTEX_FAILED() \ @@ -1302,7 +1302,7 @@ extern void vTraceStoreMemMangEvent(uint32_t ecode, uint32_t address, int32_t si #define traceTASK_NOTIFY_FROM_ISR() \ if (TRACE_GET_OBJECT_FILTER(TASK, xTaskToNotify) & CurrentFilterMask) \ prvTraceStoreKernelCall(TRACE_TASK_NOTIFY_FROM_ISR, TRACE_CLASS_TASK, TRACE_GET_TASK_NUMBER(xTaskToNotify)); - + #undef traceTASK_NOTIFY_GIVE_FROM_ISR #define traceTASK_NOTIFY_GIVE_FROM_ISR() \ if (TRACE_GET_OBJECT_FILTER(TASK, xTaskToNotify) & CurrentFilterMask) \ @@ -1317,7 +1317,7 @@ extern void vTraceStoreMemMangEvent(uint32_t ecode, uint32_t address, int32_t si #undef traceSTREAM_BUFFER_CREATE_FAILED #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ) \ trcKERNEL_HOOKS_KERNEL_SERVICE_WITH_NUMERIC_PARAM_ONLY(TRACE_GET_CLASS_EVENT_CODE(CREATE_OBJ, TRCFAILED, STREAMBUFFER, xIsMessageBuffer), 0); - + #undef traceSTREAM_BUFFER_CREATE_STATIC_FAILED #define traceSTREAM_BUFFER_CREATE_STATIC_FAILED( xReturn, xIsMessageBuffer ) \ traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ) @@ -1335,7 +1335,7 @@ extern void vTraceStoreMemMangEvent(uint32_t ecode, uint32_t address, int32_t si #define traceSTREAM_BUFFER_SEND( xStreamBuffer, xReturn ) \ trcKERNEL_HOOKS_KERNEL_SERVICE(TRACE_GET_OBJECT_EVENT_CODE(SEND, TRCSUCCESS, STREAMBUFFER, xStreamBuffer), STREAMBUFFER, xStreamBuffer); \ trcKERNEL_HOOKS_SET_OBJECT_STATE(STREAMBUFFER, xStreamBuffer, prvBytesInBuffer(xStreamBuffer)); - + #undef traceBLOCKING_ON_STREAM_BUFFER_SEND #define traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer ) \ trcKERNEL_HOOKS_KERNEL_SERVICE(TRACE_GET_OBJECT_EVENT_CODE(SEND, TRCBLOCK, STREAMBUFFER, xStreamBuffer), STREAMBUFFER, xStreamBuffer); @@ -1397,8 +1397,8 @@ extern void vTraceStoreMemMangEvent(uint32_t ecode, uint32_t address, int32_t si * vTraceStoreKernelObjectName * * Set the name for a kernel object (defined by its address). -******************************************************************************/ -void vTraceStoreKernelObjectName(void* object, const char* name); +******************************************************************************/ +void vTraceStoreKernelObjectName(void* object, const char* name); /******************************************************************************* * prvIsNewTCB @@ -1521,7 +1521,7 @@ uint32_t prvIsNewTCB(void* pNewTCB); #define PSF_EVENT_MUTEX_PEEK 0x72 #define PSF_EVENT_QUEUE_PEEK_FAILED 0x73 -#define PSF_EVENT_SEMAPHORE_PEEK_FAILED 0x74 +#define PSF_EVENT_SEMAPHORE_PEEK_FAILED 0x74 #define PSF_EVENT_MUTEX_PEEK_FAILED 0x75 #define PSF_EVENT_QUEUE_PEEK_BLOCK 0x76 @@ -1625,7 +1625,7 @@ uint32_t prvIsNewTCB(void* pNewTCB); #if (TRC_CFG_INCLUDE_OSTICK_EVENTS == 1) #define OS_TICK_EVENT(uxSchedulerSuspended, xTickCount) if (uxSchedulerSuspended == (unsigned portBASE_TYPE) pdFALSE) { prvTraceStoreEvent1(PSF_EVENT_NEW_TIME, (uint32_t)(xTickCount + 1)); } #else -#define OS_TICK_EVENT(uxSchedulerSuspended, xTickCount) +#define OS_TICK_EVENT(uxSchedulerSuspended, xTickCount) #endif /* Called on each OS tick. Will call uiPortGetTimestamp to make sure it is called at least once every OS tick. */ @@ -2188,7 +2188,7 @@ BaseType_t MyWrapper(__a, __b, const BaseType_t xCopyPosition) if (TRACE_GET_OBJECT_FILTER(TASK, TRACE_GET_CURRENT_TASK()) & CurrentFilterMask) \ if (TRACE_GET_OBJECT_FILTER(TASK, pxTask) & CurrentFilterMask) \ prvTraceStoreEvent2(PSF_EVENT_TASK_PRIORITY, (uint32_t)pxTask, uxNewPriority); - + /* Called in vTaskPriorityInherit, which is called by Mutex operations */ #undef traceTASK_PRIORITY_INHERIT #define traceTASK_PRIORITY_INHERIT( pxTask, uxNewPriority ) \ @@ -2265,7 +2265,7 @@ BaseType_t MyWrapper(__a, __b, const BaseType_t xCopyPosition) prvTraceStoreEvent2((xReturn == pdPASS) ? PSF_EVENT_TIMER_CHANGEPERIOD_FROMISR : PSF_EVENT_TIMER_CHANGEPERIOD_FROMISR_FAILED, (uint32_t)tmr, xOptionalValue); \ break; #else /* TRC_CFG_FREERTOS_VERSION >= TRC_FREERTOS_VERSION_8_X */ -#define traceTIMER_COMMAND_SEND_8_0_CASES(tmr) +#define traceTIMER_COMMAND_SEND_8_0_CASES(tmr) #endif /* TRC_CFG_FREERTOS_VERSION >= TRC_FREERTOS_VERSION_8_X */ /* Note that xCommandID can never be tmrCOMMAND_EXECUTE_CALLBACK (-1) since the trace macro is not called in that case */ @@ -2434,7 +2434,7 @@ BaseType_t MyWrapper(__a, __b, const BaseType_t xCopyPosition) #define traceTASK_NOTIFY_FROM_ISR() \ if (TRACE_GET_OBJECT_FILTER(TASK, xTaskToNotify) & CurrentFilterMask) \ prvTraceStoreEvent1(PSF_EVENT_TASK_NOTIFY_FROM_ISR, (uint32_t)xTaskToNotify); - + #undef traceTASK_NOTIFY_GIVE_FROM_ISR #define traceTASK_NOTIFY_GIVE_FROM_ISR() \ if (TRACE_GET_OBJECT_FILTER(TASK, xTaskToNotify) & CurrentFilterMask) \ @@ -2547,7 +2547,7 @@ if (TRACE_GET_OBJECT_FILTER(STREAMBUFFER, xStreamBuffer) & CurrentFilterMask) \ #endif /* (TRC_CFG_RECORDER_MODE == TRC_RECORDER_MODE_STREAMING) */ #else /* (TRC_USE_TRACEALYZER_RECORDER == 1) */ - + /* When recorder is disabled */ #define vTraceSetQueueName(object, name) #define vTraceSetSemaphoreName(object, name) @@ -2555,7 +2555,7 @@ if (TRACE_GET_OBJECT_FILTER(STREAMBUFFER, xStreamBuffer) & CurrentFilterMask) \ #define vTraceSetEventGroupName(object, name) #define vTraceSetStreamBufferName(object, name) #define vTraceSetMessageBufferName(object, name) - + #endif /* (TRC_USE_TRACEALYZER_RECORDER == 1) */ #ifdef __cplusplus diff --git a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.uvoptx b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.uvoptx index 740ec3bbb..e07fcd2de 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.uvoptx +++ b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.uvoptx @@ -178,7 +178,7 @@ 0 1 - 0 + 1 0 0 0 diff --git a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.uvprojx b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.uvprojx index a1ef642bb..fcdc1f4a7 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.uvprojx +++ b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.uvprojx @@ -10,13 +10,13 @@ RTOSDemo 0x4 ARM-ADS - 5060528::V5.06 update 5 (build 528)::ARMCC + 5060750::V5.06 update 6 (build 750)::ARMCC 0 ARMCM4_FP ARM - ARM.CMSIS.5.0.1 + ARM.CMSIS.5.5.1 http://www.keil.com/pack/ IROM(0x00000000,0x80000) IRAM(0x20000000,0x20000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ESEL ELITTLE diff --git a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/FreeRTOSConfig.h b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/FreeRTOSConfig.h index 28859d5a7..3903ae515 100644 --- a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/FreeRTOSConfig.h @@ -86,6 +86,9 @@ *----------------------------------------------------------*/ #define configCLINT_BASE_ADDRESS 0 /* There is no CLINT so the base address must be set to 0. */ + + + #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_IAR/RTOSDemo.ewd b/FreeRTOS/Demo/RISC-V_RV32_SiFive_IAR/RTOSDemo.ewd new file mode 100644 index 000000000..12fddc009 --- /dev/null +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_IAR/RTOSDemo.ewd @@ -0,0 +1,632 @@ + + + 3 + + Debug + + RISCV + + 1 + + C-SPY + 1 + + 0 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IJETRISCV + 2 + + 0 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIMRISCV + 1 + + 0 + 1 + 1 + + + + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + RISCV + + 0 + + C-SPY + 1 + + 0 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IJETRISCV + 2 + + 0 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIMRISCV + 1 + + 0 + 1 + 0 + + + + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_IAR/RTOSDemo.ewt b/FreeRTOS/Demo/RISC-V_RV32_SiFive_IAR/RTOSDemo.ewt new file mode 100644 index 000000000..14b84f924 --- /dev/null +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_IAR/RTOSDemo.ewt @@ -0,0 +1,2279 @@ + + + 3 + + Debug + + RISCV + + 1 + + C-STAT + 261 + + 261 + + 0 + + 1 + 600 + 1 + 2 + 0 + 1 + 100 + + + 1.5.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Release + + RISCV + + 0 + + C-STAT + 261 + + 261 + + 0 + + 1 + 600 + 1 + 2 + 0 + 1 + 100 + + + 1.5.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + blinky_demo + + $PROJ_DIR$\main_blinky\main_blinky.c + + + + FreeRTOS_source + + include + + $PROJ_DIR$\..\..\Source\include\event_groups.h + + + $PROJ_DIR$\..\..\Source\include\message_buffer.h + + + $PROJ_DIR$\..\..\Source\include\queue.h + + + $PROJ_DIR$\..\..\Source\include\semphr.h + + + $PROJ_DIR$\..\..\Source\include\stream_buffer.h + + + $PROJ_DIR$\..\..\Source\include\task.h + + + $PROJ_DIR$\..\..\Source\include\timers.h + + + + portable + + memmang + + $PROJ_DIR$\..\..\Source\portable\MemMang\heap_4.c + + + + $PROJ_DIR$\..\..\Source\portable\IAR\RISC-V\port.c + + + $PROJ_DIR$\..\..\Source\portable\IAR\RISC-V\portASM.s + + + + $PROJ_DIR$\..\..\Source\event_groups.c + + + $PROJ_DIR$\..\..\Source\list.c + + + $PROJ_DIR$\..\..\Source\queue.c + + + $PROJ_DIR$\..\..\Source\stream_buffer.c + + + $PROJ_DIR$\..\..\Source\tasks.c + + + $PROJ_DIR$\..\..\Source\timers.c + + + + full_demo + + common + + $PROJ_DIR$\..\Common\Minimal\AbortDelay.c + + + $PROJ_DIR$\..\Common\Minimal\blocktim.c + + + $PROJ_DIR$\..\Common\Minimal\countsem.c + + + $PROJ_DIR$\..\Common\Minimal\death.c + + + $PROJ_DIR$\..\Common\Minimal\dynamic.c + + + $PROJ_DIR$\..\Common\Minimal\EventGroupsDemo.c + + + $PROJ_DIR$\..\Common\Minimal\GenQTest.c + + + $PROJ_DIR$\..\Common\Minimal\MessageBufferDemo.c + + + $PROJ_DIR$\..\Common\Minimal\recmutex.c + + + $PROJ_DIR$\..\Common\Minimal\StreamBufferDemo.c + + + $PROJ_DIR$\..\Common\Minimal\StreamBufferInterrupt.c + + + $PROJ_DIR$\..\Common\Minimal\TaskNotify.c + + + $PROJ_DIR$\..\Common\Minimal\TimerDemo.c + + + + $PROJ_DIR$\full_demo\main_full.c + + + $PROJ_DIR$\full_demo\RegTest.s + + + + $PROJ_DIR$\FreeRTOSConfig.h + + + $PROJ_DIR$\main.c + + diff --git a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h index cc08b5f3f..2dca61617 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h @@ -63,6 +63,8 @@ #define configUSE_QUEUE_SETS 1 #define configUSE_TASK_NOTIFICATIONS 1 #define configSUPPORT_STATIC_ALLOCATION 1 +#define configINITIAL_TICK_COUNT ( ( TickType_t ) 0 ) /* For test. */ +#define configSTREAM_BUFFER_TRIGGER_LEVEL_TEST_MARGIN 1 /* As there are a lot of tasks running. */ /* Software timer related configuration options. */ #define configUSE_TIMERS 1 diff --git a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj index cd7a90f24..a97282612 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj +++ b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj @@ -15,7 +15,7 @@ Application false MultiByte - v140 + v142 @@ -41,7 +41,6 @@ Disabled ..\..\Source\include;..\..\Source\portable\MSVC-MingW;..\Common\Include;..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\Include;.\Trace_Recorder_Configuration;.;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0601;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true EnableFastChecks MultiThreadedDebug .\Debug/WIN32.pch @@ -52,7 +51,7 @@ true EditAndContinue false - /wd4210 /wc4574 %(AdditionalOptions) + /wd4210 %(AdditionalOptions) 4574;4820;4668;4255;4710;%(DisableSpecificWarnings) diff --git a/FreeRTOS/Demo/WIN32-MSVC/main.c b/FreeRTOS/Demo/WIN32-MSVC/main.c index ee8219744..a902e6349 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main.c @@ -7,7 +7,7 @@ * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: + * subject to the fofllowing conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. diff --git a/FreeRTOS/Demo/WIN32-MSVC/main_full.c b/FreeRTOS/Demo/WIN32-MSVC/main_full.c index 81d84750c..3a601fed0 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main_full.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main_full.c @@ -244,7 +244,7 @@ int main_full( void ) static void prvCheckTask( void *pvParameters ) { TickType_t xNextWakeTime; -const TickType_t xCycleFrequency = pdMS_TO_TICKS( 4000UL ); +const TickType_t xCycleFrequency = pdMS_TO_TICKS( 5000UL ); HeapStats_t xHeapStats; /* Just to remove compiler warning. */ diff --git a/FreeRTOS/History.txt b/FreeRTOS/History.txt index ba099724d..e040bd086 100644 --- a/FreeRTOS/History.txt +++ b/FreeRTOS/History.txt @@ -15,6 +15,9 @@ Changes since the last release: + Change type of uxPendedTicks from UBaseType_t to TickType_t to ensure it has same type as variables it is compared to, and therefore also rename the variable xPendingTicks. + + Correct alignment of stack top in RISC-V port when + configISR_STACK_SIZE_WORDS is defined to a non zero value. + Changes between FreeRTOS V10.2.1 and FreeRTOS V10.2.0 released May 13 2019: diff --git a/FreeRTOS/Source/portable/Common/mpu_wrappers.c b/FreeRTOS/Source/portable/Common/mpu_wrappers.c index fd4db0b08..5df7d4089 100644 --- a/FreeRTOS/Source/portable/Common/mpu_wrappers.c +++ b/FreeRTOS/Source/portable/Common/mpu_wrappers.c @@ -365,12 +365,12 @@ BaseType_t xRunningPrivileged = xPortRaisePrivilege(); /*-----------------------------------------------------------*/ #if( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) ) - TickType_t MPU_xTaskGetIdleRunTimeCounter( void ) /* FREERTOS_SYSTEM_CALL */ + uint32_t MPU_ulTaskGetIdleRunTimeCounter( void ) /* FREERTOS_SYSTEM_CALL */ { - TickType_t xReturn; + uint32_t xReturn; BaseType_t xRunningPrivileged = xPortRaisePrivilege(); - xReturn = xTaskGetIdleRunTimeCounter(); + xReturn = ulTaskGetIdleRunTimeCounter(); vPortResetPrivilege( xRunningPrivileged ); return xReturn; } @@ -451,6 +451,17 @@ BaseType_t xRunningPrivileged = xPortRaisePrivilege(); #endif /*-----------------------------------------------------------*/ +BaseType_t MPU_xTaskCatchUpTicks( TickType_t xTicksToCatchUp ) /* FREERTOS_SYSTEM_CALL */ +{ +BaseType_t xReturn; +BaseType_t xRunningPrivileged = xPortRaisePrivilege(); + + xReturn = xTaskCatchUpTicks( xTicksToCatchUp ); + vPortResetPrivilege( xRunningPrivileged ); + return xReturn; +} +/*-----------------------------------------------------------*/ + #if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) /* FREERTOS_SYSTEM_CALL */ {