mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-10-01 10:24:12 +08:00
Work in progress for backup only.
This commit is contained in:
@@ -7,9 +7,23 @@
|
||||
[GENERAL_DATA]
|
||||
[BREAKPOINTS]
|
||||
[OPEN_WORKSPACE_FILES]
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\FreeRTOSConfig.h"
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\intprg.c"
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\main.c"
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\resetprg.c"
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\vecttbl.c"
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\include\list.h"
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\port.c"
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\portmacro.h"
|
||||
[WORKSPACE_FILE_STATES]
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\main.c" -4 -23 1400 586 1 0
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\FreeRTOSConfig.h" 88 88 1216 383 0 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\intprg.c" 0 0 1132 383 0 7
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\main.c" -4 -23 1316 445 1 0
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\resetprg.c" 110 110 1216 383 0 5
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\vecttbl.c" 154 154 1132 383 0 6
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\include\list.h" 66 66 1216 383 0 1
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\port.c" 0 0 1400 586 0 3
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\portmacro.h" 132 132 1216 383 0 4
|
||||
[LOADED_PROJECTS]
|
||||
"RTOSDemo"
|
||||
[END]
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
FreeRTOS V6.0.1 - Copyright (C) 2009 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 eBook *
|
||||
* *
|
||||
* "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.
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple IO routines to control the LEDs.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo includes. */
|
||||
#include "partest.h"
|
||||
|
||||
#define partestNUM_LEDS ( 6 )
|
||||
#define partestALL_LEDS ( usLEDMasks[ 0 ] | usLEDMasks[ 1 ] | usLEDMasks[ 2 ] | usLEDMasks[ 3 ] | usLEDMasks[ 4 ] | usLEDMasks[ 5 ] )
|
||||
|
||||
static const unsigned short usLEDMasks[ partestNUM_LEDS ] = { ( 1 << 9 ), ( 1 << 11 ), ( 1 << 12 ), ( 1 << 13 ), ( 1 << 14 ), ( 1 << 15 ) };
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
/* Select port functions for PE9 to PE15. */
|
||||
PFC.PECRL3.WORD &= ~partestALL_LEDS;
|
||||
|
||||
/* Turn all LEDs off. */
|
||||
PE.DR.WORD &= ~partestALL_LEDS;
|
||||
|
||||
/* Set all LEDs to output. */
|
||||
PFC.PEIORL.WORD |= partestALL_LEDS;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
if( uxLED < partestNUM_LEDS )
|
||||
{
|
||||
if( xValue )
|
||||
{
|
||||
/* Turn the LED on. */
|
||||
taskENTER_CRITICAL();
|
||||
{
|
||||
PE.DR.WORD |= usLEDMasks[ uxLED ];
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Turn the LED off. */
|
||||
taskENTER_CRITICAL();
|
||||
{
|
||||
PE.DR.WORD &= ~usLEDMasks[ uxLED ];
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
if( uxLED < partestNUM_LEDS )
|
||||
{
|
||||
taskENTER_CRITICAL();
|
||||
{
|
||||
if( ( PE.DR.WORD & usLEDMasks[ uxLED ] ) != 0x00 )
|
||||
{
|
||||
PE.DR.WORD &= ~usLEDMasks[ uxLED ];
|
||||
}
|
||||
else
|
||||
{
|
||||
PE.DR.WORD |= usLEDMasks[ uxLED ];
|
||||
}
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -117,13 +117,20 @@
|
||||
"Object file" "Renesas OptLinker" "Renesas SH Assembler"
|
||||
"Object file" "Renesas OptLinker" "Renesas SH C/C++ Compiler"
|
||||
[PROJECT_FILES]
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\ParTest\ParTest.c" "User" "C source file" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\dbsct.c" "User" "C source file" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\intprg.c" "User" "C source file" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\main.c" "User" "C source file" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\resetprg.c" "User" "C source file" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\vecttbl.c" "User" "C source file" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "User" "C source file|FreeRTOS" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "User" "C source file|FreeRTOS" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\port.c" "User" "C source file|FreeRTOS" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "User" "C source file|FreeRTOS" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "User" "C source file|FreeRTOS" 2
|
||||
[FOLDER]
|
||||
"C source file" "C source file"
|
||||
"C source file|FreeRTOS" ""
|
||||
[GENERAL_DATA_PROJECT]
|
||||
"USE_CUSTOM_LINKAGE_ORDER" "0"
|
||||
[ON_DEMAND_COMPONENTS_LOADED]
|
||||
@@ -132,26 +139,36 @@
|
||||
"SessionSH7216_E10A-USB_SYSTEM__SH" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\SessionSH7216_E10A-USB_SYSTEM__SH.hsf" 0
|
||||
[GENERAL_DATA_SESSION_SessionSH7216_E10A-USB_SYSTEM__SH]
|
||||
[OPTIONS_Debug_SH7216_E10A-USB_SYSTEM__SH_Renesas OptLinker]
|
||||
"Single Shot" "00fbbc001d68ac10" 4
|
||||
"Single Shot" "03711fb24378ac10" 4
|
||||
[OPTIONS_Debug_SH7216_E10A-USB_SYSTEM__SH_Renesas SH Assembler]
|
||||
"Assembly source file" "075d11aefc68ac10" 3
|
||||
"Linkage symbol file" "075d11aefc68ac10" 3
|
||||
"Assembly source file" "05db08d6f178ac10" 3
|
||||
"Linkage symbol file" "05db08d6f178ac10" 3
|
||||
[OPTIONS_Debug_SH7216_E10A-USB_SYSTEM__SH_Renesas SH C/C++ Compiler]
|
||||
"C source file" "075d11aefc68ac10" 2
|
||||
"C++ source file" "075d11aefc68ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\dbsct.c" "075d11aefc68ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\intprg.c" "075d11aefc68ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\main.c" "01407c001d68ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\resetprg.c" "075d11aefc68ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\vecttbl.c" "075d11aefc68ac10" 2
|
||||
"C source file" "0a3b1de34378ac10" 2
|
||||
"C++ source file" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\ParTest\ParTest.c" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\dbsct.c" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\intprg.c" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\main.c" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\resetprg.c" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\vecttbl.c" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\port.c" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "0a3b1de34378ac10" 2
|
||||
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "0a3b1de34378ac10" 2
|
||||
[OPTIONS_Debug_SH7216_E10A-USB_SYSTEM__SH_Renesas SH C/C++ Library Generator]
|
||||
"Single Shot" "075d11aefc68ac10" 1
|
||||
"Single Shot" "05db08d6f178ac10" 1
|
||||
[OPTIONS_Debug_SH7216_E10A-USB_SYSTEM__SH]
|
||||
"" 0
|
||||
"[S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [V|VERSION|7] [S|CPU|SH2AFPU] [S|ENDIAN|BIG] [S|ROUND|ZERO] [B|DENORMALIZE|0] [B|SPEED|0] [B|RUNTIME|1] [B|NEW|0] [B|CTYPE|0] [B|MATH|0] [B|MATHF|0] [B|STDARG|0] [B|STDIO|0] [B|STDLIB|1] [B|STRING|1] [B|IOS|0] [B|COMPLEX|0] [B|CPPSTRING|0] [S|MODE|BUILD/CHANGED]" 1
|
||||
"[V|VERSION|6] [B|DEBUG|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|LIST|0] [B|CHGINCPATH|1] [B|ERRORPATH|1] [S|CPU|SH2AFPU] [S|ENDIAN|BIG] [S|ROUND|ZERO] [B|DENORMALIZE|0]" 3
|
||||
"[V|VERSION|6] [B|OPTIMIZE|0] [B|DEBUG|1] [S|OUTPUT|^"$(CONFIGDIR)\$(PROJECTNAME).abs^"] [S|ROM|(D,R)] [B|LIST|1] [S|LIST|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|FORM|STYPE] [S|OUTPUT|^"$(CONFIGDIR)\$(PROJECTNAME).mot^"] [S|START|DVECTTBL,DINTTBL(000000000)|PResetPRG,PIntPRG(000000800)|P,C,C$BSEC,C$DSEC,D(000001000)|B,R(0FFF80000)|S(0FFFBFC00)]" 4
|
||||
"[V|VERSION|7] [B|DEBUG|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|LIST|0] [B|CHGINCPATH|1] [B|ERRORPATH|1] [S|CPU|SH2AFPU] [S|ENDIAN|BIG] [S|ROUND|ZERO] [B|DENORMALIZE|0]" 2
|
||||
"[V|VERSION|1] [B|DEBUG|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [S|LITERAL|POOL|BRANCH|JUMP|RETURN] [S|DISPSIZE|12] [I|TAB|8] [B|ERRORPATH|1] [B|CHGINCPATH|1] [S|CPU|SH2AFPU] [S|ENDIAN|BIG] [S|ROUND|NEAREST] [B|DENORMALIZE|0] [B|SKIPDEPENDENCY|1]
|
||||
" 3
|
||||
"[V|VERSION|6] [S|FORM|STYPE] [S|BYTE_COUNT_VALUE|FF] [B|DEBUG|1] [S|ROM|(D,R)] [S|CRC|NONE|00000000] [B|LIST|1] [S|LIST|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|SHOW|METHODCUSTOM|] [S|OUTPUT|^"$(CONFIGDIR)\$(PROJECTNAME).mot^"] [I|SPACE|^"FF^"] [B|OPTIMIZE|0] [I|CACHESIZE|000000008] [I|CACHELINE|000000020] [S|START|DVECTTBL,DINTTBL(00)|PResetPRG,PIntPRG(0800)|P,C,C$BSEC,C$DSEC,D(01000)|B,R(0FFF80000)|S(0FFFBFC00)] [B|SKIPDEPENDENCY|1]
|
||||
" 4
|
||||
"[V|VERSION|7] [S|INCLUDE|^"$(PROJDIR)\..\..\..\Source\portable\Renesas\SH2A_FPU^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\.^"|^"$(PROJDIR)\..\..\Common\include^"] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|DEBUG|1] [S|ALIGN4|ALL] [B|TBR|0] [B|STUFF|0] [S|BSS_ORDER|DECLARATION] [S|MXGEN_MEM0|00000000] [S|MXGEN_MEM1|00000000] [B|LIST|0] [S|GBR|AUTO] [S|INLINE|DEFAULT] [I|INLINE|20] [S|MISRA2004_CHECK_RULE|ALL] [S|MISRA2004_RULE|1.1|3.4|4.1|5.2|5.3|5.4|5.5|5.6|5.7|6.1|6.2|6.3|6.4|6.5|7.1|8.1|8.2|8.3|8.5|8.6|8.7|8.8|8.11|8.12|9.2|9.3|10.1|10.2|10.3|10.4|10.5|10.6|11.1|11.2|11.3|11.4|11.5|12.1|12.2|12.3|12.4|12.5|12.6|12.7|12.8|12.9|12.10|12.11|12.12|12.13|13.1|13.2|13.3|13.4|13.7|14.1|14.2|14.3|14.4|14.5|14.6|14.7|14.8|14.9|14.10|15.1|15.2|15.3|15.4|15.5|16.1|16.2|16.3|16.4|16.5|16.6|16.8|16.9|17.3|17.4|17.5|17.6|18.1|18.2|18.4|19.1|20.2|20.4|20.5|20.7|20.8|20.9|20.10|20.11|20.12] [S|MISRA1998_CHECK_RULE|ALL] [S|MISRA1998_RULE|1|5|8|12|13|14|17|18|19|20|21|22|24|28|29|31|32|33|34|35|36|37|38|39|40|42|43|44|45|46|48|49|50|51|53|54|55|56|57|58|59|60|61|62|63|64|65|68|69|70|71|72|73|74|75|76|77|78|79|80|82|83|84|85|99|101|102|103|104|105|106|108|110|111|112|113|115|118|119|121|122|123|124|125|126|127] [S|MISRA_GROUP_FILE_PATH|^"$(PROJDIR)\$(PROJECTNAME).rde^"] [S|OPT_RANGE|ALL] [I|MAX_UNROLL|1] [S|CPU|SH2AFPU] [S|ROUND|NEAREST] [B|CHGINCPATH|1] [B|SKIPDEPENDENCY|1] [N|DEPENDSCAN|1]
|
||||
" 2
|
||||
"[V|VERSION|7] [S|MODE|BUILD/CHANGED] [S|EXISTOUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|RUNTIME|1] [B|STDLIB|1] [B|STRING|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [S|ALIGN4|ALL] [B|STUFF|0] [S|BSS_ORDER|DECLARATION] [S|GBR|AUTO] [S|INLINE|DEFAULT] [I|INLINE|20] [S|OPT_RANGE|ALL] [I|MAX_UNROLL|1] [B|SAVE_CONT_REG|1] [S|CPU|SH2AFPU] [S|ROUND|NEAREST] [B|SKIPDEPENDENCY|1]
|
||||
" 1
|
||||
[EXCLUDED_FILES_Debug_SH7216_E10A-USB_SYSTEM__SH]
|
||||
[LINKAGE_ORDER_Debug_SH7216_E10A-USB_SYSTEM__SH]
|
||||
[GENERAL_DATA_CONFIGURATION_Debug_SH7216_E10A-USB_SYSTEM__SH]
|
||||
|
||||
Binary file not shown.
@@ -12,7 +12,7 @@
|
||||
"SessionSH7216_E10A-USB_SYSTEM__SH"
|
||||
[GENERAL_DATA_PROJECT]
|
||||
[GENERAL_DATA_CONFIGURATION_Debug_SH7216_E10A-USB_SYSTEM__SH]
|
||||
"PROJECT_FILES_MODIFIED_DATA_TAG" "FALSE"
|
||||
"PROJECT_FILES_MODIFIED_DATA_TAG" "TRUE"
|
||||
[SESSIONS_Debug_SH7216_E10A-USB_SYSTEM__SH]
|
||||
"SessionSH7216_E10A-USB_SYSTEM__SH"
|
||||
[GENERAL_DATA_SESSION_SessionSH7216_E10A-USB_SYSTEM__SH]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,160 @@
|
||||
/*
|
||||
FreeRTOS V6.0.1 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
void main(void);
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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 eBook *
|
||||
* *
|
||||
* "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.
|
||||
*/
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#include "partest.h"
|
||||
|
||||
#define mainFRQCR_VALUE ( 0x0303 ) /* Input = 12.5MHz, I Clock = 200MHz, B Clock = 50MHz, P Clock = 50MHz */
|
||||
|
||||
void vApplicationMallocFailedHook( void );
|
||||
void vApplicationIdleHook( void );
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void main(void)
|
||||
{
|
||||
prvSetupHardware();
|
||||
|
||||
vTaskStartScheduler();
|
||||
taskENABLE_INTERRUPTS();
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationMallocFailedHook( void )
|
||||
{
|
||||
/* A call to vPortMalloc() failed, probably during the creation of a task,
|
||||
queue or semaphore. Inspect pxCurrentTCB to find which task is currently
|
||||
executing. */
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationIdleHook( void )
|
||||
{
|
||||
/* Code can be added to the idle task here. This function must *NOT* attempt
|
||||
to block. Also, if the application uses the vTaskDelete() API function then
|
||||
this function must return regularly to ensure the idle task gets a chance to
|
||||
clean up the memory used by deleted tasks. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
volatile unsigned long ul;
|
||||
|
||||
for( ;; )
|
||||
/* Set the CPU and peripheral clocks. */
|
||||
CPG.FRQCR.WORD = mainFRQCR_VALUE;
|
||||
|
||||
/* Wait for the clock to settle. */
|
||||
for( ul = 0; ul < 99; ul++ )
|
||||
{
|
||||
ul++;
|
||||
ul++;
|
||||
nop();
|
||||
}
|
||||
|
||||
/* Initialise the ports used to toggle LEDs. */
|
||||
vParTestInitialise();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationSetupTimerInterrupt( void )
|
||||
{
|
||||
/* The peripheral clock is divided by 32 before feeding the compare match
|
||||
periphersl (CMT). */
|
||||
unsigned long ulCompareMatch = ( configPERIPHERAL_CLOCK_HZ / ( configTICK_RATE_HZ * 32 ) ) + 1;
|
||||
|
||||
/* Configure a timer to create the RTOS tick interrupt. This example uses
|
||||
the compare match timer, but the multi function timer or possible even the
|
||||
watchdog timer could also be used. Ensure vPortTickInterrupt() is installed
|
||||
as the interrupt handler for whichever peripheral is used. */
|
||||
|
||||
/* Turn the CMT on. */
|
||||
STB.CR4.BIT._CMT = 0;
|
||||
|
||||
/* Set the compare match value for the required tick frequency. */
|
||||
CMT0.CMCOR = ( unsigned short ) ulCompareMatch;
|
||||
|
||||
/* Divide the peripheral clock by 32. */
|
||||
CMT0.CMCSR.BIT.CKS = 0x01;
|
||||
|
||||
/* Set the CMT interrupt priority - the interrupt priority must be
|
||||
configKERNEL_INTERRUPT_PRIORITY no matter which peripheral is used to generate
|
||||
the tick interrupt. */
|
||||
INTC.IPR08.BIT._CMT0 = configKERNEL_INTERRUPT_PRIORITY;
|
||||
|
||||
/* Clear the interrupt flag. */
|
||||
CMT0.CMCSR.BIT.CMF = 0;
|
||||
|
||||
/* Enable the compare match interrupt. */
|
||||
CMT0.CMCSR.BIT.CMIE = 0x01;
|
||||
|
||||
/* Start the timer. */
|
||||
CMT.CMSTR.BIT.STR0 = 0x01;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
//#pragma interrupt (vTempISR)
|
||||
//void vTempISR( void );
|
||||
|
||||
void xINT_CMT_CMI0( void )
|
||||
{
|
||||
CMT0.CMCSR.BIT.CMF = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user