* See http://www.freertos.org/a00110.html.\r
*----------------------------------------------------------*/\r
\r
+/* The MPU version of port.c includes and excludes functions depending on the\r
+settings within this file. Therefore, to ensure all the functions in port.c\r
+build, this configuration file has all options turned on. */\r
+ \r
#define configUSE_PREEMPTION 1\r
#define configTICK_RATE_HZ ( 1000 )\r
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0\r
-#define configUSE_QUEUE_SETS 0\r
+#define configUSE_QUEUE_SETS 1\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ 48000000\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 16 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
-#define configUSE_TRACE_FACILITY 0\r
+#define configUSE_TRACE_FACILITY 1\r
#define configUSE_16_BIT_TICKS 0\r
#define configIDLE_SHOULD_YIELD 1\r
-#define configUSE_MUTEXES 0\r
-#define configQUEUE_REGISTRY_SIZE 0\r
+#define configUSE_MUTEXES 1\r
+#define configQUEUE_REGISTRY_SIZE 5\r
#define configCHECK_FOR_STACK_OVERFLOW 2\r
-#define configUSE_RECURSIVE_MUTEXES 0\r
+#define configUSE_RECURSIVE_MUTEXES 1\r
#define configUSE_MALLOC_FAILED_HOOK 1\r
-#define configUSE_APPLICATION_TASK_TAG 0\r
-#define configUSE_COUNTING_SEMAPHORES 0\r
-#define configSUPPORT_STATIC_ALLOCATION 0\r
+#define configUSE_APPLICATION_TASK_TAG 1\r
+#define configUSE_COUNTING_SEMAPHORES 1\r
+#define configSUPPORT_STATIC_ALLOCATION 1\r
#define configUSE_TICKLESS_IDLE 0\r
+#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 2\r
\r
/* Run time stats gathering definitions. */\r
-#define configGENERATE_RUN_TIME_STATS 0\r
+#define configGENERATE_RUN_TIME_STATS 1\r
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()\r
-#define portGET_RUN_TIME_COUNTER_VALUE()\r
+#define portGET_RUN_TIME_COUNTER_VALUE() 0\r
\r
/* This demo makes use of one or more example stats formatting functions. These\r
format the raw data provided by the uxTaskGetSystemState() function in to human\r
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
\r
/* Software timer definitions. */\r
-#define configUSE_TIMERS 0\r
+#define configUSE_TIMERS 1\r
#define configTIMER_TASK_PRIORITY ( 2 )\r
#define configTIMER_QUEUE_LENGTH 5\r
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE )\r
<View>
<WinId>204</WinId>
<ViewName>Performance Analyzer</ViewName>
- <TableColWidths>1028 154 154 100</TableColWidths>
+ <TableColWidths>1028 154 154 278</TableColWidths>
</View>
</SECTreeCtrl>
<WinId>1506</WinId>
<ViewName>Symbols</ViewName>
<UserString></UserString>
- <TableColWidths>70 70 70</TableColWidths>
+ <TableColWidths>80 80 80</TableColWidths>
</View>
<View>
<WinId>1936</WinId>
<ViewName>Watch 1</ViewName>
<UserString></UserString>
- <TableColWidths>70 164 70</TableColWidths>
+ <TableColWidths>80 80 80</TableColWidths>
</View>
<View>
<WinId>1937</WinId>
<ViewName>Watch 2</ViewName>
<UserString></UserString>
- <TableColWidths>70 70 70</TableColWidths>
+ <TableColWidths>80 80 80</TableColWidths>
</View>
<View>
<WinId>1935</WinId>
<ViewName>Call Stack + Locals</ViewName>
<UserString></UserString>
- <TableColWidths>70 70 70</TableColWidths>
+ <TableColWidths>80 80 80</TableColWidths>
</View>
<View>
<WinId>2506</WinId>
<flags>2</flags>
<showCmd>3</showCmd>
<MinPosition>
- <xPos>-1</xPos>
- <yPos>-1</yPos>
+ <xPos>-32000</xPos>
+ <yPos>-32000</yPos>
</MinPosition>
<MaxPosition>
<xPos>-1</xPos>
<yPos>-1</yPos>
</MaxPosition>
<NormalPosition>
- <Top>104</Top>
- <Left>399</Left>
- <Right>1341</Right>
- <Bottom>976</Bottom>
+ <Top>92</Top>
+ <Left>350</Left>
+ <Right>1292</Right>
+ <Bottom>964</Bottom>
</NormalPosition>
</WindowPosition>
<MDIClientArea>
<RegID>0</RegID>
<MDITabState>
- <Len>921</Len>
- <Data>01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000007000000000000000100000035433A5C455C4465765C4672656552544F535C576F726B696E67436F70795C4672656552544F535C536F757263655C71756575652E63000000000771756575652E6300000000F7B88600FFFFFFFF5A433A5C455C4465765C4672656552544F535C576F726B696E67436F70795C4672656552544F535C44656D6F5C434F525445585F4D50555F53696D756C61746F725F4B65696C5F4743435C4672656552544F53436F6E6669672E6800000000104672656552544F53436F6E6669672E6800000000BCA8E100FFFFFFFF67433A5C455C4465765C4672656552544F535C576F726B696E67436F70795C4672656552544F535C44656D6F5C434F525445585F4D50555F53696D756C61746F725F4B65696C5F4743435C4743435F53706563696669635C737461727475705F41524D434D342E530000000010737461727475705F41524D434D342E5300000000FFDC7800FFFFFFFF50433A5C455C4465765C4672656552544F535C576F726B696E67436F70795C4672656552544F535C44656D6F5C434F525445585F4D50555F53696D756C61746F725F4B65696C5F4743435C6D61696E2E6300000000066D61696E2E6300000000BCA8E100FFFFFFFF62433A5C455C4465765C4672656552544F535C576F726B696E67436F70795C4672656552544F535C44656D6F5C434F525445585F4D50555F53696D756C61746F725F4B65696C5F4743435C4743435F53706563696669635C73656374696F6E732E6C64000000000B73656374696F6E732E6C6400000000BECEA100FFFFFFFF35433A5C455C4465765C4672656552544F535C576F726B696E67436F70795C4672656552544F535C536F757263655C7461736B732E6300000000077461736B732E6300000000F0A0A100FFFFFFFF4D433A5C455C4465765C4672656552544F535C576F726B696E67436F70795C4672656552544F535C536F757263655C706F727461626C655C4743435C41524D5F434D335F4D50555C706F72742E630000000006706F72742E63000000009CC1B600FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000110100005E000000800700006C030000</Data>
+ <Len>276</Len>
+ <Data>01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000001000000000000000100000050433A5C455C4465765C4672656552544F535C576F726B696E67436F70795C4672656552544F535C44656D6F5C434F525445585F4D50555F53696D756C61746F725F4B65696C5F4743435C6D61696E2E6300000000066D61696E2E6300000000FFDC7800FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000110100005E000000800700006C030000</Data>
</MDITabState>
</MDIClientArea>
<ViewEx>
<RegID>59392</RegID>
<Name>File</Name>
<Buttons>
- <Len>2391</Len>
- <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000000460000000000000000000000000000000001000000010000000180FE880000000000004500000000000000000000000000000000010000000100000001800B810000000000001300000000000000000000000000000000010000000100000001800C810000000000001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000002274736B535441544943414C4C595F414C4C4F43415445445F535441434B5F4F4E4C59960000000000000014002274736B535441544943414C4C595F414C4C4F43415445445F535441434B5F4F4E4C59065354415449430005737461636B0352414D064D454D4F52590B504F53534942494C495459135F4D696E696D756D5F537461636B5F53697A650644414D4147450665787465726E0A5F5F537461636B546F7007766563746F727306756C4D61696E2574736B535441544943414C4C595F414C4C4F43415445445F535441434B5F414E445F54434206535441434B5F1F636F6E666967535550504F52545F5354415449435F414C4C4F434154494F4E157563537461746963616C6C79416C6C6F6361746564047563537408696E6469636174651D74736B5354415449435F414C4C4F434154494F4E5F504F535349424C450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C6572030000</Data>
+ <Len>2178</Len>
+ <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000000A5553455F54494D455253960000000000000007000A5553455F54494D455253001E636F6E6669675553455F4150504C49434154494F4E5F5441534B5F5441471D636F6E66696747454E45524154455F52554E5F54494D455F53544154531F636F6E666967535550504F52545F5354415449435F414C4C4F434154494F4E11707276537461727446697273745461736B0E73746172747363686564756C657200000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C6572030000</Data>
</Buttons>
<OriginalItems>
<Len>1423</Len>
<RegID>59392</RegID>
<Name>File</Name>
<Buttons>
- <Len>2391</Len>
- <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000002274736B535441544943414C4C595F414C4C4F43415445445F535441434B5F4F4E4C59960000000000000014002274736B535441544943414C4C595F414C4C4F43415445445F535441434B5F4F4E4C59065354415449430005737461636B0352414D064D454D4F52590B504F53534942494C495459135F4D696E696D756D5F537461636B5F53697A650644414D4147450665787465726E0A5F5F537461636B546F7007766563746F727306756C4D61696E2574736B535441544943414C4C595F414C4C4F43415445445F535441434B5F414E445F54434206535441434B5F1F636F6E666967535550504F52545F5354415449435F414C4C4F434154494F4E157563537461746963616C6C79416C6C6F6361746564047563537408696E6469636174651D74736B5354415449435F414C4C4F434154494F4E5F504F535349424C450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020003001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C6572030000</Data>
+ <Len>2178</Len>
+ <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000000A5553455F54494D455253960000000000000007000A5553455F54494D455253001E636F6E6669675553455F4150504C49434154494F4E5F5441534B5F5441471D636F6E66696747454E45524154455F52554E5F54494D455F53544154531F636F6E666967535550504F52545F5354415449435F414C4C4F434154494F4E11707276537461727446697273745461736B0E73746172747363686564756C657200000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020001001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C6572030000</Data>
</Buttons>
<OriginalItems>
<Len>1423</Len>
<MDIGroup>
<Size>100</Size>
<ActiveTab>0</ActiveTab>
- <Doc>
- <Name>..\..\..\Source\queue.c</Name>
- <ColumnNumber>2</ColumnNumber>
- <TopLine>23</TopLine>
- <CurrentLine>68</CurrentLine>
- <Folding>1</Folding>
- <ContractedFolders></ContractedFolders>
- <PaneID>0</PaneID>
- </Doc>
- <Doc>
- <Name>..\FreeRTOSConfig.h</Name>
- <ColumnNumber>0</ColumnNumber>
- <TopLine>148</TopLine>
- <CurrentLine>192</CurrentLine>
- <Folding>1</Folding>
- <ContractedFolders></ContractedFolders>
- <PaneID>0</PaneID>
- </Doc>
- <Doc>
- <Name>.\startup_ARMCM4.S</Name>
- <ColumnNumber>0</ColumnNumber>
- <TopLine>125</TopLine>
- <CurrentLine>139</CurrentLine>
- <Folding>1</Folding>
- <ContractedFolders></ContractedFolders>
- <PaneID>0</PaneID>
- </Doc>
<Doc>
<Name>..\main.c</Name>
<ColumnNumber>0</ColumnNumber>
- <TopLine>273</TopLine>
- <CurrentLine>316</CurrentLine>
- <Folding>1</Folding>
- <ContractedFolders></ContractedFolders>
- <PaneID>0</PaneID>
- </Doc>
- <Doc>
- <Name>C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\CORTEX_MPU_Simulator_Keil_GCC\GCC_Specific\sections.ld</Name>
- <ColumnNumber>52</ColumnNumber>
- <TopLine>13</TopLine>
- <CurrentLine>4</CurrentLine>
- <Folding>1</Folding>
- <ContractedFolders></ContractedFolders>
- <PaneID>0</PaneID>
- </Doc>
- <Doc>
- <Name>..\..\..\Source\tasks.c</Name>
- <ColumnNumber>0</ColumnNumber>
- <TopLine>3596</TopLine>
- <CurrentLine>3608</CurrentLine>
- <Folding>1</Folding>
- <ContractedFolders></ContractedFolders>
- <PaneID>0</PaneID>
- </Doc>
- <Doc>
- <Name>..\..\..\Source\portable\GCC\ARM_CM3_MPU\port.c</Name>
- <ColumnNumber>0</ColumnNumber>
- <TopLine>390</TopLine>
- <CurrentLine>402</CurrentLine>
+ <TopLine>70</TopLine>
+ <CurrentLine>358</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
<Name>-UV1115SAE -O2983 -S0 -C0 -P00 -N00("ARM CoreSight JTAG-DP") -D00(4BA00477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO11 -FN1 -FC1000 -FD20000000 -FF0NEW_DEVICE -FL080000 -FS00 -FP0($$Device:ARMCM4_FP$Device\ARM\Flash\NEW_DEVICE.FLM)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
- <Breakpoint>
- <Bp>
- <Number>0</Number>
- <Type>0</Type>
- <LineNumber>3619</LineNumber>
- <EnabledFlag>1</EnabledFlag>
- <Address>8634</Address>
- <ByteObject>0</ByteObject>
- <HtxType>0</HtxType>
- <ManyObjects>0</ManyObjects>
- <SizeOfObject>0</SizeOfObject>
- <BreakByAccess>0</BreakByAccess>
- <BreakIfRCount>1</BreakIfRCount>
- <Filename>C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Source\tasks.c</Filename>
- <ExecCommand></ExecCommand>
- <Expression>\\RTOSDemo\../../../Source/tasks.c\3619</Expression>
- </Bp>
- </Breakpoint>
+ <Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>xTickCount</ItemText>
</Ww>
+ <Ww>
+ <count>1</count>
+ <WinNumber>1</WinNumber>
+ <ItemText>ulStillAliveCounts</ItemText>
+ </Ww>
+ <Ww>
+ <count>2</count>
+ <WinNumber>1</WinNumber>
+ <ItemText>ulStatus</ItemText>
+ </Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<Group>
<GroupName>System</GroupName>
- <tvExp>1</tvExp>
+ <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<Group>
<GroupName>main_and_config</GroupName>
- <tvExp>1</tvExp>
+ <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<Group>
<GroupName>FreeRTOS_Source</GroupName>
- <tvExp>1</tvExp>
+ <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
*/\r
static void prvOldStylePrivilegedModeTask( void *pvParameters );\r
\r
+/*\r
+ * A task that is deleted by the Idle task. This is just done for code \r
+ * coverage test purposes.\r
+ */\r
+static void prvTaskToDelete( void *pvParameters );\r
\r
/*-----------------------------------------------------------*/\r
/* Prototypes for other misc functions. --------------------*/\r
* If a reg test task detects an error it will delete itself, and in so doing\r
* prevent itself from sending any more 'I'm Alive' messages to the check task.\r
*/\r
-static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber );\r
+static void prvSendImAlive( QueueHandle_t xHandle, uint32_t ulTaskNumber );\r
\r
/*\r
* The check task is created with access to three memory regions (plus its\r
further information. */\r
static QueueHandle_t xFileScopeCheckQueue = NULL;\r
\r
+/* Holds the handle of a task that is deleted in the idle task hook - this is\r
+done for code coverage test purposes only. */\r
+static TaskHandle_t xTaskToDelete = NULL;\r
+\r
\r
/*-----------------------------------------------------------*/\r
/* Data used by the 'check' task. ---------------------------*/\r
\r
/*-----------------------------------------------------------*/\r
\r
+/*-----------------------------------------------------------*/\r
+/* Configures the task that is deleted. ---------------------*/\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Define the constants used to allocate the stack of the task that is \r
+deleted. Note that that stack size is defined in words, not bytes. */\r
+#define mainDELETE_TASK_STACK_SIZE_WORDS 128\r
+#define mainTASK_TO_DELETE_STACK_ALIGNMENT ( mainDELETE_TASK_STACK_SIZE_WORDS * sizeof( portSTACK_TYPE ) )\r
+\r
+/* Declare the stack that will be used by the task that gets deleted. The\r
+kernel will automatically create an MPU region for the stack. The stack \r
+alignment must match its size, so if 128 words are reserved for the stack \r
+then it must be aligned to ( 128 * 4 ) bytes. */\r
+static portSTACK_TYPE xDeleteTaskStack[ mainDELETE_TASK_STACK_SIZE_WORDS ] mainALIGN_TO( mainTASK_TO_DELETE_STACK_ALIGNMENT );\r
+\r
+static TaskParameters_t xTaskToDeleteParameters =\r
+{\r
+ prvTaskToDelete, /* pvTaskCode - the function that implements the task. */\r
+ "DeleteMe", /* pcName */\r
+ mainDELETE_TASK_STACK_SIZE_WORDS, /* usStackDepth */\r
+ ( void * ) NULL, /* pvParameters - this task uses the parameter to pass in a queue handle, but the queue is not created yet. */\r
+ tskIDLE_PRIORITY + 1, /* uxPriority */\r
+ xDeleteTaskStack, /* puxStackBuffer - the array to use as the task stack, as declared above. */\r
+ { /* xRegions - this task does not use any non-stack data hence all members are zero. */\r
+ /* Base address Length Parameters */\r
+ { 0x00, 0x00, 0x00 },\r
+ { 0x00, 0x00, 0x00 },\r
+ { 0x00, 0x00, 0x00 }\r
+ }\r
+};\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
int main( void )\r
{\r
prvSetupHardware();\r
\r
/* Create the queue used to pass "I'm alive" messages to the check task. */\r
- xFileScopeCheckQueue = xQueueCreate( 1, sizeof( unsigned long ) );\r
+ xFileScopeCheckQueue = xQueueCreate( 1, sizeof( uint32_t ) );\r
\r
/* One check task uses the task parameter to receive the queue handle.\r
This allows the file scope variable to be accessed from within the task.\r
xTaskCreateRestricted( &xRegTest2Parameters, NULL );\r
xTaskCreateRestricted( &xCheckTaskParameters, NULL );\r
\r
+ /* Create a task that does nothing but get deleted. This is done for code\r
+ coverage test purposes only. The task's handle is saved in xTaskToDelete\r
+ so it can get deleted in the idle task hook. */\r
+ xTaskCreateRestricted( &xTaskToDeleteParameters, &xTaskToDelete );\r
+ \r
/* Create the tasks that are created using the original xTaskCreate() API\r
function. */\r
xTaskCreate( prvOldStyleUserModeTask, /* The function that implements the task. */\r
mode. Once that task is in user mode the file scope queue variable will no\r
longer be accessible but the stack copy will. */\r
QueueHandle_t xQueue = xFileScopeCheckQueue;\r
-long lMessage;\r
-unsigned long ulStillAliveCounts[ 2 ] = { 0 };\r
+int32_t lMessage;\r
+uint32_t ulStillAliveCounts[ 2 ] = { 0 };\r
const char *pcStatusMessage = "PASS\r\n";\r
+volatile uint32_t ulStatus = pdPASS;\r
\r
\r
/* Just to remove compiler warning. */\r
/* One or both of the test tasks are no longer sending\r
'still alive' messages. */\r
pcStatusMessage = "FAIL\r\n";\r
+ \r
+ /* ulStatus can be viewed (live) in the Keil watch window. */\r
+ ulStatus = pdFAIL;\r
+ ( void ) ulStatus;\r
}\r
\r
- /* Print a pass/fail message to the terminal. This will be\r
- visible in the CrossWorks IDE. */\r
-// MPU_debug_printf( pcStatusMessage );\r
-( void ) pcStatusMessage;\r
+ /* print pcStatusMessage here. */\r
+ ( void ) pcStatusMessage; \r
\r
/* Reset the count of 'still alive' messages. */\r
memset( ulStillAliveCounts, 0x00, sizeof( ulStillAliveCounts ) );\r
\r
static void prvTestMemoryRegions( void )\r
{\r
-long l;\r
+int32_t x;\r
char cTemp;\r
\r
/* The check task (from which this function is called) is created in the\r
/*cPrivilegedOnlyAccessArray[ 0 ] = 'a';*/\r
\r
/* The read/write array can still be successfully read and written. */\r
- for( l = 0; l < mainREAD_WRITE_ALIGN_SIZE; l++ )\r
+ for( x = 0; x < mainREAD_WRITE_ALIGN_SIZE; x++ )\r
{\r
- cReadWriteArray[ l ] = 'a';\r
- if( cReadWriteArray[ l ] != 'a' )\r
+ cReadWriteArray[ x ] = 'a';\r
+ if( cReadWriteArray[ x ] != 'a' )\r
{\r
/* Something unexpected happened. Delete this task so the error is\r
apparent (no output will be displayed). */\r
/* cReadWriteArray[ mainREAD_WRITE_ALIGN_SIZE ] = 0x00; */\r
\r
/* The read only array can be successfully read... */\r
- for( l = 0; l < mainREAD_ONLY_ALIGN_SIZE; l++ )\r
+ for( x = 0; x < mainREAD_ONLY_ALIGN_SIZE; x++ )\r
{\r
- cTemp = cReadOnlyArray[ l ];\r
+ cTemp = cReadOnlyArray[ x ];\r
}\r
\r
/* ...but cannot be written. Uncomment the following line to test. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
+static void prvTaskToDelete( void *pvParameters )\r
+{\r
+ /* Remove compiler warnings about unused parameters. */\r
+ ( void ) pvParameters;\r
+ \r
+ /* This task has nothing to do - for code coverage test purposes it is\r
+ deleted by the Idle task. */\r
+ vTaskSuspend( NULL );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
void vApplicationIdleHook( void )\r
{\r
-extern unsigned long __SRAM_segment_end__[];\r
-extern unsigned long __privileged_data_start__[];\r
-extern unsigned long __privileged_data_end__[];\r
-extern unsigned long __FLASH_segment_start__[];\r
-extern unsigned long __FLASH_segment_end__[];\r
-volatile unsigned long *pul;\r
-volatile unsigned long ulReadData;\r
+extern uint32_t __SRAM_segment_end__[];\r
+extern uint32_t __privileged_data_start__[];\r
+extern uint32_t __privileged_data_end__[];\r
+extern uint32_t __FLASH_segment_start__[];\r
+extern uint32_t __FLASH_segment_end__[];\r
+volatile uint32_t *pul;\r
+volatile uint32_t ulReadData;\r
\r
/* The idle task, and therefore this function, run in Supervisor mode and\r
can therefore access all memory. Try reading from corners of flash and\r
/* pul = __SRAM_segment_end__ + 1;\r
ulReadData = *pul; */\r
\r
+ /* One task is created purely so it can be deleted - done for code coverage\r
+ test purposes. */\r
+ if( xTaskToDelete != NULL )\r
+ {\r
+ vTaskDelete( xTaskToDelete );\r
+ xTaskToDelete = NULL;\r
+ }\r
+\r
( void ) ulReadData;\r
}\r
/*-----------------------------------------------------------*/\r
\r
static void prvOldStyleUserModeTask( void *pvParameters )\r
{\r
-extern unsigned long __privileged_data_start__[];\r
-extern unsigned long __privileged_data_end__[];\r
-extern unsigned long __SRAM_segment_end__[];\r
-extern unsigned long __privileged_functions_end__[];\r
-extern unsigned long __FLASH_segment_start__[];\r
-extern unsigned long __FLASH_segment_end__[];\r
-//const volatile unsigned long *pulStandardPeripheralRegister = ( volatile unsigned long * ) 0x400FC0C4;\r
-volatile unsigned long *pul;\r
-volatile unsigned long ulReadData;\r
+extern uint32_t __privileged_data_start__[];\r
+extern uint32_t __privileged_data_end__[];\r
+extern uint32_t __SRAM_segment_end__[];\r
+extern uint32_t __privileged_functions_end__[];\r
+extern uint32_t __FLASH_segment_start__[];\r
+extern uint32_t __FLASH_segment_end__[];\r
+/*const volatile uint32_t *pulStandardPeripheralRegister = ( volatile uint32_t * ) 0x40000000;*/\r
+volatile uint32_t *pul;\r
+volatile uint32_t ulReadData;\r
\r
/* The following lines are commented out to prevent the unused variable\r
-compiler warnings when the tests that use the variable are also commented out.\r
-extern unsigned long __privileged_functions_start__[];\r
-const volatile unsigned long *pulSystemPeripheralRegister = ( volatile unsigned long * ) 0xe000e014; */\r
+compiler warnings when the tests that use the variable are also commented out. */\r
+/*extern uint32_t __privileged_functions_start__[];\r
+const volatile uint32_t *pulSystemPeripheralRegister = ( volatile uint32_t * ) 0xe000e014;*/\r
\r
( void ) pvParameters;\r
\r
ulReadData = *pul;\r
\r
/* Standard peripherals are accessible. */\r
-// ulReadData = *pulStandardPeripheralRegister;\r
+ /*ulReadData = *pulStandardPeripheralRegister;*/\r
\r
/* System peripherals are not accessible. Uncomment the following line\r
to test. Also uncomment the declaration of pulSystemPeripheralRegister\r
- at the top of this function. */\r
- /* ulReadData = *pulSystemPeripheralRegister; */\r
+ at the top of this function. \r
+ ulReadData = *pulSystemPeripheralRegister; */\r
\r
/* Reading from anywhere inside the privileged Flash or RAM should cause a\r
fault. This can be tested by uncommenting any of the following pairs of\r
lines. Also uncomment the declaration of __privileged_functions_start__\r
at the top of this function. */\r
\r
- /* pul = __privileged_functions_start__;\r
- ulReadData = *pul; */\r
+ /*pul = __privileged_functions_start__;\r
+ ulReadData = *pul;*/\r
\r
- /* pul = __privileged_functions_end__ - 1;\r
- ulReadData = *pul; */\r
+ /*pul = __privileged_functions_end__ - 1;\r
+ ulReadData = *pul;*/\r
\r
- /* pul = __privileged_data_start__;\r
- ulReadData = *pul; */\r
+ /*pul = __privileged_data_start__;\r
+ ulReadData = *pul;*/\r
\r
- /* pul = __privileged_data_end__ - 1;\r
- ulReadData = *pul; */\r
+ /*pul = __privileged_data_end__ - 1;\r
+ ulReadData = *pul;*/\r
\r
/* Must not just run off the end of a task function, so delete this task.\r
Note that because this task was created using xTaskCreate() the stack was\r
\r
static void prvOldStylePrivilegedModeTask( void *pvParameters )\r
{\r
-extern unsigned long __privileged_data_start__[];\r
-extern unsigned long __privileged_data_end__[];\r
-extern unsigned long __SRAM_segment_end__[];\r
-extern unsigned long __privileged_functions_start__[];\r
-extern unsigned long __privileged_functions_end__[];\r
-extern unsigned long __FLASH_segment_start__[];\r
-extern unsigned long __FLASH_segment_end__[];\r
-volatile unsigned long *pul;\r
-volatile unsigned long ulReadData;\r
-const volatile unsigned long *pulSystemPeripheralRegister = ( volatile unsigned long * ) 0xe000e014; /* Systick */\r
-//const volatile unsigned long *pulStandardPeripheralRegister = ( volatile unsigned long * ) 0x400FC0C4;\r
+extern uint32_t __privileged_data_start__[];\r
+extern uint32_t __privileged_data_end__[];\r
+extern uint32_t __SRAM_segment_end__[];\r
+extern uint32_t __privileged_functions_start__[];\r
+extern uint32_t __privileged_functions_end__[];\r
+extern uint32_t __FLASH_segment_start__[];\r
+extern uint32_t __FLASH_segment_end__[];\r
+volatile uint32_t *pul;\r
+volatile uint32_t ulReadData;\r
+const volatile uint32_t *pulSystemPeripheralRegister = ( volatile uint32_t * ) 0xe000e014; /* Systick */\r
+/*const volatile uint32_t *pulStandardPeripheralRegister = ( volatile uint32_t * ) 0x40000000;*/\r
\r
( void ) pvParameters;\r
\r
/* Finally, accessing both System and normal peripherals should both be\r
possible. */\r
ulReadData = *pulSystemPeripheralRegister;\r
-// ulReadData = *pulStandardPeripheralRegister;\r
+ /*ulReadData = *pulStandardPeripheralRegister;*/\r
\r
/* Must not just run off the end of a task function, so delete this task.\r
Note that because this task was created using xTaskCreate() the stack was\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber )\r
+static void prvSendImAlive( QueueHandle_t xHandle, uint32_t ulTaskNumber )\r
{\r
if( xHandle != NULL )\r
{\r
\r
void vApplicationTickHook( void )\r
{\r
-static unsigned long ulCallCount;\r
-const unsigned long ulCallsBetweenSends = 5000 / portTICK_PERIOD_MS;\r
-const unsigned long ulMessage = mainPRINT_SYSTEM_STATUS;\r
+static uint32_t ulCallCount;\r
+const uint32_t ulCallsBetweenSends = 5000UL / configTICK_RATE_HZ;\r
+const uint32_t ulMessage = mainPRINT_SYSTEM_STATUS;\r
portBASE_TYPE xDummy;\r
\r
/* If configUSE_TICK_HOOK is set to 1 then this function will get called\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void hard_fault_handler(unsigned int * hardfault_args)\r
+void hard_fault_handler( uint32_t * hardfault_args )\r
{\r
-volatile unsigned int stacked_r0;\r
-volatile unsigned int stacked_r1;\r
-volatile unsigned int stacked_r2;\r
-volatile unsigned int stacked_r3;\r
-volatile unsigned int stacked_r12;\r
-volatile unsigned int stacked_lr;\r
-volatile unsigned int stacked_pc;\r
-volatile unsigned int stacked_psr;\r
-\r
- stacked_r0 = ((unsigned long) hardfault_args[0]);\r
- stacked_r1 = ((unsigned long) hardfault_args[1]);\r
- stacked_r2 = ((unsigned long) hardfault_args[2]);\r
- stacked_r3 = ((unsigned long) hardfault_args[3]);\r
-\r
- stacked_r12 = ((unsigned long) hardfault_args[4]);\r
- stacked_lr = ((unsigned long) hardfault_args[5]);\r
- stacked_pc = ((unsigned long) hardfault_args[6]);\r
- stacked_psr = ((unsigned long) hardfault_args[7]);\r
+volatile uint32_t stacked_r0;\r
+volatile uint32_t stacked_r1;\r
+volatile uint32_t stacked_r2;\r
+volatile uint32_t stacked_r3;\r
+volatile uint32_t stacked_r12;\r
+volatile uint32_t stacked_lr;\r
+volatile uint32_t stacked_pc;\r
+volatile uint32_t stacked_psr;\r
+\r
+ stacked_r0 = ((uint32_t) hardfault_args[0]);\r
+ stacked_r1 = ((uint32_t) hardfault_args[1]);\r
+ stacked_r2 = ((uint32_t) hardfault_args[2]);\r
+ stacked_r3 = ((uint32_t) hardfault_args[3]);\r
+\r
+ stacked_r12 = ((uint32_t) hardfault_args[4]);\r
+ stacked_lr = ((uint32_t) hardfault_args[5]);\r
+ stacked_pc = ((uint32_t) hardfault_args[6]);\r
+ stacked_psr = ((uint32_t) hardfault_args[7]);\r
\r
/* Inspect stacked_pc to locate the offending instruction. */\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void MPU_Fault_ISR( void ) __attribute__((naked));\r
+void MemManage_Handler( void ) __attribute__((naked));\r
void MemManage_Handler( void )\r
{\r
__asm volatile\r
\r
/*-----------------------------------------------------------*/\r
\r
-#warning Why must configSUPPORT_STATIC_ALLOCATION be set to 1 when the MPU is used?\r
-#warning Linker script is crippled for use with the simulator.
\ No newline at end of file
+/* configUSE_STATIC_ALLOCATION is set to 1, so the application must provide an\r
+implementation of vApplicationGetIdleTaskMemory() to provide the memory that is\r
+used by the Idle task. */\r
+void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize )\r
+{\r
+/* If the buffers to be provided to the Idle task are declared inside this\r
+function then they must be declared static - otherwise they will be allocated on\r
+the stack and so not exists after this function exits. */\r
+static StaticTask_t xIdleTaskTCB;\r
+static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ];\r
+\r
+ /* Pass out a pointer to the StaticTask_t structure in which the Idle task's\r
+ state will be stored. */\r
+ *ppxIdleTaskTCBBuffer = &xIdleTaskTCB;\r
+\r
+ /* Pass out the array that will be used as the Idle task's stack. */\r
+ *ppxIdleTaskStackBuffer = uxIdleTaskStack;\r
+\r
+ /* Pass out the size of the array pointed to by *ppxIdleTaskStackBuffer.\r
+ Note that, as the array is necessarily of type StackType_t,\r
+ configMINIMAL_STACK_SIZE is specified in words, not bytes. */\r
+ *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+/* configUSE_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the\r
+application must provide an implementation of vApplicationGetTimerTaskMemory()\r
+to provide the memory that is used by the Timer service task. */\r
+void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize )\r
+{\r
+/* If the buffers to be provided to the Timer task are declared inside this\r
+function then they must be declared static - otherwise they will be allocated on\r
+the stack and so not exists after this function exits. */\r
+static StaticTask_t xTimerTaskTCB;\r
+static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ];\r
+\r
+ /* Pass out a pointer to the StaticTask_t structure in which the Timer\r
+ task's state will be stored. */\r
+ *ppxTimerTaskTCBBuffer = &xTimerTaskTCB;\r
+\r
+ /* Pass out the array that will be used as the Timer task's stack. */\r
+ *ppxTimerTaskStackBuffer = uxTimerTaskStack;\r
+\r
+ /* Pass out the size of the array pointed to by *ppxTimerTaskStackBuffer.\r
+ Note that, as the array is necessarily of type StackType_t,\r
+ configMINIMAL_STACK_SIZE is specified in words, not bytes. */\r
+ *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;\r
+}\r
--- /dev/null
+/*\r
+ FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.\r
+ All rights reserved\r
+\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+ This file is part of the FreeRTOS distribution.\r
+\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.\r
+\r
+ ***************************************************************************\r
+ >>! NOTE: The modification to the GPL is included to allow you to !<<\r
+ >>! distribute a combined work that includes FreeRTOS without being !<<\r
+ >>! obliged to provide the source code for proprietary components !<<\r
+ >>! outside of the FreeRTOS kernel. !<<\r
+ ***************************************************************************\r
+\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ FOR A PARTICULAR PURPOSE. Full license text is available on the following\r
+ link: http://www.freertos.org/a00114.html\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that is more than just the market leader, it *\r
+ * is the industry's de facto standard. *\r
+ * *\r
+ * Help yourself get started quickly while simultaneously helping *\r
+ * to support the FreeRTOS project by purchasing a FreeRTOS *\r
+ * tutorial book, reference manual, or both: *\r
+ * http://www.FreeRTOS.org/Documentation *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading\r
+ the FAQ page "My application does not run, what could be wrong?". Have you\r
+ defined configASSERT()?\r
+\r
+ http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+ embedded software for free we request you assist our global community by\r
+ participating in the support forum.\r
+\r
+ http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+ be as productive as possible as early as possible. Now you can receive\r
+ FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+ Ltd, and the world's leading authority on the world's leading RTOS.\r
+\r
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+ Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+ Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and commercial middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
+ mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
+*/\r
+\r
+/*\r
+ * When the MPU is used the standard (non MPU) API functions are mapped to\r
+ * equivalents that start "MPU_", the prototypes for which are defined in this\r
+ * header files. This will cause the application code to call the MPU_ version\r
+ * which wraps the non-MPU version with privilege promoting then demoting code,\r
+ * so the kernel code always runs will full privileges.\r
+ */\r
+\r
+\r
+#ifndef MPU_PROTOTYPES_H\r
+#define MPU_PROTOTYPES_H\r
+\r
+/* MPU versions of tasks.h API function. */\r
+BaseType_t MPU_xTaskCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask );\r
+TaskHandle_t MPU_xTaskCreateStatic( TaskFunction_t pxTaskCode, const char * const pcName, const uint32_t ulStackDepth, void * const pvParameters, UBaseType_t uxPriority, StackType_t * const puxStackBuffer, StaticTask_t * const pxTaskBuffer );\r
+BaseType_t MPU_xTaskCreateRestricted( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t *pxCreatedTask );\r
+void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions );\r
+void MPU_vTaskDelete( TaskHandle_t xTaskToDelete );\r
+void MPU_vTaskDelay( const TickType_t xTicksToDelay );\r
+void MPU_vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement );\r
+BaseType_t MPU_xTaskAbortDelay( TaskHandle_t xTask );\r
+UBaseType_t MPU_uxTaskPriorityGet( TaskHandle_t xTask );\r
+eTaskState MPU_eTaskGetState( TaskHandle_t xTask );\r
+void MPU_vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState );\r
+void MPU_vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority );\r
+void MPU_vTaskSuspend( TaskHandle_t xTaskToSuspend );\r
+void MPU_vTaskResume( TaskHandle_t xTaskToResume );\r
+void MPU_vTaskStartScheduler( void );\r
+void MPU_vTaskSuspendAll( void );\r
+BaseType_t MPU_xTaskResumeAll( void );\r
+TickType_t MPU_xTaskGetTickCount( void );\r
+UBaseType_t MPU_uxTaskGetNumberOfTasks( void );\r
+char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery );\r
+TaskHandle_t MPU_xTaskGetHandle( const char *pcNameToQuery );\r
+UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask );\r
+void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction );\r
+TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask );\r
+void MPU_vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue );\r
+void * MPU_pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex );\r
+BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );\r
+TaskHandle_t MPU_xTaskGetIdleTaskHandle( void );\r
+UBaseType_t MPU_uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, const UBaseType_t uxArraySize, uint32_t * const pulTotalRunTime );\r
+void MPU_vTaskList( char * pcWriteBuffer );\r
+void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer );\r
+BaseType_t MPU_xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue );\r
+BaseType_t MPU_xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait );\r
+uint32_t MPU_ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait );\r
+BaseType_t MPU_xTaskIncrementTick( void );\r
+TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void );\r
+void MPU_vTaskSetTimeOutState( TimeOut_t * const pxTimeOut );\r
+BaseType_t MPU_xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait );\r
+void MPU_vTaskMissedYield( void );\r
+BaseType_t MPU_xTaskGetSchedulerState( void );\r
+\r
+/* MPU versions of queue.h API function. */\r
+BaseType_t MPU_xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition );\r
+BaseType_t MPU_xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xJustPeek );\r
+UBaseType_t MPU_uxQueueMessagesWaiting( const QueueHandle_t xQueue );\r
+UBaseType_t MPU_uxQueueSpacesAvailable( const QueueHandle_t xQueue );\r
+void MPU_vQueueDelete( QueueHandle_t xQueue );\r
+QueueHandle_t MPU_xQueueCreateMutex( const uint8_t ucQueueType );\r
+QueueHandle_t MPU_xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue );\r
+QueueHandle_t MPU_xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount );\r
+QueueHandle_t MPU_xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue );\r
+void* MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore );\r
+BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xTicksToWait );\r
+BaseType_t MPU_xQueueGiveMutexRecursive( QueueHandle_t pxMutex );\r
+void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcName );\r
+void MPU_vQueueUnregisterQueue( QueueHandle_t xQueue );\r
+const char * MPU_pcQueueGetName( QueueHandle_t xQueue );\r
+QueueHandle_t MPU_xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType );\r
+QueueHandle_t MPU_xQueueGenericCreateStatic( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t *pucQueueStorage, StaticQueue_t *pxStaticQueue, const uint8_t ucQueueType );\r
+QueueSetHandle_t MPU_xQueueCreateSet( const UBaseType_t uxEventQueueLength );\r
+BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );\r
+BaseType_t MPU_xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );\r
+QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, const TickType_t xTicksToWait );\r
+BaseType_t MPU_xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue );\r
+void MPU_vQueueSetQueueNumber( QueueHandle_t xQueue, UBaseType_t uxQueueNumber );\r
+UBaseType_t MPU_uxQueueGetQueueNumber( QueueHandle_t xQueue );\r
+uint8_t MPU_ucQueueGetQueueType( QueueHandle_t xQueue );\r
+\r
+/* MPU versions of timers.h API function. */\r
+TimerHandle_t MPU_xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction );\r
+TimerHandle_t MPU_xTimerCreateStatic( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction, StaticTimer_t *pxTimerBuffer );\r
+void * MPU_pvTimerGetTimerID( const TimerHandle_t xTimer );\r
+void MPU_vTimerSetTimerID( TimerHandle_t xTimer, void *pvNewID );\r
+BaseType_t MPU_xTimerIsTimerActive( TimerHandle_t xTimer );\r
+TaskHandle_t MPU_xTimerGetTimerDaemonTaskHandle( void );\r
+BaseType_t MPU_xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, TickType_t xTicksToWait );\r
+const char * MPU_pcTimerGetName( TimerHandle_t xTimer );\r
+TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer );\r
+TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer );\r
+BaseType_t MPU_xTimerCreateTimerTask( void );\r
+BaseType_t MPU_xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait );\r
+\r
+/* MPU versions of event_group.h API function. */\r
+EventGroupHandle_t MPU_xEventGroupCreate( void );\r
+EventGroupHandle_t MPU_xEventGroupCreateStatic( StaticEventGroup_t *pxEventGroupBuffer );\r
+EventBits_t MPU_xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait );\r
+EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear );\r
+EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet );\r
+EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait );\r
+void MPU_vEventGroupDelete( EventGroupHandle_t xEventGroup );\r
+UBaseType_t MPU_uxEventGroupGetNumber( void* xEventGroup );\r
+\r
+#endif /* MPU_PROTOTYPES_H */\r
+\r
those files. */\r
#ifndef MPU_WRAPPERS_INCLUDED_FROM_API_FILE\r
\r
- #define xTaskCreate MPU_xTaskCreate\r
- #define xTaskCreateRestricted MPU_xTaskCreateRestricted\r
- #define vTaskAllocateMPURegions MPU_vTaskAllocateMPURegions\r
- #define vTaskDelete MPU_vTaskDelete\r
- #define vTaskDelayUntil MPU_vTaskDelayUntil\r
- #define vTaskDelay MPU_vTaskDelay\r
- #define uxTaskPriorityGet MPU_uxTaskPriorityGet\r
- #define vTaskPrioritySet MPU_vTaskPrioritySet\r
- #define eTaskGetState MPU_eTaskGetState\r
- #define vTaskSuspend MPU_vTaskSuspend\r
- #define vTaskResume MPU_vTaskResume\r
- #define vTaskSuspendAll MPU_vTaskSuspendAll\r
- #define xTaskResumeAll MPU_xTaskResumeAll\r
- #define xTaskGetTickCount MPU_xTaskGetTickCount\r
- #define uxTaskGetNumberOfTasks MPU_uxTaskGetNumberOfTasks\r
- #define vTaskList MPU_vTaskList\r
- #define vTaskGetRunTimeStats MPU_vTaskGetRunTimeStats\r
- #define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag\r
- #define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag\r
- #define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook\r
- #define uxTaskGetStackHighWaterMark MPU_uxTaskGetStackHighWaterMark\r
- #define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle\r
- #define xTaskGetSchedulerState MPU_xTaskGetSchedulerState\r
- #define xTaskGetIdleTaskHandle MPU_xTaskGetIdleTaskHandle\r
- #define uxTaskGetSystemState MPU_uxTaskGetSystemState\r
- #define xTaskGenericNotify MPU_xTaskGenericNotify\r
- #define xTaskNotifyWait MPU_xTaskNotifyWait\r
- #define ulTaskNotifyTake MPU_ulTaskNotifyTake\r
-\r
- #define xQueueGenericCreate MPU_xQueueGenericCreate\r
- #define xQueueCreateMutex MPU_xQueueCreateMutex\r
- #define xQueueGiveMutexRecursive MPU_xQueueGiveMutexRecursive\r
- #define xQueueTakeMutexRecursive MPU_xQueueTakeMutexRecursive\r
- #define xQueueCreateCountingSemaphore MPU_xQueueCreateCountingSemaphore\r
- #define xQueueGenericSend MPU_xQueueGenericSend\r
- #define xQueueGenericReceive MPU_xQueueGenericReceive\r
- #define uxQueueMessagesWaiting MPU_uxQueueMessagesWaiting\r
- #define vQueueDelete MPU_vQueueDelete\r
- #define xQueueGenericReset MPU_xQueueGenericReset\r
- #define xQueueCreateSet MPU_xQueueCreateSet\r
- #define xQueueSelectFromSet MPU_xQueueSelectFromSet\r
- #define xQueueAddToSet MPU_xQueueAddToSet\r
- #define xQueueRemoveFromSet MPU_xQueueRemoveFromSet\r
- #define xQueueGetMutexHolder MPU_xQueueGetMutexHolder\r
-\r
- #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
- #define pvPortMalloc MPU_pvPortMalloc\r
- #define vPortFree MPU_vPortFree\r
- #endif /* configSUPPORT_DYNAMIC_ALLOCATION */\r
-\r
- #define xPortGetFreeHeapSize MPU_xPortGetFreeHeapSize\r
- #define vPortInitialiseBlocks MPU_vPortInitialiseBlocks\r
- #define xPortGetMinimumEverFreeHeapSize MPU_xPortGetMinimumEverFreeHeapSize\r
-\r
- #if configQUEUE_REGISTRY_SIZE > 0\r
- #define vQueueAddToRegistry MPU_vQueueAddToRegistry\r
- #define vQueueUnregisterQueue MPU_vQueueUnregisterQueue\r
+ /*\r
+ * Map standard (non MPU) API functions to equivalents that start\r
+ * "MPU_". This will cause the application code to call the MPU_\r
+ * version, which wraps the non-MPU version with privilege promoting\r
+ * then demoting code, so the kernel code always runs will full\r
+ * privileges.\r
+ */\r
+\r
+ /* Map standard tasks.h API functions to the MPU equivalents. */\r
+ #define xTaskCreate MPU_xTaskCreate\r
+ #define xTaskCreateStatic MPU_xTaskCreateStatic\r
+ #define xTaskCreateRestricted MPU_xTaskCreateRestricted\r
+ #define vTaskAllocateMPURegions MPU_vTaskAllocateMPURegions\r
+ #define vTaskDelete MPU_vTaskDelete\r
+ #define vTaskDelay MPU_vTaskDelay\r
+ #define vTaskDelayUntil MPU_vTaskDelayUntil\r
+ #define xTaskAbortDelay MPU_xTaskAbortDelay\r
+ #define uxTaskPriorityGet MPU_uxTaskPriorityGet\r
+ #define eTaskGetState MPU_eTaskGetState\r
+ #define vTaskGetInfo MPU_vTaskGetInfo\r
+ #define vTaskPrioritySet MPU_vTaskPrioritySet\r
+ #define vTaskSuspend MPU_vTaskSuspend\r
+ #define vTaskResume MPU_vTaskResume\r
+ #define vTaskSuspendAll MPU_vTaskSuspendAll\r
+ #define xTaskResumeAll MPU_xTaskResumeAll\r
+ #define xTaskGetTickCount MPU_xTaskGetTickCount\r
+ #define uxTaskGetNumberOfTasks MPU_uxTaskGetNumberOfTasks\r
+ #define pcTaskGetName MPU_pcTaskGetName\r
+ #define xTaskGetHandle MPU_xTaskGetHandle\r
+ #define uxTaskGetStackHighWaterMark MPU_uxTaskGetStackHighWaterMark\r
+ #define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag\r
+ #define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag\r
+ #define vTaskSetThreadLocalStoragePointer MPU_vTaskSetThreadLocalStoragePointer\r
+ #define pvTaskGetThreadLocalStoragePointer MPU_pvTaskGetThreadLocalStoragePointer\r
+ #define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook\r
+ #define xTaskGetIdleTaskHandle MPU_xTaskGetIdleTaskHandle\r
+ #define uxTaskGetSystemState MPU_uxTaskGetSystemState\r
+ #define vTaskList MPU_vTaskList\r
+ #define vTaskGetRunTimeStats MPU_vTaskGetRunTimeStats\r
+ #define xTaskGenericNotify MPU_xTaskGenericNotify\r
+ #define xTaskNotifyWait MPU_xTaskNotifyWait\r
+ #define ulTaskNotifyTake MPU_ulTaskNotifyTake\r
+\r
+ #define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle\r
+ #define vTaskSetTimeOutState MPU_vTaskSetTimeOutState\r
+ #define xTaskCheckForTimeOut MPU_xTaskCheckForTimeOut\r
+ #define xTaskGetSchedulerState MPU_xTaskGetSchedulerState\r
+\r
+ /* Map standard queue.h API functions to the MPU equivalents. */\r
+ #define xQueueGenericSend MPU_xQueueGenericSend\r
+ #define xQueueGenericReceive MPU_xQueueGenericReceive\r
+ #define uxQueueMessagesWaiting MPU_uxQueueMessagesWaiting\r
+ #define uxQueueSpacesAvailable MPU_uxQueueSpacesAvailable\r
+ #define vQueueDelete MPU_vQueueDelete\r
+ #define xQueueCreateMutex MPU_xQueueCreateMutex\r
+ #define xQueueCreateMutexStatic MPU_xQueueCreateMutexStatic\r
+ #define xQueueCreateCountingSemaphore MPU_xQueueCreateCountingSemaphore\r
+ #define xQueueCreateCountingSemaphoreStatic MPU_xQueueCreateCountingSemaphoreStatic\r
+ #define xQueueGetMutexHolder MPU_xQueueGetMutexHolder\r
+ #define xQueueTakeMutexRecursive MPU_xQueueTakeMutexRecursive\r
+ #define xQueueGiveMutexRecursive MPU_xQueueGiveMutexRecursive\r
+ #define xQueueGenericCreate MPU_xQueueGenericCreate\r
+ #define xQueueGenericCreateStatic MPU_xQueueGenericCreateStatic\r
+ #define xQueueCreateSet MPU_xQueueCreateSet\r
+ #define xQueueAddToSet MPU_xQueueAddToSet\r
+ #define xQueueRemoveFromSet MPU_xQueueRemoveFromSet\r
+ #define xQueueSelectFromSet MPU_xQueueSelectFromSet\r
+ #define xQueueGenericReset MPU_xQueueGenericReset\r
+\r
+ #if( configQUEUE_REGISTRY_SIZE > 0 )\r
+ #define vQueueAddToRegistry MPU_vQueueAddToRegistry\r
+ #define vQueueUnregisterQueue MPU_vQueueUnregisterQueue\r
+ #define pcQueueGetName MPU_pcQueueGetName\r
#endif\r
\r
- #define xTimerCreate MPU_xTimerCreate\r
- #define pvTimerGetTimerID MPU_pvTimerGetTimerID\r
- #define vTimerSetTimerID MPU_vTimerSetTimerID\r
- #define xTimerIsTimerActive MPU_xTimerIsTimerActive\r
- #define xTimerGetTimerDaemonTaskHandle MPU_xTimerGetTimerDaemonTaskHandle\r
- #define xTimerPendFunctionCall MPU_xTimerPendFunctionCall\r
- #define pcTimerGetName MPU_pcTimerGetName\r
- #define xTimerGenericCommand MPU_xTimerGenericCommand\r
-\r
- #define xEventGroupCreate MPU_xEventGroupCreate\r
- #define xEventGroupWaitBits MPU_xEventGroupWaitBits\r
- #define xEventGroupClearBits MPU_xEventGroupClearBits\r
- #define xEventGroupSetBits MPU_xEventGroupSetBits\r
- #define xEventGroupSync MPU_xEventGroupSync\r
- #define vEventGroupDelete MPU_vEventGroupDelete\r
+ /* Map standard timer.h API functions to the MPU equivalents. */\r
+ #define xTimerCreate MPU_xTimerCreate\r
+ #define xTimerCreateStatic MPU_xTimerCreateStatic\r
+ #define pvTimerGetTimerID MPU_pvTimerGetTimerID\r
+ #define vTimerSetTimerID MPU_vTimerSetTimerID\r
+ #define xTimerIsTimerActive MPU_xTimerIsTimerActive\r
+ #define xTimerGetTimerDaemonTaskHandle MPU_xTimerGetTimerDaemonTaskHandle\r
+ #define xTimerPendFunctionCall MPU_xTimerPendFunctionCall\r
+ #define pcTimerGetName MPU_pcTimerGetName\r
+ #define xTimerGetPeriod MPU_xTimerGetPeriod\r
+ #define xTimerGetExpiryTime MPU_xTimerGetExpiryTime\r
+ #define xTimerGenericCommand MPU_xTimerGenericCommand\r
+\r
+ /* Map standard event_group.h API functions to the MPU equivalents. */\r
+ #define xEventGroupCreate MPU_xEventGroupCreate\r
+ #define xEventGroupCreateStatic MPU_xEventGroupCreateStatic\r
+ #define xEventGroupWaitBits MPU_xEventGroupWaitBits\r
+ #define xEventGroupClearBits MPU_xEventGroupClearBits\r
+ #define xEventGroupSetBits MPU_xEventGroupSetBits\r
+ #define xEventGroupSync MPU_xEventGroupSync\r
+ #define vEventGroupDelete MPU_vEventGroupDelete\r
\r
/* Remove the privileged function macro. */\r
#define PRIVILEGED_FUNCTION\r
*\r
* // Starting the scheduler will start the timers running as they have already\r
* // been set into the active state.\r
- * xTaskStartScheduler();\r
+ * vTaskStartScheduler();\r
*\r
* // Should not reach here.\r
* for( ;; );\r
*\r
* // Starting the scheduler will start the timers running as they have already\r
* // been set into the active state.\r
- * xTaskStartScheduler();\r
+ * vTaskStartScheduler();\r
*\r
* // Should not reach here.\r
* for( ;; );\r
*\r
* // Starting the scheduler will start the timer running as it has already\r
* // been set into the active state.\r
- * xTaskStartScheduler();\r
+ * vTaskStartScheduler();\r
*\r
* // Should not reach here.\r
* for( ;; );\r
#include "FreeRTOS.h"\r
#include "task.h"\r
#include "queue.h"\r
+#include "timers.h"\r
+#include "event_groups.h"\r
+#include "mpu_prototypes.h"\r
\r
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE\r
\r
*/\r
static void prvSVCHandler( uint32_t *pulRegisters ) __attribute__(( noinline )) PRIVILEGED_FUNCTION;\r
\r
-/*\r
- * Prototypes for all the MPU wrappers.\r
- */\r
-BaseType_t MPU_xTaskCreateRestricted( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t *pxCreatedTask );\r
-BaseType_t MPU_xTaskCreate( TaskFunction_t pvTaskCode, const char * const pcName, uint16_t usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask );\r
-void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const xRegions );\r
-void MPU_vTaskDelete( TaskHandle_t pxTaskToDelete );\r
-void MPU_vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, TickType_t xTimeIncrement );\r
-void MPU_vTaskDelay( TickType_t xTicksToDelay );\r
-UBaseType_t MPU_uxTaskPriorityGet( TaskHandle_t pxTask );\r
-void MPU_vTaskPrioritySet( TaskHandle_t pxTask, UBaseType_t uxNewPriority );\r
-eTaskState MPU_eTaskGetState( TaskHandle_t pxTask );\r
-void MPU_vTaskSuspend( TaskHandle_t pxTaskToSuspend );\r
-void MPU_vTaskResume( TaskHandle_t pxTaskToResume );\r
-void MPU_vTaskSuspendAll( void );\r
-BaseType_t MPU_xTaskResumeAll( void );\r
-TickType_t MPU_xTaskGetTickCount( void );\r
-UBaseType_t MPU_uxTaskGetNumberOfTasks( void );\r
-void MPU_vTaskList( char *pcWriteBuffer );\r
-void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer );\r
-void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxTagValue );\r
-TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask );\r
-BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );\r
-UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask );\r
-TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void );\r
-BaseType_t MPU_xTaskGetSchedulerState( void );\r
-TaskHandle_t MPU_xTaskGetIdleTaskHandle( void );\r
-UBaseType_t MPU_uxTaskGetSystemState( TaskStatus_t *pxTaskStatusArray, UBaseType_t uxArraySize, uint32_t *pulTotalRunTime );\r
-QueueHandle_t MPU_xQueueGenericCreate( UBaseType_t uxQueueLength, UBaseType_t uxItemSize, uint8_t ucQueueType );\r
-BaseType_t MPU_xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, BaseType_t xCopyPosition );\r
-BaseType_t MPU_xQueueGenericReset( QueueHandle_t pxQueue, BaseType_t xNewQueue );\r
-UBaseType_t MPU_uxQueueMessagesWaiting( const QueueHandle_t pxQueue );\r
-BaseType_t MPU_xQueueGenericReceive( QueueHandle_t pxQueue, void * const pvBuffer, TickType_t xTicksToWait, BaseType_t xJustPeeking );\r
-QueueHandle_t MPU_xQueueCreateMutex( void );\r
-QueueHandle_t MPU_xQueueCreateCountingSemaphore( UBaseType_t uxCountValue, UBaseType_t uxInitialCount );\r
-BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xBlockTime );\r
-BaseType_t MPU_xQueueGiveMutexRecursive( QueueHandle_t xMutex );\r
-void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, char *pcName );\r
-void MPU_vQueueDelete( QueueHandle_t xQueue );\r
-void *MPU_pvPortMalloc( size_t xSize );\r
-void MPU_vPortFree( void *pv );\r
-void MPU_vPortInitialiseBlocks( void );\r
-size_t MPU_xPortGetFreeHeapSize( void );\r
-QueueSetHandle_t MPU_xQueueCreateSet( UBaseType_t uxEventQueueLength );\r
-QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, TickType_t xBlockTimeTicks );\r
-BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );\r
-BaseType_t MPU_xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );\r
-BaseType_t MPU_xQueuePeekFromISR( QueueHandle_t xQueue, void * const pvBuffer );\r
-void* MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore );\r
-\r
/*-----------------------------------------------------------*/\r
\r
/*\r
if( *portMPU_TYPE == portEXPECTED_MPU_TYPE_VALUE )\r
{\r
/* First setup the entire flash for unprivileged read only access. */\r
- *portMPU_REGION_BASE_ADDRESS = ( ( uint32_t ) __FLASH_segment_start__ ) | /* Base address. */\r
+ *portMPU_REGION_BASE_ADDRESS = ( ( uint32_t ) __FLASH_segment_start__ ) | /* Base address. */\r
( portMPU_REGION_VALID ) |\r
( portUNPRIVILEGED_FLASH_REGION );\r
\r
/* Setup the first 16K for privileged only access (even though less\r
than 10K is actually being used). This is where the kernel code is\r
placed. */\r
- *portMPU_REGION_BASE_ADDRESS = ( ( uint32_t ) __FLASH_segment_start__ ) | /* Base address. */\r
+ *portMPU_REGION_BASE_ADDRESS = ( ( uint32_t ) __FLASH_segment_start__ ) | /* Base address. */\r
( portMPU_REGION_VALID ) |\r
( portPRIVILEGED_FLASH_REGION );\r
\r
if( xRegions == NULL )\r
{\r
/* No MPU regions are specified so allow access to all RAM. */\r
- xMPUSettings->xRegion[ 0 ].ulRegionBaseAddress =\r
+ xMPUSettings->xRegion[ 0 ].ulRegionBaseAddress =\r
( ( uint32_t ) __SRAM_segment_start__ ) | /* Base address. */\r
( portMPU_REGION_VALID ) |\r
( portSTACK_REGION );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-BaseType_t MPU_xTaskCreate( TaskFunction_t pvTaskCode, const char * const pcName, uint16_t usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask )\r
-{\r
-BaseType_t xReturn;\r
-BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
+ BaseType_t MPU_xTaskCreate( TaskFunction_t pvTaskCode, const char * const pcName, uint16_t usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask )\r
+ {\r
+ BaseType_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
- xReturn = xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
- return xReturn;\r
-}\r
+ xReturn = xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return xReturn;\r
+ }\r
+#endif /* configSUPPORT_DYNAMIC_ALLOCATION */\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+ TaskHandle_t MPU_xTaskCreateStatic( TaskFunction_t pxTaskCode, const char * const pcName, const uint32_t ulStackDepth, void * const pvParameters, UBaseType_t uxPriority, StackType_t * const puxStackBuffer, StaticTask_t * const pxTaskBuffer )\r
+ {\r
+ TaskHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTaskCreateStatic( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, puxStackBuffer, pxTaskBuffer );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return xReturn;\r
+ }\r
+#endif /* configSUPPORT_STATIC_ALLOCATION */\r
/*-----------------------------------------------------------*/\r
\r
void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const xRegions )\r
#if ( INCLUDE_vTaskDelete == 1 )\r
void MPU_vTaskDelete( TaskHandle_t pxTaskToDelete )\r
{\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
vTaskDelete( pxTaskToDelete );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
#if ( INCLUDE_vTaskDelayUntil == 1 )\r
void MPU_vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, TickType_t xTimeIncrement )\r
{\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
vTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if ( INCLUDE_xTaskAbortDelay == 1 )\r
+ BaseType_t MPU_xTaskAbortDelay( TaskHandle_t xTask )\r
+ {\r
+ BaseType_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTaskAbortDelay( xTask );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return xReturn;\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
#if ( INCLUDE_vTaskDelay == 1 )\r
void MPU_vTaskDelay( TickType_t xTicksToDelay )\r
{\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
vTaskDelay( xTicksToDelay );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
UBaseType_t MPU_uxTaskPriorityGet( TaskHandle_t pxTask )\r
{\r
UBaseType_t uxReturn;\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
uxReturn = uxTaskPriorityGet( pxTask );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
return uxReturn;\r
}\r
#endif\r
#if ( INCLUDE_vTaskPrioritySet == 1 )\r
void MPU_vTaskPrioritySet( TaskHandle_t pxTask, UBaseType_t uxNewPriority )\r
{\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
vTaskPrioritySet( pxTask, uxNewPriority );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
#if ( INCLUDE_eTaskGetState == 1 )\r
eTaskState MPU_eTaskGetState( TaskHandle_t pxTask )\r
{\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
eTaskState eReturn;\r
\r
eReturn = eTaskGetState( pxTask );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
return eReturn;\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
+#if( configUSE_TRACE_FACILITY == 1 )\r
+ void MPU_vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState )\r
+ {\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ vTaskGetInfo( xTask, pxTaskStatus, xGetFreeStackSpace, eState );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
#if ( INCLUDE_xTaskGetIdleTaskHandle == 1 )\r
TaskHandle_t MPU_xTaskGetIdleTaskHandle( void )\r
{\r
TaskHandle_t xReturn;\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
xReturn = xTaskGetIdleTaskHandle();\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
return eReturn;\r
}\r
#endif\r
#if ( INCLUDE_vTaskSuspend == 1 )\r
void MPU_vTaskSuspend( TaskHandle_t pxTaskToSuspend )\r
{\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
vTaskSuspend( pxTaskToSuspend );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
#if ( INCLUDE_vTaskSuspend == 1 )\r
void MPU_vTaskResume( TaskHandle_t pxTaskToResume )\r
{\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
vTaskResume( pxTaskToResume );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
vTaskSuspendAll();\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
}\r
/*-----------------------------------------------------------*/\r
\r
BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
xReturn = xTaskResumeAll();\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
- return xReturn;\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return xReturn;\r
}\r
/*-----------------------------------------------------------*/\r
\r
BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
xReturn = xTaskGetTickCount();\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
return xReturn;\r
}\r
/*-----------------------------------------------------------*/\r
BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
uxReturn = uxTaskGetNumberOfTasks();\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
return uxReturn;\r
}\r
/*-----------------------------------------------------------*/\r
\r
+char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery )\r
+{\r
+char *pcReturn;\r
+BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ pcReturn = pcTaskGetName( xTaskToQuery );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return pcReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+#if ( INCLUDE_xTaskGetHandle == 1 )\r
+ TaskHandle_t MPU_xTaskGetHandle( const char *pcNameToQuery )\r
+ {\r
+ TaskHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTaskGetHandle( pcNameToQuery );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return pcReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
void MPU_vTaskList( char *pcWriteBuffer )\r
{\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer )\r
{\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
vTaskGetRunTimeStats( pcWriteBuffer );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
#if ( configUSE_APPLICATION_TASK_TAG == 1 )\r
void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxTagValue )\r
{\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
vTaskSetApplicationTaskTag( xTask, pxTagValue );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask )\r
{\r
TaskHookFunction_t xReturn;\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
xReturn = xTaskGetApplicationTaskTag( xTask );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
return xReturn;\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
+#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )\r
+ void MPU_vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue )\r
+ {\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ vTaskSetThreadLocalStoragePointer( xTaskToSet, xIndex, pvValue );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )\r
+ void *MPU_pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex )\r
+ {\r
+ void *pvReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ pvReturn = pvTaskGetThreadLocalStoragePointer( xTaskToQuery, xIndex );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return pvReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
#if ( configUSE_APPLICATION_TASK_TAG == 1 )\r
BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter )\r
{\r
BaseType_t xReturn;\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
xReturn = xTaskCallApplicationTaskHook( xTask, pvParameter );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
return xReturn;\r
}\r
#endif\r
UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask )\r
{\r
UBaseType_t uxReturn;\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
uxReturn = uxTaskGetStackHighWaterMark( xTask );\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
return uxReturn;\r
}\r
#endif\r
TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void )\r
{\r
TaskHandle_t xReturn;\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
xReturn = xTaskGetCurrentTaskHandle();\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
return xReturn;\r
}\r
#endif\r
BaseType_t MPU_xTaskGetSchedulerState( void )\r
{\r
BaseType_t xReturn;\r
- BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
xReturn = xTaskGetSchedulerState();\r
- portRESET_PRIVILEGE( xRunningPrivileged );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
return xReturn;\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
-QueueHandle_t MPU_xQueueGenericCreate( UBaseType_t uxQueueLength, UBaseType_t uxItemSize, uint8_t ucQueueType )\r
+void MPU_vTaskSetTimeOutState( TimeOut_t * const pxTimeOut )\r
+{\r
+BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ vTaskSetTimeOutState( pxTimeOut );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+BaseType_t MPU_xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait )\r
{\r
-QueueHandle_t xReturn;\r
+BaseType_t xReturn;\r
BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
- xReturn = xQueueGenericCreate( uxQueueLength, uxItemSize, ucQueueType );\r
+ xReturn = xTaskCheckForTimeOut( pxTimeOut, pxTicksToWait );\r
portRESET_PRIVILEGE( xRunningPrivileged );\r
return xReturn;\r
}\r
/*-----------------------------------------------------------*/\r
\r
+#if( configUSE_TASK_NOTIFICATIONS == 1 )\r
+ BaseType_t MPU_xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue )\r
+ {\r
+ BaseType_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTaskGenericNotify( xTaskToNotify, ulValue, eAction, pulPreviousNotificationValue );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configUSE_TASK_NOTIFICATIONS == 1 )\r
+ BaseType_t MPU_xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait )\r
+ {\r
+ BaseType_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTaskNotifyWait( ulBitsToClearOnEntry, ulBitsToClearOnExit, pulNotificationValue, xTicksToWait );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configUSE_TASK_NOTIFICATIONS == 1 )\r
+ uint32_t MPU_ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait )\r
+ {\r
+ uint32_t ulReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ ulReturn = ulTaskNotifyTake( xClearCountOnExit, xTicksToWait );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return ulReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
+ QueueHandle_t MPU_xQueueGenericCreate( UBaseType_t uxQueueLength, UBaseType_t uxItemSize, uint8_t ucQueueType )\r
+ {\r
+ QueueHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xQueueGenericCreate( uxQueueLength, uxItemSize, ucQueueType );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+ QueueHandle_t MPU_xQueueGenericCreateStatic( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t *pucQueueStorage, StaticQueue_t *pxStaticQueue, const uint8_t ucQueueType )\r
+ {\r
+ QueueHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xQueueGenericCreateStatic( uxQueueLength, uxItemSize, pucQueueStorage, pxStaticQueue, ucQueueType );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
BaseType_t MPU_xQueueGenericReset( QueueHandle_t pxQueue, BaseType_t xNewQueue )\r
{\r
BaseType_t xReturn;\r
}\r
/*-----------------------------------------------------------*/\r
\r
+UBaseType_t MPU_uxQueueSpacesAvailable( const QueueHandle_t xQueue )\r
+{\r
+BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+UBaseType_t uxReturn;\r
+\r
+ uxReturn = uxQueueSpacesAvailable( xQueue );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return uxReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
BaseType_t MPU_xQueueGenericReceive( QueueHandle_t pxQueue, void * const pvBuffer, TickType_t xTicksToWait, BaseType_t xJustPeeking )\r
{\r
BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
}\r
/*-----------------------------------------------------------*/\r
\r
-#if ( configUSE_MUTEXES == 1 )\r
- QueueHandle_t MPU_xQueueCreateMutex( void )\r
+#if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
+ QueueHandle_t MPU_xQueueCreateMutex( const uint8_t ucQueueType )\r
{\r
- QueueHandle_t xReturn;\r
+ QueueHandle_t xReturn;\r
BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
- xReturn = xQueueCreateMutex( queueQUEUE_TYPE_MUTEX );\r
+ xReturn = xQueueCreateMutex( ucQueueType );\r
portRESET_PRIVILEGE( xRunningPrivileged );\r
return xReturn;\r
}\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
-#if configUSE_COUNTING_SEMAPHORES == 1\r
+#if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )\r
+ QueueHandle_t MPU_xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue )\r
+ {\r
+ QueueHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xQueueCreateMutexStatic( ucQueueType, pxStaticQueue );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
QueueHandle_t MPU_xQueueCreateCountingSemaphore( UBaseType_t uxCountValue, UBaseType_t uxInitialCount )\r
{\r
- QueueHandle_t xReturn;\r
+ QueueHandle_t xReturn;\r
BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
xReturn = xQueueCreateCountingSemaphore( uxCountValue, uxInitialCount );\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
+#if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )\r
+\r
+ QueueHandle_t MPU_xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue )\r
+ {\r
+ QueueHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xQueueCreateCountingSemaphoreStatic( uxMaxCount, uxInitialCount, pxStaticQueue );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
#if ( configUSE_MUTEXES == 1 )\r
BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xBlockTime )\r
{\r
/*-----------------------------------------------------------*/\r
\r
#if configQUEUE_REGISTRY_SIZE > 0\r
- void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, char *pcName )\r
+ void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcName )\r
{\r
BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
+#if configQUEUE_REGISTRY_SIZE > 0\r
+ void MPU_vQueueUnregisterQueue( QueueHandle_t xQueue )\r
+ {\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ vQueueUnregisterQueue( xQueue );\r
+\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if configQUEUE_REGISTRY_SIZE > 0\r
+ const char *MPU_pcQueueGetName( QueueHandle_t xQueue )\r
+ {\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+ const char *pcReturn;\r
+\r
+ pcReturn = pcQueueGetName( xQueue );\r
+\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ return pcReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
void MPU_vQueueDelete( QueueHandle_t xQueue )\r
{\r
BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
\r
return xReturn;\r
}\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 ) )\r
+ TimerHandle_t MPU_xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction )\r
+ {\r
+ TimerHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTimerCreate( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 ) )\r
+ TimerHandle_t MPU_xTimerCreateStatic( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction, StaticTimer_t *pxTimerBuffer )\r
+ {\r
+ TimerHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTimerCreateStatic( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction, pxTimerBuffer );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configUSE_TIMERS == 1 )\r
+ void *MPU_pvTimerGetTimerID( const TimerHandle_t xTimer )\r
+ {\r
+ void * pvReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ pvReturn = pvTimerGetTimerID( xTimer );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return pvReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configUSE_TIMERS == 1 )\r
+ void MPU_vTimerSetTimerID( TimerHandle_t xTimer, void *pvNewID )\r
+ {\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ vTimerSetTimerID( xTimer, pvNewID );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configUSE_TIMERS == 1 )\r
+ BaseType_t MPU_xTimerIsTimerActive( TimerHandle_t xTimer )\r
+ {\r
+ BaseType_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTimerIsTimerActive( xTimer );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configUSE_TIMERS == 1 )\r
+ TaskHandle_t MPU_xTimerGetTimerDaemonTaskHandle( void )\r
+ {\r
+ TaskHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTimerGetTimerDaemonTaskHandle();\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )\r
+ BaseType_t MPU_xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, TickType_t xTicksToWait )\r
+ {\r
+ BaseType_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTimerPendFunctionCall( xFunctionToPend, pvParameter1, ulParameter2, xTicksToWait );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configUSE_TIMERS == 1 )\r
+ const char * MPU_pcTimerGetName( TimerHandle_t xTimer )\r
+ {\r
+ const char * pcReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ pcReturn = pcTimerGetName( xTimer );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return pcReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configUSE_TIMERS == 1 )\r
+ TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer )\r
+ {\r
+ TickType_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTimerGetPeriod( xTimer );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configUSE_TIMERS == 1 )\r
+ TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer )\r
+ {\r
+ TickType_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTimerGetExpiryTime( xTimer );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configUSE_TIMERS == 1 )\r
+ BaseType_t MPU_xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait )\r
+ {\r
+ BaseType_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xTimerGenericCommand( xTimer, xCommandID, xOptionalValue, pxHigherPriorityTaskWoken, xTicksToWait );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
+ EventGroupHandle_t MPU_xEventGroupCreate( void )\r
+ {\r
+ EventGroupHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xEventGroupCreate();\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+ EventGroupHandle_t MPU_xEventGroupCreateStatic( StaticEventGroup_t *pxEventGroupBuffer )\r
+ {\r
+ EventGroupHandle_t xReturn;\r
+ BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xEventGroupCreateStatic( pxEventGroupBuffer );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+EventBits_t MPU_xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait )\r
+{\r
+EventBits_t xReturn;\r
+BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xEventGroupWaitBits( xEventGroup, uxBitsToWaitFor, xClearOnExit, xWaitForAllBits, xTicksToWait );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear )\r
+{\r
+EventBits_t xReturn;\r
+BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xEventGroupClearBits( xEventGroup, uxBitsToClear );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet )\r
+{\r
+EventBits_t xReturn;\r
+BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xEventGroupSetBits( xEventGroup, uxBitsToSet );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait )\r
+{\r
+EventBits_t xReturn;\r
+BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ xReturn = xEventGroupSync( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void MPU_vEventGroupDelete( EventGroupHandle_t xEventGroup )\r
+{\r
+BaseType_t xRunningPrivileged = prvRaisePrivilege();\r
+\r
+ vEventGroupDelete( xEventGroup );\r
+ portRESET_PRIVILEGE( xRunningPrivileged );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+\r
+\r
+\r
\r
/* Functions that the application writer wants to execute in privileged mode\r
can be defined in application_defined_privileged_functions.h. The functions\r
}\r
}\r
\r
- /* Will only get here if xTaskStartScheduler() was called with the CPU in\r
+ /* Will only get here if vTaskStartScheduler() was called with the CPU in\r
a non-privileged mode or the binary point register was not set to its lowest\r
possible value. prvTaskExitError() is referenced to prevent a compiler\r
warning about it being defined but not referenced in the case that the user\r
vPortRestoreTaskContext();\r
}\r
\r
- /* Will only get here if xTaskStartScheduler() was called with the CPU in\r
+ /* Will only get here if vTaskStartScheduler() was called with the CPU in\r
a non-privileged mode or the binary point register was not set to its lowest\r
possible value. prvTaskExitError() is referenced to prevent a compiler\r
warning about it being defined but not referenced in the case that the user\r
vPortRestoreTaskContext();\r
}\r
\r
- /* Will only get here if xTaskStartScheduler() was called with the CPU in\r
+ /* Will only get here if vTaskStartScheduler() was called with the CPU in\r
a non-privileged mode or the binary point register was not set to its lowest\r
possible value. */\r
return 0;\r
}\r
}\r
\r
- /* Will only get here if xTaskStartScheduler() was called with the CPU in\r
+ /* Will only get here if vTaskStartScheduler() was called with the CPU in\r
a non-privileged mode or the binary point register was not set to its lowest\r
possible value. */\r
return 0;\r
vPortRestoreTaskContext();\r
}\r
\r
- /* Will only get here if xTaskStartScheduler() was called with the CPU in\r
+ /* Will only get here if vTaskStartScheduler() was called with the CPU in\r
a non-privileged mode or the binary point register was not set to its lowest\r
possible value. prvTaskExitError() is referenced to prevent a compiler\r
warning about it being defined but not referenced in the case that the user\r
#include "FreeRTOSConfig.h"\r
#include "ISR_Support.h"\r
\r
-\r
.extern pxCurrentTCB\r
.extern vTaskSwitchContext\r
.extern vPortIncrementTick\r