Add FreeRTOS-Plus directory.

This commit is contained in:
Richard Barry 2012-08-11 21:34:11 +00:00
parent 7bd5f21ad5
commit f508a5f653
6798 changed files with 134949 additions and 19 deletions

View file

@ -0,0 +1,546 @@
[F29012549]
x=0
y=111
[F15207742]
x=0
y=48
[F26101515]
x=0
y=269
[F28463201]
x=0
y=0
[F20539803]
x=0
y=233
[ProjectGroup]
nFiles=1
FileName0=Demo7.PC
[Project]
nFiles=7
UseAD=0
CompatOpts=0
AutoHead=
IdentifierPrint=0
TreePrint=0
StatementResultPrint=0
SourcePrint=0
spoPrint=0
AsmPrint=0
CaseSens=1
Optimise=45
AProcFreq=40000000
LOptBytes=16
LOptBytesReg=6
TopROM=32767
StackPointer=3839
HeapPointer=3584
HasDoneOptionDialog=1
ASMProcessor=18F4620
UseLinker=0
DEBUGADV=1
Column0=-1
Column1=-1
Column2=259
TabIndex=0
ShowIcons=0
WindowState=0
Top=418
Left=0
Width=339
Height=209
FileType0_Name=main.c
FileType0_FileType=0
FileType0_DoLast=0
FileType1_Name=interrupt.c
FileType1_FileType=0
FileType1_DoLast=0
FileType2_Name=fuses.c
FileType2_FileType=0
FileType2_DoLast=0
FileType3_Name=..\..\Common\Minimal\death.c
FileType3_FileType=0
FileType3_DoLast=0
FileType4_Name=..\..\Common\Minimal\flash.c
FileType4_FileType=0
FileType4_DoLast=0
FileType5_Name=..\serial\serial.c
FileType5_FileType=0
FileType5_DoLast=0
FileType6_Name=..\ParTest\ParTest.c
FileType6_FileType=0
FileType6_DoLast=0
[Debug]
WindowState=0
Top=0
Left=679
Width=338
Height=626
WinNumberIsIndex0=4097
WinNumberIsIndex1=4096
WinNumberIsIndex2=12
WinNumberIsIndex3=9
WinNumberIsIndex4=8
WinNumberIsIndex5=7
WinNumberIsIndex6=5
WinNumberIsIndex7=4
WinNumberIsIndex8=3
WinNumberIsIndex9=2
WinNumberIsIndex10=1
WinNumberIsIndex11=11
WinNumberIsIndex12=0
nWin=13
HType=0
HFreq=1
ScenixTurbo=1
Watchdog=0
LocalVariables=0
DBPort=3970
DBBit=3
UseICD=0
AutoSet=1
DBVars=3824
DBRate=19200
DBSerPort=4
UsePICKey=2
nTabs=4
Tab0=Main
Tab1=Memory
Tab2=Special
Tab3=History
LocalVariablesTop=48
LocalVariablesLeft=615
[Window4097]
aHeight=0
aWidth=0
Height=200
Width=90
isMinimised=0
isVisible=1
ShowBorder=0
ShowCaption=0
Sizeable=0
x=10
y=299
Left=43
Top=131
Group=0
Page=-1
[ExtDev4097]
Type=12
TypeN=Pin Out
Pars0=0
Name=Pin Out : 18F4620
FileName=
Layer=1
Ports0=2
Bit0=6
ConLev0=-1
Ports1=2
Bit1=7
ConLev1=-1
Pars1=0
Pars2=0
[Window4096]
aHeight=0
aWidth=0
Height=121
Width=200
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=10
y=427
Left=127
Top=181
Group=0
Page=-1
[ExtDev4096]
Type=2
TypeN=Terminal
Ports0=2
Bit0=6
ConLev0=-1
Ports1=2
Bit1=7
ConLev1=-1
Pars0=7
Pars1=0
Pars2=0
Name=Terminal
FileName=
Layer=0
[Window12]
aHeight=274
aWidth=732
Height=141
Width=366
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=0
y=38
Left=0
Top=100
Group=0
Page=1
[Window9]
aHeight=250
aWidth=250
Height=247
Width=231
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=0
x=98
y=133
Left=49
Top=149
Group=0
Page=15
[Window8]
aHeight=250
aWidth=250
Height=455
Width=489
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=0
y=1
Left=-159
Top=81
Group=0
Page=8
[Window7]
aHeight=947
aWidth=978
Height=490
Width=489
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=16
y=45
Left=8
Top=104
Group=0
Page=3
[Window5]
aHeight=955
aWidth=490
Height=494
Width=161
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=504
y=42
Left=166
Top=102
Group=0
Page=2
[Window4]
aHeight=957
aWidth=839
Height=495
Width=276
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=2
y=40
Left=0
Top=101
Group=0
Page=2
[Window3]
aHeight=191
aWidth=985
Height=98
Width=325
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=0
y=666
Left=0
Top=425
Group=0
Page=7
[Window2]
aHeight=1000
aWidth=538
Height=518
Width=177
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=462
y=0
Left=152
Top=81
Group=0
Page=4
[Window1]
aHeight=357
aWidth=998
Height=184
Width=329
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=2
y=644
Left=0
Top=414
Group=0
Page=1
[Window11]
aHeight=335
aWidth=821
Height=173
Width=270
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=72
y=571
Left=23
Top=376
Group=0
Page=9
[Window0]
aHeight=472
aWidth=558
Height=244
Width=279
isMinimised=1
isVisible=1
ShowBorder=1
ShowCaption=1
Sizeable=1
x=438
y=42
Left=219
Top=102
Group=0
Page=1
[APPWIZ]
AProcFreq=4000000
nUserTemp=0
Proc=16F84
Left=-72
Top=-3664
Width=750
Heigth=600
nElem=0
[GLOBAL]
LoadCheck=2
SimulateAll=1
[MainWindow]
WindowState=2
Top=-4
Left=-4
Width=1032
Height=748
Update=25000
StopOnError=1
[FindRep]
nTextFind=2
nTextReplace=0
TextFind0=vTaskStartScheduler
TextFind1=switch
[EditWindow]
Tab=0
nFiles=1
nMRU=9
MarginOn=1
MarginType=2
WindowState=0
Top=0
Left=0
Width=680
Height=418
Files0=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\Demo7\main.c
MRU0=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WIZC\Demo7\main.c
Files1=C:\PROGRA~1\FED\PIXIE\Libs\LibCore\Bit16.asm
Files2=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\Demo7\Demo7.rep
MRU1=C:\PROGRA~1\FED\PIXIE\Libs\LibCore\Bit16.asm
MRU2=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\Demo7\Demo7.rep
Files3=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\Tasks.c
MRU3=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\Tasks.c
Files4=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WIZC\Demo7\INTERRUPT.C
Files5=C:\PROGRAM FILES\FED\PIXIE\LIBS\LIBSUSER\LIBFREERTOS\MODULES\LIST_pp.asm
MRU4=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WIZC\Demo7\INTERRUPT.C
MRU5=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WIZC\ParTest\ParTest.c
Files6=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\Tasks.c
MRU6=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\Demo7\Demo7.LST
Files7=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\Port.c
Files8=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Drivers\Tick\Tick.c
MRU7=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\Common\Minimal\death.c
MRU8=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\Common\Minimal\flash.c
Files9=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WIZC\ParTest\ParTest.c
Files10=C:\PROGRAM FILES\FED\PIXIE\LIBS\LIBSUSER\LIBFREERTOS\MODULES\TASKS_pp.asm
Files11=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WIZC\serial\serial.c
Files12=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\Queue.c
Files13=C:\PROGRAM FILES\FED\PIXIE\Libs\LIBSTRINGS\STRINGS16.C
Files14=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\Common\Minimal\flash.c
Files15=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\Demo7\Demo7.LST
Files16=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\serial\isrTxTest.h
Files17=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\serial\isrRxTest.h
Files18=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\list.c
Files19=C:\PROGRAM FILES\FED\PIXIE\LIBS\LIBSUSER\LIBFREERTOS\MODULES\LIST_pp.asm
Files20=C:\Program Files\FED\PIXIE\Libs\LibsUser\libFreeRTOS\Include\portmacro.h
Files21=C:\PROGRAM FILES\FED\PIXIE\LIBS\LIBSUSER\LIBMALLOC\MALLOC_pp.asm
Files22=C:\PROGRAM FILES\FED\PIXIE\Libs\libMem\Mem.c
Files23=C:\PROGRAM FILES\FED\PIXIE\LIBS\LIBMEM\MEM_pp.asm
Files24=C:\PROGRAM FILES\FED\PIXIE\Libs\LIBSTRINGS\STRINGS16.C
Files25=C:\PROGRAM FILES\FED\PIXIE\LIBS\LIBSUSER\LIBFREERTOS\MODULES\PORT_pp.asm
[PinConnections]
nPins=0
[AssCode]
ProcType=18F4620
[Information]
Column0=50
Column1=50
Column2=50
Column3=50
Column4=50
Column5=50
MemoHeight=154
WindowState=0
Top=418
Left=339
Width=339
Height=209
[F29013061]
x=0
y=112
[F27259933]
x=0
y=37
[F27123467]
x=0
y=106
[F30360431]
x=0
y=4990
[F28496481]
x=40
y=51
[F29012805]
x=0
y=111
[F20376480]
x=0
y=1329
[F30090026]
x=43
y=55
[F28479841]
x=0
y=51
[F10478061]
x=0
y=48
[F20009002]
x=0
y=143
[F30090282]
x=0
y=107
[F15568046]
x=0
y=307
[F30362479]
x=0
y=4782
[F20414028]
x=0
y=6476
[F30120750]
x=0
y=0
[F28496519]
x=61
y=3356
[F30165378]
x=0
y=0
[F30427679]
x=0
y=0
[F30394911]
x=0
y=46
[F20441499]
x=0
y=117
[F20460273]
x=0
y=4466
[F20528681]
x=0
y=0
[F20374190]
x=0
y=127
[F10825025]
x=0
y=48
[F15391118]
x=0
y=55
[F15679330]
x=0
y=112
[F20558577]
x=0
y=4736
[F29011525]
x=0
y=145
[F28396641]
x=10
y=9
[F27125515]
x=1
y=93
[F29566334]
x=0
y=0
[F30164510]
x=31
y=41
[F30146592]
x=0
y=65
[F29453097]
x=0
y=165
[F20220814]
x=0
y=366

View file

@ -0,0 +1,118 @@
/*
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and 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 modification 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!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong? *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, training, latest information,
license and contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool.
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
the code with commercial support, indemnification, and middleware, under
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
provide a safety engineered and independently SIL3 certified version under
the SafeRTOS brand: http://www.SafeRTOS.com.
*/
/*
Changes from V3.0.0
+ TickRate reduced to 250Hz.
+ configIDLE_SHOULD_YIELD added.
Changes from V3.0.1
*/
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
/*-----------------------------------------------------------
* Application specific definitions.
*
* These definitions should be adjusted for your particular hardware and
* application requirements.
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION ( 1 )
#define configUSE_IDLE_HOOK ( 0 )
#define configUSE_TICK_HOOK ( 0 )
#define configTICK_RATE_HZ ( 250 )
#define configMAX_PRIORITIES ( 4 )
#define configMINIMAL_STACK_SIZE portMINIMAL_STACK_SIZE
#define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY ( 0 )
#define configUSE_16_BIT_TICKS ( 1 )
#define configIDLE_SHOULD_YIELD ( 1 )
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Set the following definitions to 1 to include the component, or zero
to exclude the component. */
/* Include/exclude the stated API function. */
#define INCLUDE_vTaskPrioritySet ( 0 )
#define INCLUDE_uxTaskPriorityGet ( 0 )
#define INCLUDE_vTaskDelete ( 1 )
#define INCLUDE_vTaskCleanUpResources ( 0 )
#define INCLUDE_vTaskSuspend ( 0 )
#define INCLUDE_vTaskDelayUntil ( 1 )
#define INCLUDE_vTaskDelay ( 1 )
#endif /* FREERTOS_CONFIG_H */

View file

@ -0,0 +1,41 @@
#ifndef _MALLOC_SETTINGS_H
#define _MALLOC_SETTINGS_H
/*********************************************************************
** Title: Dynamic memory (de-)allocation library for wizC.
**
** Author: Marcel van Lieshout
**
** Copyright: (c) 2005, HMCS, Marcel van Lieshout
**
** License: This software is released to the public domain and comes
** without warranty and/or guarantees of any kind. You have
** the right to use, copy, modify and/or (re-)distribute the
** software as long as the reference to the author is
** maintained in the software and a reference to the author
** is included in any documentation of each product in which
** this library (in it's original or in a modified form)
** is used.
*********************************************************************/
/*********************************************************************
** The model to use
*********************************************************************/
//#define MALLOC_SMALL
#define MALLOC_LARGE
/*********************************************************************
** The size of the heap
*********************************************************************/
#define MALLOC_HEAP_SIZE (3200)
/*********************************************************************
** Should released memory be scribbled with 0x55 before releasing it?
*********************************************************************/
//#define MALLOC_SCRIBBLE
/********************************************************************
** Enable Debug-mode?
*********************************************************************/
//#define MALLOC_DEBUG
#endif /* _MALLOC_SETTINGS_H */

View file

@ -0,0 +1,87 @@
/*
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and 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 modification 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!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong? *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, training, latest information,
license and contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool.
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
the code with commercial support, indemnification, and middleware, under
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
provide a safety engineered and independently SIL3 certified version under
the SafeRTOS brand: http://www.SafeRTOS.com.
*/
/*
Changes from V3.0.0
+ Several modules predefined to avoid linker problems
Changes from V3.0.1
*/
#ifndef _memcpy
#define _memcpy 1
#endif
#ifndef _memset
#define _memset 1
#endif
#ifndef _strncpy
#define _strncpy 1
#endif
#pragma wizcpp searchpath <../../Common/Include/>

View file

@ -0,0 +1,92 @@
/*
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and 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 modification 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!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong? *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, training, latest information,
license and contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool.
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
the code with commercial support, indemnification, and middleware, under
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
provide a safety engineered and independently SIL3 certified version under
the SafeRTOS brand: http://www.SafeRTOS.com.
*/
/*
Changes from V3.0.0
Changes from V3.0.1
*/
/*
** Here are the configuration words set. See the PIC datasheet
** and the wizC manual for an explanation
*/
#include <pic.h>
/*
** These fuses are for PIC18F4620
*/
#pragma __config _CONFIG1H,_IESO_OFF_1H & _FCMEN_OFF_1H & _OSC_HSPLL_1H
#pragma __config _CONFIG2L,_BORV_21_2L & _BOREN_SBORDIS_2L & _PWRT_ON_2L
#pragma __config _CONFIG2H,_WDTPS_32768_2H & _WDT_OFF_2H
#pragma __config _CONFIG3H,_MCLRE_ON_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_PORTC_3H
#pragma __config _CONFIG4L,_DEBUG_OFF_4L & _XINST_OFF_4L & _LVP_OFF_4L & _STVREN_OFF_4L
#pragma __config _CONFIG5L,_CP3_OFF_5L & _CP2_OFF_5L & _CP1_OFF_5L & _CP0_OFF_5L
#pragma __config _CONFIG5H,_CPD_OFF_5H & _CPB_OFF_5H
#pragma __config _CONFIG6L,_WRT3_OFF_6L & _WRT2_OFF_6L & _WRT1_OFF_6L & _WRT0_OFF_6L
#pragma __config _CONFIG6H,_WRTD_OFF_6H & _WRTB_OFF_6H & _WRTC_OFF_6H
#pragma __config _CONFIG7L,_EBTR3_OFF_7L & _EBTR2_OFF_7L & _EBTR1_OFF_7L & _EBTR0_OFF_7L
#pragma __config _CONFIG7H,_EBTRB_OFF_7H

View file

@ -0,0 +1,152 @@
/*
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and 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 modification 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!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong? *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, training, latest information,
license and contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool.
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
the code with commercial support, indemnification, and middleware, under
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
provide a safety engineered and independently SIL3 certified version under
the SafeRTOS brand: http://www.SafeRTOS.com.
*/
/*
Changes from V3.0.0
+ Added functionality to only call vTaskSwitchContext() once
when handling multiple interruptsources in a single interruptcall.
+ Included Filenames changed to a .c extension to allow stepping through
code using F7.
Changes from V3.0.1
*/
#include <pic.h>
/* Scheduler include files. */
#include <FreeRTOS.h>
#include <task.h>
#include <queue.h>
static bit uxSwitchRequested;
/*
* Vector for the ISR.
*/
void pointed Interrupt()
{
/*
* Save the context of the current task.
*/
portSAVE_CONTEXT( portINTERRUPTS_FORCED );
/*
* No contextswitch requested yet
*/
uxSwitchRequested = pdFALSE;
/*
* Was the interrupt the FreeRTOS SystemTick?
*/
#include <libFreeRTOS/Drivers/Tick/isrTick.c>
/*******************************************************************************
** DO NOT MODIFY ANYTHING ABOVE THIS LINE
********************************************************************************
** Enter the includes for the ISR-code of the FreeRTOS drivers below.
**
** You cannot use local variables. Alternatives are:
** - Use static variables (Global RAM usage increases)
** - Call a function (Additional cycles are needed)
** - Use unused SFR's (preferred, no additional overhead)
** See "../Serial/isrSerialTx.c" for an example of this last option
*******************************************************************************/
/*
* Was the interrupt a byte being received?
*/
#include "../Serial/isrSerialRx.c"
/*
* Was the interrupt the Tx register becoming empty?
*/
#include "../Serial/isrSerialTx.c"
/*******************************************************************************
** DO NOT MODIFY ANYTHING BELOW THIS LINE
*******************************************************************************/
/*
* Was a contextswitch requested by one of the
* interrupthandlers?
*/
if ( uxSwitchRequested )
{
vTaskSwitchContext();
}
/*
* Restore the context of the (possibly other) task.
*/
portRESTORE_CONTEXT();
#pragma asmline retfie 0
}

View file

@ -0,0 +1,218 @@
/*
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and 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 modification 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!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong? *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, training, latest information,
license and contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool.
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
the code with commercial support, indemnification, and middleware, under
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
provide a safety engineered and independently SIL3 certified version under
the SafeRTOS brand: http://www.SafeRTOS.com.
*/
/*
Changes from V3.0.0
Changes from V3.0.1
*/
/*
* Instead of the normal single demo application, the PIC18F demo is split
* into several smaller programs of which this is the seventh. This enables the
* demo's to be executed on the RAM limited PIC-devices.
*
* The Demo7 project is configured for a PIC18F4620 device. Main.c starts 10
* tasks (including the idle task). See the indicated files in the demo/common
* directory for more information.
*
* demo/common/minimal/flash.c: Creates 3 tasks
* demo/common/minimal/death.c: Creates 1 controltask and
* creates/deletes 4 suicidaltasks
*
* Main.c also creates a check task. This periodically checks that all the
* other tasks are still running and have not experienced any unexpected
* results. If all the other tasks are executing correctly an LED is flashed
* once every mainCHECK_PERIOD milliseconds. If any of the tasks have not
* executed, or report an error, the frequency of the LED flash will increase
* to mainERROR_FLASH_RATE.
*
* On entry to main an 'X' is transmitted. Monitoring the serial port using a
* dumb terminal allows for verification that the device is not continuously
* being reset (no more than one 'X' should be transmitted).
*
* http://www.FreeRTOS.org contains important information on the use of the
* wizC PIC18F port.
*/
/* Scheduler include files. */
#include <FreeRTOS.h>
#include <task.h>
/* Demo app include files. */
#include "death.h"
#include "flash.h"
#include "partest.h"
#include "serial.h"
/* The period between executions of the check task before and after an error
has been discovered. If an error has been discovered the check task runs
more frequently - increasing the LED flash rate. */
#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )
#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )
/* Priority definitions for some of the tasks. Other tasks just use the idle
priority. */
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 )
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 )
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 )
/* Constants required for the communications. Only one character is ever
transmitted. */
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )
#define mainNO_BLOCK ( ( portTickType ) 0 )
#define mainBAUD_RATE ( ( unsigned long ) 57600 )
/*
* The task function for the "Check" task.
*/
static portTASK_FUNCTION_PROTO( vErrorChecks, pvParameters );
/*
* Checks the unique counts of other tasks to ensure they are still operational.
* Returns pdTRUE if an error is detected, otherwise pdFALSE.
*/
static char prvCheckOtherTasksAreStillRunning( void );
/*-----------------------------------------------------------*/
/* Creates the tasks, then starts the scheduler. */
void main( void )
{
/* Initialise the required hardware. */
vParTestInitialise();
/* Send a character so we have some visible feedback of a reset. */
xSerialPortInitMinimal( mainBAUD_RATE, mainCOMMS_QUEUE_LENGTH );
xSerialPutChar( NULL, 'X', mainNO_BLOCK );
/* Start a few of the standard demo tasks found in the demo\common directory. */
vStartLEDFlashTasks( mainLED_FLASH_PRIORITY );
/* Start the check task defined in this file. */
xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* This task has to be created last as it keeps account of the number of tasks
it expects to see running. */
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
/* Start the scheduler. Will never return here. */
vTaskStartScheduler();
while(1) /* This point should never be reached. */
{
}
}
/*-----------------------------------------------------------*/
static portTASK_FUNCTION( vErrorChecks, pvParameters )
{
portTickType xLastCheckTime;
portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
char cErrorOccurred;
/* We need to initialise xLastCheckTime prior to the first call to
vTaskDelayUntil(). */
xLastCheckTime = xTaskGetTickCount();
/* Cycle for ever, delaying then checking all the other tasks are still
operating without error. */
for( ;; )
{
/* Wait until it is time to check the other tasks again. */
vTaskDelayUntil( &xLastCheckTime, xDelayTime );
/* Check all the other tasks are running, and running without ever
having an error. */
cErrorOccurred = prvCheckOtherTasksAreStillRunning();
/* If an error was detected increase the frequency of the LED flash. */
if( cErrorOccurred == pdTRUE )
{
xDelayTime = mainERROR_CHECK_PERIOD;
}
/* Flash the LED for visual feedback. */
vParTestToggleLED( mainCHECK_TASK_LED );
}
}
/*-----------------------------------------------------------*/
static char prvCheckOtherTasksAreStillRunning( void )
{
char cErrorHasOccurred = ( char ) pdFALSE;
if( xIsCreateTaskStillRunning() != pdTRUE )
{
cErrorHasOccurred = ( char ) pdTRUE;
}
return cErrorHasOccurred;
}
/*-----------------------------------------------------------*/