Replace the hard coded interrupt priorities with the configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY definitions in the IAR RX port layer.

This commit is contained in:
Richard Barry 2010-09-23 13:39:45 +00:00
parent bdef78d6a2
commit fd5aeffadd
11 changed files with 925 additions and 1516 deletions

View file

@ -93,14 +93,20 @@
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 )
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* The interrupt priority used by the kernel itself for the tick interrupt and
the pended interrupt. This would normally be the lowest priority. */
#define configKERNEL_INTERRUPT_PRIORITY 1
/* The maximum interrupt priority from which FreeRTOS API calls can be made. /*
Interrupts that use a priority above this will not be effected by anything the The interrupt priority used by the kernel itself for the tick interrupt and
kernel is doing. */ the pended interrupt is set by configKERNEL_INTERRUPT_PRIORITY. This would
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4 normally be the lowest priority (1 in this case). The maximum interrupt
priority from which FreeRTOS API calls can be made is set by
configMAX_SYSCALL_INTERRUPT_PRIORITY. Interrupts that use a priority above this
will not be effected by anything the kernel is doing. Interrupts at or below
this priority can use FreeRTOS API functions - but *only* those that end in
"FromISR". Both these constants are defined in 'PriorityDefinitions.h' so they
can also be included in assembly source files.
*/
#include "PriorityDefinitions.h"
/* The peripheral used to generate the tick interrupt is configured as part of /* The peripheral used to generate the tick interrupt is configured as part of
the application code. This constant should be set to the vector number of the the application code. This constant should be set to the vector number of the

View file

@ -0,0 +1,67 @@
/*
FreeRTOS V6.0.6 rc1 - Copyright (C) 2010 Real Time Engineers Ltd.
***************************************************************************
* *
* If you are: *
* *
* + New to FreeRTOS, *
* + Wanting to learn FreeRTOS or multitasking in general quickly *
* + Looking for basic training, *
* + Wanting to improve your FreeRTOS skills and productivity *
* *
* then take a look at the FreeRTOS eBooks and paperbacks *
* *
* "Using the FreeRTOS Real Time Kernel - a Practical Guide" *
* http://www.FreeRTOS.org/Documentation *
* *
* A pdf reference manual is also available. Both are usually delivered *
* to your inbox within 20 minutes to two hours when purchased between 8am *
* and 8pm GMT (although please allow up to 24 hours in case of *
* exceptional circumstances). Thank you for your support! *
* *
***************************************************************************
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
***NOTE*** The exception to the GPL is included to allow you to distribute
a combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
1 tab == 4 spaces!
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef PRIORITY_DEFINITIONS_H
#define PRIORITY_DEFINITIONS_H
/* The interrupt priority used by the kernel itself for the tick interrupt and
the pended interrupt. This would normally be the lowest priority. */
#define configKERNEL_INTERRUPT_PRIORITY 1
/* The maximum interrupt priority from which FreeRTOS API calls can be made.
Interrupts that use a priority above this will not be effected by anything the
kernel is doing. */
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4
#endif /* PRIORITY_DEFINITIONS_H */

File diff suppressed because it is too large Load diff

View file

@ -434,6 +434,7 @@
<option> <option>
<name>AsmIncludePath</name> <name>AsmIncludePath</name>
<state>$TOOLKIT_DIR$\INC\</state> <state>$TOOLKIT_DIR$\INC\</state>
<state>$PROJ_DIR$</state>
</option> </option>
<option> <option>
<name>AsmDefines</name> <name>AsmDefines</name>
@ -1266,6 +1267,7 @@
<option> <option>
<name>AsmIncludePath</name> <name>AsmIncludePath</name>
<state>$TOOLKIT_DIR$\INC\</state> <state>$TOOLKIT_DIR$\INC\</state>
<state>$PROJ_DIR$</state>
</option> </option>
<option> <option>
<name>AsmDefines</name> <name>AsmDefines</name>
@ -2099,6 +2101,7 @@
<option> <option>
<name>AsmIncludePath</name> <name>AsmIncludePath</name>
<state>$TOOLKIT_DIR$\INC\</state> <state>$TOOLKIT_DIR$\INC\</state>
<state>$PROJ_DIR$</state>
</option> </option>
<option> <option>
<name>AsmDefines</name> <name>AsmDefines</name>

View file

@ -1,5 +1,5 @@
[E20] [E20]
TimeConnected=1284472022 TimeConnected=1285248097
ComuniDllSave=84541440 ComuniDllSave=84541440
FfwnsdDllSave=81330176 FfwnsdDllSave=81330176
ChipName=R5F562N8 ChipName=R5F562N8
@ -11,7 +11,7 @@ DebugFlags=0,0
EmulatorMode=0 EmulatorMode=0
NeedInit=1 NeedInit=1
[DebugChecksum] [DebugChecksum]
Checksum=-501542729 Checksum=188492037
[DisAssemblyWindow] [DisAssemblyWindow]
NumStates=_ 1 NumStates=_ 1
State 1=_ 1 State 1=_ 1
@ -31,6 +31,10 @@ UseTrigger=1
TriggerName=main TriggerName=main
LimitSize=0 LimitSize=0
ByteLimit=50 ByteLimit=50
[DriverProfiling]
Enabled=0
Source=2
Graph=0
[Log file] [Log file]
LoggingEnabled=_ 0 LoggingEnabled=_ 0
LogFile=_ "" LogFile=_ ""
@ -38,10 +42,6 @@ Category=_ 0
[TermIOLog] [TermIOLog]
LoggingEnabled=_ 0 LoggingEnabled=_ 0
LogFile=_ "" LogFile=_ ""
[DriverProfiling]
Enabled=0
Source=2
Graph=0
[Breakpoints] [Breakpoints]
Count=0 Count=0
[Monitor Execution] [Monitor Execution]

View file

@ -33,7 +33,7 @@
<Factory>Workspace</Factory> <Factory>Workspace</Factory>
<Session> <Session>
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode></NodeDict></Session> <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS Source</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS Source/Portable Layer</ExpandedNode></NodeDict></Session>
</Tab> </Tab>
</Tabs> </Tabs>
@ -60,7 +60,7 @@
<Top><Row0><Sizes><Toolbar-00a2ab10><key>iaridepm.enu1</key></Toolbar-00a2ab10></Sizes></Row0><Row1><Sizes/></Row1><Row2><Sizes/></Row2></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>706</Bottom><Right>351</Right><x>-2</x><y>-2</y><xscreen>331</xscreen><yscreen>284</yscreen><sizeHorzCX>197024</sizeHorzCX><sizeHorzCY>289206</sizeHorzCY><sizeVertCX>210119</sizeVertCX><sizeVertCY>720978</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>232</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>234</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>238289</sizeHorzCY><sizeVertCX>197024</sizeVertCX><sizeVertCY>289206</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions> <Top><Row0><Sizes><Toolbar-00a2ab40><key>iaridepm.enu1</key></Toolbar-00a2ab40></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>706</Bottom><Right>351</Right><x>-2</x><y>-2</y><xscreen>331</xscreen><yscreen>284</yscreen><sizeHorzCX>197024</sizeHorzCX><sizeHorzCY>289206</sizeHorzCY><sizeVertCX>210119</sizeVertCX><sizeVertCY>720978</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>232</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>234</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>238289</sizeHorzCY><sizeVertCX>197024</sizeVertCX><sizeVertCY>289206</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop> </Desktop>
</Workspace> </Workspace>

View file

@ -93,14 +93,20 @@
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 )
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* The interrupt priority used by the kernel itself for the tick interrupt and
the pended interrupt. This would normally be the lowest priority. */
#define configKERNEL_INTERRUPT_PRIORITY 1
/* The maximum interrupt priority from which FreeRTOS API calls can be made. /*
Interrupts that use a priority above this will not be effected by anything the The interrupt priority used by the kernel itself for the tick interrupt and
kernel is doing. */ the pended interrupt is set by configKERNEL_INTERRUPT_PRIORITY. This would
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4 normally be the lowest priority (1 in this case). The maximum interrupt
priority from which FreeRTOS API calls can be made is set by
configMAX_SYSCALL_INTERRUPT_PRIORITY. Interrupts that use a priority above this
will not be effected by anything the kernel is doing. Interrupts at or below
this priority can use FreeRTOS API functions - but *only* those that end in
"FromISR". Both these constants are defined in 'PriorityDefinitions.h' so they
can also be included in assembly source files.
*/
#include "PriorityDefinitions.h"
/* The peripheral used to generate the tick interrupt is configured as part of /* The peripheral used to generate the tick interrupt is configured as part of
the application code. This constant should be set to the vector number of the the application code. This constant should be set to the vector number of the

View file

@ -0,0 +1,67 @@
/*
FreeRTOS V6.0.6 rc1 - Copyright (C) 2010 Real Time Engineers Ltd.
***************************************************************************
* *
* If you are: *
* *
* + New to FreeRTOS, *
* + Wanting to learn FreeRTOS or multitasking in general quickly *
* + Looking for basic training, *
* + Wanting to improve your FreeRTOS skills and productivity *
* *
* then take a look at the FreeRTOS eBooks and paperbacks *
* *
* "Using the FreeRTOS Real Time Kernel - a Practical Guide" *
* http://www.FreeRTOS.org/Documentation *
* *
* A pdf reference manual is also available. Both are usually delivered *
* to your inbox within 20 minutes to two hours when purchased between 8am *
* and 8pm GMT (although please allow up to 24 hours in case of *
* exceptional circumstances). Thank you for your support! *
* *
***************************************************************************
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
***NOTE*** The exception to the GPL is included to allow you to distribute
a combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
1 tab == 4 spaces!
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef PRIORITY_DEFINITIONS_H
#define PRIORITY_DEFINITIONS_H
/* The interrupt priority used by the kernel itself for the tick interrupt and
the pended interrupt. This would normally be the lowest priority. */
#define configKERNEL_INTERRUPT_PRIORITY 1
/* The maximum interrupt priority from which FreeRTOS API calls can be made.
Interrupts that use a priority above this will not be effected by anything the
kernel is doing. */
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4
#endif /* PRIORITY_DEFINITIONS_H */

View file

@ -434,6 +434,7 @@
<option> <option>
<name>AsmIncludePath</name> <name>AsmIncludePath</name>
<state>$TOOLKIT_DIR$\INC\</state> <state>$TOOLKIT_DIR$\INC\</state>
<state>$PROJ_DIR$</state>
</option> </option>
<option> <option>
<name>AsmDefines</name> <name>AsmDefines</name>
@ -1266,6 +1267,7 @@
<option> <option>
<name>AsmIncludePath</name> <name>AsmIncludePath</name>
<state>$TOOLKIT_DIR$\INC\</state> <state>$TOOLKIT_DIR$\INC\</state>
<state>$PROJ_DIR$</state>
</option> </option>
<option> <option>
<name>AsmDefines</name> <name>AsmDefines</name>
@ -2099,6 +2101,7 @@
<option> <option>
<name>AsmIncludePath</name> <name>AsmIncludePath</name>
<state>$TOOLKIT_DIR$\INC\</state> <state>$TOOLKIT_DIR$\INC\</state>
<state>$PROJ_DIR$</state>
</option> </option>
<option> <option>
<name>AsmDefines</name> <name>AsmDefines</name>

View file

@ -1,5 +1,5 @@
[E20] [E20]
TimeConnected=1284472849 TimeConnected=1285249114
ComuniDllSave=101515264 ComuniDllSave=101515264
FfwnsdDllSave=303235072 FfwnsdDllSave=303235072
ChipName=R5F562N8 ChipName=R5F562N8

View file

@ -3,7 +3,7 @@
<Workspace> <Workspace>
<ConfigDictionary> <ConfigDictionary>
<CurrentConfigs><Project>RTOSDemo/Debug-with-optimisation</Project></CurrentConfigs></ConfigDictionary> <CurrentConfigs><Project>RTOSDemo/Debug</Project></CurrentConfigs></ConfigDictionary>
<Desktop> <Desktop>
<Static> <Static>
<Workspace> <Workspace>
@ -25,7 +25,7 @@
<Windows> <Windows>
<Wnd2> <Wnd0>
<Tabs> <Tabs>
<Tab> <Tab>
<Identity>TabID-10758-3386</Identity> <Identity>TabID-10758-3386</Identity>
@ -33,11 +33,11 @@
<Factory>Workspace</Factory> <Factory>Workspace</Factory>
<Session> <Session>
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode></NodeDict></Session> <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS Source</ExpandedNode></NodeDict></Session>
</Tab> </Tab>
</Tabs> </Tabs>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3> <SelectedTab>0</SelectedTab></Wnd0><Wnd1>
<Tabs> <Tabs>
<Tab> <Tab>
<Identity>TabID-16801-3477</Identity> <Identity>TabID-16801-3477</Identity>
@ -47,7 +47,7 @@
</Tab> </Tab>
<Tab><Identity>TabID-414-15843</Identity><TabName>Breakpoints</TabName><Factory>Breakpoints</Factory></Tab><Tab><Identity>TabID-3320-15993</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs> <Tab><Identity>TabID-414-15843</Identity><TabName>Breakpoints</TabName><Factory>Breakpoints</Factory></Tab><Tab><Identity>TabID-3320-15993</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>
<SelectedTab>0</SelectedTab></Wnd3></Windows> <SelectedTab>0</SelectedTab></Wnd1></Windows>
<Editor> <Editor>
@ -60,7 +60,7 @@
<Top><Row0><Sizes><Toolbar-00a2ab10><key>iaridepm.enu1</key></Toolbar-00a2ab10></Sizes></Row0><Row1><Sizes/></Row1><Row2><Sizes/></Row2></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>706</Bottom><Right>351</Right><x>-2</x><y>-2</y><xscreen>331</xscreen><yscreen>284</yscreen><sizeHorzCX>197024</sizeHorzCX><sizeHorzCY>289206</sizeHorzCY><sizeVertCX>210119</sizeVertCX><sizeVertCY>720978</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>232</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>234</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>238289</sizeHorzCY><sizeVertCX>197024</sizeVertCX><sizeVertCY>289206</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions> <Top><Row0><Sizes><Toolbar-00a2ab40><key>iaridepm.enu1</key></Toolbar-00a2ab40></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>706</Bottom><Right>351</Right><x>-2</x><y>-2</y><xscreen>331</xscreen><yscreen>284</yscreen><sizeHorzCX>197024</sizeHorzCX><sizeHorzCY>289206</sizeHorzCY><sizeVertCX>210119</sizeVertCX><sizeVertCY>720978</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>232</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>234</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>238289</sizeHorzCY><sizeVertCX>197024</sizeVertCX><sizeVertCY>289206</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop> </Desktop>
</Workspace> </Workspace>