mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-09-28 16:16:47 +08:00
Update PIC32 port to make use of configUSE_PORT_OPTIMISED_TASK_SELECTION.
Make small modification in GCC CM3 port when configUSE_PORT_OPTIMISED_TASK_SELECTION is set to 1 to remove compiler warning.
This commit is contained in:
@@ -81,28 +81,29 @@
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000UL )
|
||||
#define configPERIPHERAL_CLOCK_HZ ( ( unsigned long ) 40000000UL )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( 190 )
|
||||
#define configISR_STACK_SIZE ( 400 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) 28000 )
|
||||
#define configMAX_TASK_NAME_LEN ( 8 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#define configQUEUE_REGISTRY_SIZE 0
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||
#define configUSE_APPLICATION_TASK_TAG 0
|
||||
#define configUSE_COUNTING_SEMAPHORES 1
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configCPU_CLOCK_HZ ( 80000000UL )
|
||||
#define configPERIPHERAL_CLOCK_HZ ( 40000000UL )
|
||||
#define configMAX_PRIORITIES ( 5UL )
|
||||
#define configMINIMAL_STACK_SIZE ( 190 )
|
||||
#define configISR_STACK_SIZE ( 400 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) 28000 )
|
||||
#define configMAX_TASK_NAME_LEN ( 8 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#define configQUEUE_REGISTRY_SIZE 0
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||
#define configUSE_APPLICATION_TASK_TAG 0
|
||||
#define configUSE_COUNTING_SEMAPHORES 1
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
|
||||
+197
-191
File diff suppressed because it is too large
Load Diff
+197
-191
File diff suppressed because it is too large
Load Diff
+197
-191
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,14 @@
|
||||
#
|
||||
#Tue May 08 15:07:25 BST 2012
|
||||
#Mon Sep 24 21:29:54 BST 2012
|
||||
EXPLORER_16_PIC32MX795.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.00\\bin
|
||||
conf.ids=EXPLORER_16_PIC32MX360,EXPLORER_16_PIC32MX460,EXPLORER_16_PIC32MX795
|
||||
EXPLORER_16_PIC32MX460.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.00\\bin
|
||||
EXPLORER_16_PIC32MX460.languagetoolchain.version=1.00
|
||||
EXPLORER_16_PIC32MX795.languagetoolchain.version=1.00
|
||||
EXPLORER_16_PIC32MX460.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=cb898dcf3b34ec81df6dc777105d00b0
|
||||
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=0721942c201c5766886fb5f147185a2e
|
||||
EXPLORER_16_PIC32MX795.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=cb898dcf3b34ec81df6dc777105d00b0
|
||||
EXPLORER_16_PIC32MX460.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=2d010868d903d272f704504c06853aff
|
||||
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=ef199adcc8f049579a105cca20571dcb
|
||||
EXPLORER_16_PIC32MX795.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=2d010868d903d272f704504c06853aff
|
||||
EXPLORER_16_PIC32MX360.languagetoolchain.version=1.00
|
||||
EXPLORER_16_PIC32MX360.languagetoolchain.dir=C\:\\devtools\\Microchip\\xc32\\v1.00\\bin
|
||||
EXPLORER_16_PIC32MX360.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=cb898dcf3b34ec81df6dc777105d00b0
|
||||
EXPLORER_16_PIC32MX360.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=2d010868d903d272f704504c06853aff
|
||||
host.platform=windows
|
||||
|
||||
+3
-1
@@ -19,15 +19,17 @@ PATH_TO_IDE_BIN=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../b
|
||||
# Adding MPLAB X bin directory to path.
|
||||
PATH:=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH)
|
||||
# Path to java used to run MPLAB X when this makefile was created
|
||||
MP_JAVA_PATH="C:\Program Files\Java\jre6/bin/"
|
||||
MP_JAVA_PATH="C:\devtools\Microchip\MPLABX\sys\java\jre1.6.0_32-windows\java-windows/bin/"
|
||||
OS_CURRENT="$(shell uname -s)"
|
||||
MP_CC="C:\devtools\Microchip\xc32\v1.00\bin\xc32-gcc.exe"
|
||||
# MP_CPPC is not defined
|
||||
# MP_BC is not defined
|
||||
MP_AS="C:\devtools\Microchip\xc32\v1.00\bin\xc32-as.exe"
|
||||
MP_LD="C:\devtools\Microchip\xc32\v1.00\bin\xc32-ld.exe"
|
||||
MP_AR="C:\devtools\Microchip\xc32\v1.00\bin\xc32-ar.exe"
|
||||
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar"
|
||||
MP_CC_DIR="C:\devtools\Microchip\xc32\v1.00\bin"
|
||||
# MP_CPPC_DIR is not defined
|
||||
# MP_BC_DIR is not defined
|
||||
MP_AS_DIR="C:\devtools\Microchip\xc32\v1.00\bin"
|
||||
MP_LD_DIR="C:\devtools\Microchip\xc32\v1.00\bin"
|
||||
|
||||
+3
-1
@@ -19,15 +19,17 @@ PATH_TO_IDE_BIN=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../b
|
||||
# Adding MPLAB X bin directory to path.
|
||||
PATH:=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH)
|
||||
# Path to java used to run MPLAB X when this makefile was created
|
||||
MP_JAVA_PATH="C:\Program Files\Java\jre6/bin/"
|
||||
MP_JAVA_PATH="C:\devtools\Microchip\MPLABX\sys\java\jre1.6.0_32-windows\java-windows/bin/"
|
||||
OS_CURRENT="$(shell uname -s)"
|
||||
MP_CC="C:\devtools\Microchip\xc32\v1.00\bin\xc32-gcc.exe"
|
||||
# MP_CPPC is not defined
|
||||
# MP_BC is not defined
|
||||
MP_AS="C:\devtools\Microchip\xc32\v1.00\bin\xc32-as.exe"
|
||||
MP_LD="C:\devtools\Microchip\xc32\v1.00\bin\xc32-ld.exe"
|
||||
MP_AR="C:\devtools\Microchip\xc32\v1.00\bin\xc32-ar.exe"
|
||||
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar"
|
||||
MP_CC_DIR="C:\devtools\Microchip\xc32\v1.00\bin"
|
||||
# MP_CPPC_DIR is not defined
|
||||
# MP_BC_DIR is not defined
|
||||
MP_AS_DIR="C:\devtools\Microchip\xc32\v1.00\bin"
|
||||
MP_LD_DIR="C:\devtools\Microchip\xc32\v1.00\bin"
|
||||
|
||||
+3
-1
@@ -19,15 +19,17 @@ PATH_TO_IDE_BIN=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../b
|
||||
# Adding MPLAB X bin directory to path.
|
||||
PATH:=C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH)
|
||||
# Path to java used to run MPLAB X when this makefile was created
|
||||
MP_JAVA_PATH="C:\Program Files\Java\jre6/bin/"
|
||||
MP_JAVA_PATH="C:\devtools\Microchip\MPLABX\sys\java\jre1.6.0_32-windows\java-windows/bin/"
|
||||
OS_CURRENT="$(shell uname -s)"
|
||||
MP_CC="C:\devtools\Microchip\xc32\v1.00\bin\xc32-gcc.exe"
|
||||
# MP_CPPC is not defined
|
||||
# MP_BC is not defined
|
||||
MP_AS="C:\devtools\Microchip\xc32\v1.00\bin\xc32-as.exe"
|
||||
MP_LD="C:\devtools\Microchip\xc32\v1.00\bin\xc32-ld.exe"
|
||||
MP_AR="C:\devtools\Microchip\xc32\v1.00\bin\xc32-ar.exe"
|
||||
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/devtools/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar"
|
||||
MP_CC_DIR="C:\devtools\Microchip\xc32\v1.00\bin"
|
||||
# MP_CPPC_DIR is not defined
|
||||
# MP_BC_DIR is not defined
|
||||
MP_AS_DIR="C:\devtools\Microchip\xc32\v1.00\bin"
|
||||
MP_LD_DIR="C:\devtools\Microchip\xc32\v1.00\bin"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,8 +22,8 @@
|
||||
</runprofile>
|
||||
</conf>
|
||||
<conf name="EXPLORER_16_PIC32MX460" type="2">
|
||||
<platformToolSN>:=MPLABCommUSB:=04D8:=9009:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB ICD3 tm (www.microchip.com):=JIT112942201:=x:=en</platformToolSN>
|
||||
<languageToolchainDir>C:\Program Files (x86)\Microchip\xc32\v1.00\bin</languageToolchainDir>
|
||||
<platformToolSN>:=MPLABCommUSB:=04D8:=9004:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB REAL ICE tm (www.microchip.com):=JIT065091617:=x:=en</platformToolSN>
|
||||
<languageToolchainDir>C:\devtools\Microchip\xc32\v1.00\bin</languageToolchainDir>
|
||||
<mdbdebugger version="1">
|
||||
<placeholder1>place holder 1</placeholder1>
|
||||
<placeholder2>place holder 2</placeholder2>
|
||||
|
||||
Binary file not shown.
@@ -79,6 +79,12 @@
|
||||
/* Application specific configuration options. */
|
||||
#include "FreeRTOSConfig.h"
|
||||
|
||||
/* configUSE_PORT_OPTIMISED_TASK_SELECTION must be defined before portable.h
|
||||
is included as it is used by the port layer. */
|
||||
#ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
|
||||
#endif
|
||||
|
||||
/* Definitions specific to the port being used. */
|
||||
#include "portable.h"
|
||||
|
||||
@@ -165,12 +171,8 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
|
||||
#define INCLUDE_uxTaskGetStackHighWaterMark 0
|
||||
#endif
|
||||
|
||||
#ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
|
||||
#endif
|
||||
|
||||
#ifndef INCLUDE_cTaskStateGet
|
||||
#define INCLUDE_cTaskStateGet 0
|
||||
#ifndef INCLUDE_eTaskStateGet
|
||||
#define INCLUDE_eTaskStateGet 0
|
||||
#endif
|
||||
|
||||
#ifndef configUSE_RECURSIVE_MUTEXES
|
||||
|
||||
@@ -168,7 +168,7 @@ extern void vPortExitCritical( void );
|
||||
#if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1
|
||||
|
||||
/* Generic helper function. */
|
||||
__attribute__( ( always_inline ) ) static unsigned char ucPortCountLeadingZeros( unsigned long ulBitmap )
|
||||
__attribute__( ( always_inline ) ) static inline unsigned char ucPortCountLeadingZeros( unsigned long ulBitmap )
|
||||
{
|
||||
unsigned char ucReturn;
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ portALIGNMENT_ASSERT_pxCurrentTCB() will trigger false positive asserts. */
|
||||
#if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1
|
||||
|
||||
/* Generic helper function. */
|
||||
__attribute__( ( always_inline ) ) static unsigned char ucPortCountLeadingZeros( ulBitmap )
|
||||
__attribute__( ( always_inline ) ) static inline unsigned char ucPortCountLeadingZeros( ulBitmap )
|
||||
{
|
||||
unsigned char ucReturn;
|
||||
|
||||
|
||||
@@ -151,6 +151,23 @@ extern void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE );
|
||||
#define portSET_INTERRUPT_MASK_FROM_ISR() uxPortSetInterruptMaskFromISR()
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusRegister ) vPortClearInterruptMaskFromISR( uxSavedStatusRegister )
|
||||
|
||||
#if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1
|
||||
|
||||
/* Check the configuration. */
|
||||
#if( configMAX_PRIORITIES > 32 )
|
||||
#error configUSE_PORT_OPTIMISED_TASK_SELECTION can only be set to 1 when configMAX_PRIORITIES is less than or equal to 32. It is very rare that a system requires more than 10 to 15 difference priorities as tasks that share a priority will time slice.
|
||||
#endif
|
||||
|
||||
/* Store/clear the ready priorities in a bit map. */
|
||||
#define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )
|
||||
#define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31 - _clz( ( uxReadyPriorities ) ) )
|
||||
|
||||
#endif /* taskRECORD_READY_PRIORITY */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Task utilities. */
|
||||
|
||||
Reference in New Issue
Block a user