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
+REM build. Copies all the required files from their location within the standard\r
+REM FreeRTOS directory structure to under the Atmel Studio project directory.\r
\r
REM Standard paths\r
SET FREERTOS_SOURCE=..\..\Source\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\asf\thirdparty\FreeRTOS\portable\MemMang\r
MD src\Common-Demo-Source\include\r
- \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
\r
REM Copy the common header files into the project directory\r
copy %FREERTOS_SOURCE%\include\*.* src\asf\thirdparty\FreeRTOS\include\r
- \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
+\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
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
+\r
REM Copy the common demo file headers.\r
copy %COMMON_INCLUDE%\*.h src\Common-Demo-Source\include\r
- \r
+\r
: END\r
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
+REM build. Copies all the required files from their location within the standard\r
+REM FreeRTOS directory structure to under the Atmel Studio project directory.\r
\r
REM Standard paths\r
SET FREERTOS_SOURCE=..\..\Source\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\asf\thirdparty\FreeRTOS\portable\MemMang\r
MD src\Common-Demo-Source\include\r
- \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
\r
REM Copy the common header files into the project directory\r
copy %FREERTOS_SOURCE%\include\*.* src\asf\thirdparty\FreeRTOS\include\r
- \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
+\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
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
+\r
REM Copy the common demo file headers.\r
copy %COMMON_INCLUDE%\*.h src\Common-Demo-Source\include\r
- \r
+\r
: END\r
following variable offsets the AST counter alarm value by the number of AST\r
counts that would typically be missed while the counter was stopped to compensate\r
for the lost time. _RB_ Value needs calculating correctly. */\r
-static uint32_t ulStoppedTimerCompensation = 10 / ( configCPU_CLOCK_HZ / configSYSTICK_CLOCK_HZ );\r
+static uint32_t ulStoppedTimerCompensation = 2 / ( configCPU_CLOCK_HZ / configSYSTICK_CLOCK_HZ );\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
\r
/* Calculate the reload value required to wait xExpectedIdleTime tick\r
- periods. -1 is used because this code will execute part way through one of\r
- the tick periods, and the fraction of a tick period is accounted for\r
- later. */\r
- ulAlarmValue = ( ulAlarmValueForOneTick * ( xExpectedIdleTime - 1UL ) );\r
+ periods. */\r
+ ulAlarmValue = ulAlarmValueForOneTick * xExpectedIdleTime;\r
if( ulAlarmValue > ulStoppedTimerCompensation )\r
{\r
/* Compensate for the fact that the AST is going to be stopped\r
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
+REM build. Copies all the required files from their location within the standard\r
+REM FreeRTOS directory structure to under the Atmel Studio project directory.\r
\r
REM Standard paths\r
SET FREERTOS_SOURCE=..\..\Source\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\asf\thirdparty\FreeRTOS\portable\MemMang\r
MD src\Common-Demo-Source\include\r
- \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
\r
REM Copy the common header files into the project directory\r
copy %FREERTOS_SOURCE%\include\*.* src\asf\thirdparty\FreeRTOS\include\r
- \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
+\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
copy %COMMON_SOURCE%\countsem.c src\Common-Demo-Source\r
copy %COMMON_SOURCE%\integer.c src\Common-Demo-Source\r
copy %COMMON_SOURCE%\QueueSet.c src\Common-Demo-Source\r
- \r
+\r
REM Copy the common demo file headers.\r
copy %COMMON_INCLUDE%\*.h src\Common-Demo-Source\include\r
- \r
+\r
: END\r
}\r
\r
/* Calculate the reload value required to wait xExpectedIdleTime tick\r
- periods. -1 is used because this code will execute part way through\r
- one of the tick periods, and the fraction of a tick period is accounted\r
- for later. */\r
- ulMatchValue = ( ulMatchValueForOneTick * ( xExpectedIdleTime - 1UL ) );\r
+ periods. */\r
+ ulMatchValue = ulMatchValueForOneTick * xExpectedIdleTime;\r
if( ulMatchValue > ulStoppedTimerCompensation )\r
{\r
/* Compensate for the fact that the CMT is going to be stopped\r
}\r
\r
/* Calculate the reload value required to wait xExpectedIdleTime tick\r
- periods. -1 is used because this code will execute part way through\r
- one of the tick periods, and the fraction of a tick period is accounted\r
- for later. */\r
- ulMatchValue = ( ulMatchValueForOneTick * ( xExpectedIdleTime - 1UL ) );\r
+ periods. */\r
+ ulMatchValue = ulMatchValueForOneTick * xExpectedIdleTime;\r
if( ulMatchValue > ulStoppedTimerCompensation )\r
{\r
/* Compensate for the fact that the CMT is going to be stopped\r
}\r
\r
/* Calculate the reload value required to wait xExpectedIdleTime tick\r
- periods. -1 is used because this code will execute part way through\r
- one of the tick periods, and the fraction of a tick period is accounted\r
- for later. */\r
- ulMatchValue = ( ulMatchValueForOneTick * ( xExpectedIdleTime - 1UL ) );\r
+ periods. */\r
+ ulMatchValue = ulMatchValueForOneTick * xExpectedIdleTime;\r
if( ulMatchValue > ulStoppedTimerCompensation )\r
{\r
/* Compensate for the fact that the CMT is going to be stopped\r