]> git.sur5r.net Git - freertos/blob - Source/portable/WizC/PIC18/Install.bat
Start to re-arrange files to include FreeRTOS+ in main download.
[freertos] / Source / portable / WizC / PIC18 / Install.bat
1 REM/*\r
2 REM    FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.\r
3 REM\r
4 REM\r
5 REM    ***************************************************************************\r
6 REM     *                                                                       *\r
7 REM     *    FreeRTOS tutorial books are available in pdf and paperback.        *\r
8 REM     *    Complete, revised, and edited pdf reference manuals are also       *\r
9 REM     *    available.                                                         *\r
10 REM     *                                                                       *\r
11 REM     *    Purchasing FreeRTOS documentation will not only help you, by       *\r
12 REM     *    ensuring you get running as quickly as possible and with an        *\r
13 REM     *    in-depth knowledge of how to use FreeRTOS, it will also help       *\r
14 REM     *    the FreeRTOS project to continue with its mission of providing     *\r
15 REM     *    professional grade, cross platform, de facto standard solutions    *\r
16 REM     *    for microcontrollers - completely free of charge!                  *\r
17 REM     *                                                                       *\r
18 REM     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *\r
19 REM     *                                                                       *\r
20 REM     *    Thank you for using FreeRTOS, and thank you for your support!      *\r
21 REM     *                                                                       *\r
22 REM    ***************************************************************************\r
23 REM\r
24 REM\r
25 REM    This file is part of the FreeRTOS distribution.\r
26 REM\r
27 REM    FreeRTOS is free softwareREM you can redistribute it and/or modify it under\r
28 REM    the terms of the GNU General Public License (version 2) as published by the\r
29 REM    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
30 REM    >>>NOTE<<< The modification to the GPL is included to allow you to\r
31 REM    distribute a combined work that includes FreeRTOS without being obliged to\r
32 REM    provide the source code for proprietary components outside of the FreeRTOS\r
33 REM    kernel.  FreeRTOS is distributed in the hope that it will be useful, but\r
34 REM    WITHOUT ANY WARRANTYREM without even the implied warranty of MERCHANTABILITY\r
35 REM    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
36 REM    more details. You should have received a copy of the GNU General Public\r
37 REM    License and the FreeRTOS license exception along with FreeRTOSREM if not it\r
38 REM    can be viewed here: http://www.freertos.org/a00114.html and also obtained\r
39 REM    by writing to Richard Barry, contact details for whom are available on the\r
40 REM    FreeRTOS WEB site.\r
41 REM\r
42 REM    1 tab == 4 spaces!\r
43 REM\r
44 REM    http://www.FreeRTOS.org - Documentation, latest information, license and\r
45 REM    contact details.\r
46 REM\r
47 REM    http://www.SafeRTOS.com - A version that is certified for use in safety\r
48 REM    critical systems.\r
49 REM\r
50 REM    http://www.OpenRTOS.com - Commercial support, development, porting,\r
51 REM    licensing and training services.\r
52 REM*/\r
53 \r
54 \r
55 @echo off\r
56 cls\r
57 \r
58 SET PACKAGENAME=the FreeRTOS port for fedC and wizC\r
59 \r
60 echo.\r
61 echo Hello, I'm the installationscript for %PACKAGENAME%.\r
62 echo.\r
63 \r
64 :CHECKFEDC\r
65   set FED=C:\Program Files\FED\PIC_C\r
66   echo.\r
67   echo I'm checking your system for fedC\r
68   if not exist "%FED%" goto NOFEDC\r
69   echo YES, I found a fedC-installation!\r
70   goto FOUNDFED\r
71 :NOFEDC\r
72   echo I could not find a fedC-installation.\r
73 \r
74 \r
75 :CHECKWIZC\r
76   set FED=C:\Program Files\FED\PIXIE\r
77   echo.\r
78   echo I'm checking your system for wizC\r
79   if not exist "%FED%" goto NOWIZC\r
80   echo YES, I found a wizC-installation!\r
81   goto FOUNDFED\r
82 :noWIZC\r
83   echo I could not find a wizC-installation.\r
84 \r
85 \r
86 :ERROR\r
87   echo.\r
88   echo.\r
89   echo I could not find a FED C-compiler installation on your system.\r
90   echo.\r
91   echo Perhaps I got confused because you installed fedC or wizC in a non-default directory.\r
92   echo If this is the case, please change the path at the top of this install-script.\r
93   echo After that rerun the script and I will be happy to try again.\r
94   echo.\r
95   goto ENDIT\r
96 \r
97 \r
98 :FOUNDFED\r
99   echo.\r
100   echo.\r
101 \r
102   set FEDLIBS=%FED%\Libs\r
103   set FEDLIBSUSER=%FEDLIBS%\LibsUser\r
104 \r
105   if exist "%FEDLIBS%" goto INSTALL\r
106   echo The FED installationdirectory "%FED%"\r
107   echo contains no Libs subdirectory. This is weird!\r
108   echo.\r
109   echo Installation is aborted, sorry...\r
110   goto ENDIT\r
111 \r
112 \r
113 :INSTALL\r
114   echo I am about to install %PACKAGENAME%\r
115   echo into directory %FEDLIBSUSER%\r
116   echo.\r
117   echo   Press 'enter'  to let me do my thing\r
118   echo   Press 'ctrl-c' to stop me\r
119   pause >nul\r
120   echo.\r
121   echo Installing...\r
122 \r
123 \r
124 :RESET_READONLY\r
125   echo.\r
126   echo   Removing ReadOnly attributes\r
127   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Modules\Croutine.c"     >nul\r
128   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Modules\Port.c"         >nul\r
129   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Modules\List.c"         >nul\r
130   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Modules\Queue.c"        >nul\r
131   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Modules\Tasks.c"        >nul\r
132   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Drivers\Tick\Tick.c"    >nul\r
133   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Drivers\Tick\isrTick.c" >nul\r
134   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Include\Portmacro.h"    >nul\r
135   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Include\Croutine.h"     >nul\r
136   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Include\List.h"         >nul\r
137   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Include\Portable.h"     >nul\r
138   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Include\Projdefs.h"     >nul\r
139   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Include\Queue.h"        >nul\r
140   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Include\Semphr.h"       >nul\r
141   attrib -R "%FEDLIBSUSER%\libFreeRTOS\Include\Task.h"         >nul\r
142   attrib -R "%FEDLIBSUSER%\FreeRTOS.h"                         >nul\r
143   echo   Done\r
144 \r
145 :CREATE_DIRECTORIES\r
146   echo.\r
147   echo   Creating directories (if necessary)...\r
148   if not exist "%FEDLIBSUSER%"                          mkdir "%FEDLIBSUSER%"\r
149   if not exist "%FEDLIBSUSER%\libFreeRTOS"              mkdir "%FEDLIBSUSER%\libFreeRTOS"\r
150   if not exist "%FEDLIBSUSER%\libFreeRTOS\Drivers"      mkdir "%FEDLIBSUSER%\libFreeRTOS\Drivers"\r
151   if not exist "%FEDLIBSUSER%\libFreeRTOS\Drivers\Tick" mkdir "%FEDLIBSUSER%\libFreeRTOS\Drivers\Tick"\r
152   if not exist "%FEDLIBSUSER%\libFreeRTOS\Include"      mkdir "%FEDLIBSUSER%\libFreeRTOS\Include"\r
153   if not exist "%FEDLIBSUSER%\libFreeRTOS\Modules"      mkdir "%FEDLIBSUSER%\libFreeRTOS\Modules"\r
154   echo   Done\r
155 \r
156 \r
157   echo.\r
158   echo   Copying Files...\r
159 :COPY_MODULES\r
160   echo     Modules...\r
161   copy /V /Y "Port.c"                      "%FEDLIBSUSER%\libFreeRTOS\Modules\Port.c"         >nul\r
162   copy /V /Y "..\..\..\Croutine.c"         "%FEDLIBSUSER%\libFreeRTOS\Modules\Croutine.c"     >nul\r
163   copy /V /Y "..\..\..\List.c"             "%FEDLIBSUSER%\libFreeRTOS\Modules\List.c"         >nul\r
164   copy /V /Y "..\..\..\Queue.c"            "%FEDLIBSUSER%\libFreeRTOS\Modules\Queue.c"        >nul\r
165   copy /V /Y "..\..\..\Tasks.c"            "%FEDLIBSUSER%\libFreeRTOS\Modules\Tasks.c"        >nul\r
166 \r
167 :COPY_DRIVERS\r
168   echo     Drivers...\r
169   copy /V /Y "Drivers\Tick\Tick.c"         "%FEDLIBSUSER%\libFreeRTOS\Drivers\Tick\Tick.c"    >nul\r
170   copy /V /Y "Drivers\Tick\isrTick.c"      "%FEDLIBSUSER%\libFreeRTOS\Drivers\Tick\isrTick.c" >nul\r
171 \r
172 :COPY_HEADERS\r
173   echo     Headers...\r
174   copy /V /Y "portmacro.h"                 "%FEDLIBSUSER%\libFreeRTOS\Include\Portmacro.h"    >nul\r
175   copy /V /Y "..\..\..\include\Croutine.h" "%FEDLIBSUSER%\libFreeRTOS\Include\Croutine.h"     >nul\r
176   copy /V /Y "..\..\..\include\List.h"     "%FEDLIBSUSER%\libFreeRTOS\Include\List.h"         >nul\r
177   copy /V /Y "..\..\..\include\Portable.h" "%FEDLIBSUSER%\libFreeRTOS\Include\Portable.h"     >nul\r
178   copy /V /Y "..\..\..\include\Projdefs.h" "%FEDLIBSUSER%\libFreeRTOS\Include\Projdefs.h"     >nul\r
179   copy /V /Y "..\..\..\include\Queue.h"    "%FEDLIBSUSER%\libFreeRTOS\Include\Queue.h"        >nul\r
180   copy /V /Y "..\..\..\include\Semphr.h"   "%FEDLIBSUSER%\libFreeRTOS\Include\Semphr.h"       >nul\r
181   copy /V /Y "..\..\..\include\Task.h"     "%FEDLIBSUSER%\libFreeRTOS\Include\Task.h"         >nul\r
182   copy /V /Y "addFreeRTOS.h" + "..\..\..\include\FreeRTOS.h" "%FEDLIBSUSER%\FreeRTOS.h"       >nul\r
183 \r
184 \r
185   echo   Done\r
186 \r
187 \r
188 :SET_READONLY\r
189   echo.\r
190   echo   Setting files to ReadOnly\r
191   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Modules\Port.c"         >nul\r
192   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Modules\Croutine.c"     >nul\r
193   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Modules\List.c"         >nul\r
194   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Modules\Queue.c"        >nul\r
195   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Modules\Tasks.c"        >nul\r
196   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Drivers\Tick\Tick.c"    >nul\r
197   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Drivers\Tick\isrTick.c" >nul\r
198   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Include\Portmacro.h"    >nul\r
199   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Include\Croutine.h"     >nul\r
200   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Include\List.h"         >nul\r
201   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Include\Portable.h"     >nul\r
202   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Include\Projdefs.h"     >nul\r
203   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Include\Queue.h"        >nul\r
204   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Include\Semphr.h"       >nul\r
205   attrib +R "%FEDLIBSUSER%\libFreeRTOS\Include\Task.h"         >nul\r
206   attrib +R "%FEDLIBSUSER%\FreeRTOS.h"                         >nul\r
207   echo   Done\r
208 \r
209 \r
210 :FINISHED\r
211   echo.\r
212   echo The installation of %PACKAGENAME% is completed.\r
213   echo.\r
214   echo Please review the installation instructions as additional libraries\r
215   echo  and fedC/wizC configuration settings may be needed for FreeRTOS\r
216   echo  to function correctly.\r
217 \r
218   goto ENDIT\r
219 \r
220 \r
221 :ENDIT\r
222   echo.\r
223   echo.\r
224   echo Press 'enter' to close this window\r
225   pause >nul\r