]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/CreateProjectDirectoryStructure.bat
Add CreateProjectDirectoryStructure.bat to the SAM4 demo.
[freertos] / FreeRTOS / Demo / CORTEX_M4_ATSAM4S_Atmel_Studio / CreateProjectDirectoryStructure.bat
diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/CreateProjectDirectoryStructure.bat b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/CreateProjectDirectoryStructure.bat
new file mode 100644 (file)
index 0000000..a744b23
--- /dev/null
@@ -0,0 +1,58 @@
+REM This file should be executed from the command line prior to the first\r
+REM build.  It will be necessary to refresh the Eclipse project once the\r
+REM .bat file has been executed (normally just press F5 to refresh).\r
+\r
+REM Copies all the required files from their location within the standard\r
+REM FreeRTOS directory structure to under the Eclipse project directory.\r
+REM This permits the Eclipse project to be used in 'managed' mode and without\r
+REM having to setup any linked resources.\r
+\r
+REM Standard paths\r
+SET FREERTOS_SOURCE=..\..\Source\r
+SET COMMON_SOURCE=..\Common\minimal\r
+SET COMMON_INCLUDE=..\Common\include\r
+\r
+REM Have the files already been copied?\r
+IF EXIST src\asf\thirdparty\FreeRTOS Goto END\r
+\r
+    REM Create the required directory structure.\r
+    MD src\asf\thirdparty\FreeRTOS\r
+    MD src\asf\thirdparty\FreeRTOS\include\r
+    MD src\asf\thirdparty\FreeRTOS\portable\r
+    MD src\asf\thirdparty\FreeRTOS\portable\GCC\r
+    MD src\asf\thirdparty\FreeRTOS\portable\GCC\ARM_CM3\r
+    MD src\asf\thirdparty\FreeRTOS\portable\MemMang    \r
+    MD src\Common-Demo-Source\include\r
+    \r
+    REM Copy the core kernel files into the project directory\r
+    copy %FREERTOS_SOURCE%\tasks.c src\asf\thirdparty\FreeRTOS\r
+    copy %FREERTOS_SOURCE%\queue.c src\asf\thirdparty\FreeRTOS\r
+    copy %FREERTOS_SOURCE%\list.c src\asf\thirdparty\FreeRTOS\r
+    copy %FREERTOS_SOURCE%\timers.c src\asf\thirdparty\FreeRTOS\r
+\r
+    REM Copy the common header files into the project directory\r
+    copy %FREERTOS_SOURCE%\include\*.* src\asf\thirdparty\FreeRTOS\include\r
+    \r
+    REM Copy the portable layer files into the project directory\r
+    copy %FREERTOS_SOURCE%\portable\GCC\ARM_CM3\*.* src\asf\thirdparty\FreeRTOS\portable\GCC\ARM_CM3\r
+    \r
+    REM Copy the memory allocation files into the project directory\r
+    copy %FREERTOS_SOURCE%\portable\MemMang\heap_4.c src\asf\thirdparty\FreeRTOS\portable\MemMang\r
+\r
+    REM Copy the files that define the common demo tasks.\r
+    copy %COMMON_SOURCE%\dynamic.c         src\Common-Demo-Source\r
+    copy %COMMON_SOURCE%\BlockQ.c          src\Common-Demo-Source\r
+    copy %COMMON_SOURCE%\flash_timer.c     src\Common-Demo-Source\r
+    copy %COMMON_SOURCE%\death.c           src\Common-Demo-Source\r
+    copy %COMMON_SOURCE%\blocktim.c        src\Common-Demo-Source\r
+    copy %COMMON_SOURCE%\semtest.c         src\Common-Demo-Source\r
+    copy %COMMON_SOURCE%\PollQ.c           src\Common-Demo-Source\r
+    copy %COMMON_SOURCE%\GenQTest.c        src\Common-Demo-Source\r
+    copy %COMMON_SOURCE%\recmutex.c        src\Common-Demo-Source\r
+    copy %COMMON_SOURCE%\countsem.c        src\Common-Demo-Source\r
+    copy %COMMON_SOURCE%\integer.c         src\Common-Demo-Source\r
+    \r
+    REM Copy the common demo file headers.\r
+    copy %COMMON_INCLUDE%\*.h              src\Common-Demo-Source\include\r
+    \r
+: END\r