mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-21 22:11:57 -04:00
Demo tasks:
- Complete the demo projects for the RX113 using IAR, GCC and Renesas compilers by including a basic UART CLI. Standard demo tasks: - Add some volatile qualifiers to variables in IntQueue.c.
This commit is contained in:
parent
cd42d2c215
commit
f218cf5680
|
@ -195,7 +195,7 @@ an interrupt. */
|
|||
static QueueHandle_t xNormallyEmptyQueue, xNormallyFullQueue;
|
||||
|
||||
/* Variables used to detect a stall in one of the tasks. */
|
||||
static UBaseType_t uxHighPriorityLoops1 = 0, uxHighPriorityLoops2 = 0, uxLowPriorityLoops1 = 0, uxLowPriorityLoops2 = 0;
|
||||
static volatile UBaseType_t uxHighPriorityLoops1 = 0, uxHighPriorityLoops2 = 0, uxLowPriorityLoops1 = 0, uxLowPriorityLoops2 = 0;
|
||||
|
||||
/* Any unexpected behaviour sets xErrorStatus to fail and log the line that
|
||||
caused the error in xErrorLine. */
|
||||
|
@ -207,7 +207,7 @@ static BaseType_t xWasSuspended = pdFALSE;
|
|||
|
||||
/* The values that are sent to the queues. An incremented value is sent each
|
||||
time to each queue. */
|
||||
volatile UBaseType_t uxValueForNormallyEmptyQueue = 0, uxValueForNormallyFullQueue = 0;
|
||||
static volatile UBaseType_t uxValueForNormallyEmptyQueue = 0, uxValueForNormallyFullQueue = 0;
|
||||
|
||||
/* A handle to some of the tasks is required so they can be suspended/resumed. */
|
||||
TaskHandle_t xHighPriorityNormallyEmptyTask1, xHighPriorityNormallyEmptyTask2, xHighPriorityNormallyFullTask1, xHighPriorityNormallyFullTask2;
|
||||
|
@ -718,7 +718,6 @@ static UBaseType_t uxNextOperation = 0;
|
|||
timerNORMALLY_FULL_TX();
|
||||
timerNORMALLY_FULL_TX();
|
||||
timerNORMALLY_FULL_TX();
|
||||
timerNORMALLY_FULL_TX();
|
||||
}
|
||||
|
||||
return xHigherPriorityTaskWoken;
|
||||
|
|
|
@ -123,7 +123,7 @@ be overridden by a definition in FreeRTOSConfig.h. */
|
|||
#define recmuMAX_COUNT ( 10 )
|
||||
|
||||
/* Misc. */
|
||||
#define recmuSHORT_DELAY ( 20 / portTICK_PERIOD_MS )
|
||||
#define recmuSHORT_DELAY ( pdMS_TO_TICKS( 20 ) )
|
||||
#define recmuNO_DELAY ( ( TickType_t ) 0 )
|
||||
#define recmuEIGHT_TICK_DELAY ( ( TickType_t ) 8 )
|
||||
|
||||
|
@ -227,6 +227,10 @@ UBaseType_t ux;
|
|||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
#if( configUSE_PREEMPTION == 0 )
|
||||
taskYIELD();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Having given it back the same number of times as it was taken, we
|
||||
|
@ -344,7 +348,14 @@ static void prvRecursiveMutexPollingTask( void *pvParameters )
|
|||
error will be latched if the polling task has not returned the
|
||||
mutex by the time this fixed period has expired. */
|
||||
vTaskResume( xBlockingTaskHandle );
|
||||
vTaskResume( xControllingTaskHandle );
|
||||
#if( configUSE_PREEMPTION == 0 )
|
||||
taskYIELD();
|
||||
#endif
|
||||
|
||||
vTaskResume( xControllingTaskHandle );
|
||||
#if( configUSE_PREEMPTION == 0 )
|
||||
taskYIELD();
|
||||
#endif
|
||||
|
||||
/* The other two tasks should now have executed and no longer
|
||||
be suspended. */
|
||||
|
@ -433,7 +444,7 @@ static UBaseType_t uxLastControllingCycles = 0, uxLastBlockingCycles = 0, uxLast
|
|||
}
|
||||
else
|
||||
{
|
||||
xReturn = pdTRUE;
|
||||
xReturn = pdPASS;
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_mdata"/>
|
||||
</sections>
|
||||
<sections name=".data">
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1540"/>
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1796"/>
|
||||
<contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_data"/>
|
||||
<contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".data"/>
|
||||
<contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".data.*"/>
|
||||
|
@ -114,11 +114,11 @@
|
|||
<contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_end"/>
|
||||
</sections>
|
||||
<sections name=".ustack" isKeep="true">
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1536"/>
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1792"/>
|
||||
<contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_ustack"/>
|
||||
</sections>
|
||||
<sections name=".istack" isKeep="true">
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="768"/>
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1024"/>
|
||||
<contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_istack"/>
|
||||
</sections>
|
||||
</com.renesas.linkersection.model:SectionContainer>
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
<option id="com.renesas.cdt.core.Compiler.option.deviceShortName.417233635" name="DeviceShortName" superClass="com.renesas.cdt.core.Compiler.option.deviceShortName" value="R5F51138AxFP" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Compiler.option.includeFileDir.1240948637" name="Include file directories" superClass="com.renesas.cdt.core.Compiler.option.includeFileDir" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${TCINSTALL}/rx-elf/optlibinc""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Full_Demo/FreeRTOS-Plus-CLI}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Full_Demo}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/FreeRTOS_Source/portable/GCC/RX100}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/FreeRTOS_Source/include}""/>
|
||||
|
@ -64,18 +65,22 @@
|
|||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.debugLevel.1132150265" name="Debug level" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.debugLevel" value="com.renesas.cdt.rx.HardwareDebug.Compiler.option.debugLevel.level3" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.optimizationLevel.401905200" name="Optimization level" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.optimizationLevel" value="com.renesas.cdt.rx.HardwareDebug.Compiler.option.optimizationLevel.none" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc67.1560609407" name="Do not Inline functions early before doing `-fprofile-generate' instrumentation and real inlining pass (-fno-early-inlining)" superClass="com.renesas.cdt.core.Compiler.option.misc67" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc61.1724789636" name="Disable emitting extra instructions to save and restore the registers around function calls (-fno-caller-saves )" superClass="com.renesas.cdt.core.Compiler.option.misc61" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc25.1990067973" name="Don't put function addresses in registers(-fno-function-cse)" superClass="com.renesas.cdt.core.Compiler.option.misc25" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc63.2081974601" name="Avoid keeping the whole uncompressed sections in memory, only retaining the compressed ones (-flto-compression-level=0)" superClass="com.renesas.cdt.core.Compiler.option.misc63" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.flto.514099016" name="Enable Link-time optimizations (-flto)" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.flto" value="false" valueType="boolean"/>
|
||||
<inputType id="%Base.Compiler.C.InputType.Id.1426723031" name="C Input" superClass="%Base.Compiler.C.InputType.Id"/>
|
||||
<inputType id="Base.Compiler.CPP.InputType.Id.2140325861" name="C++ Input" superClass="Base.Compiler.CPP.InputType.Id"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.assembler.Id.19236880" name="Assembler" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.assembler.Id">
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Assembler.option.dataEndian.2134524462" name="Data Endian" superClass="com.renesas.cdt.rx.HardwareDebug.Assembler.option.dataEndian" value="com.renesas.cdt.rx.HardwareDebug.Assembler.option.dataEndian.little" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Assembler.option.dataEndian.2134524462" name="Data Endian" superClass="com.renesas.cdt.rx.HardwareDebug.Assembler.option.dataEndian" value="Little-endian data" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Assembler.option.includeFileDirectories.1447534623" name="Include file directories" superClass="com.renesas.cdt.core.Assembler.option.includeFileDirectories" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/src""/>
|
||||
</option>
|
||||
<inputType id="%Base.Assembler.inputType.Id.1467040451" name="Assembler InputType" superClass="%Base.Assembler.inputType.Id"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.linker.Id.564427274" name="Linker" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.linker.Id">
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Linker.option.dataEndian.1575779452" name="Data Endian" superClass="com.renesas.cdt.rx.HardwareDebug.Linker.option.dataEndian" value="com.renesas.cdt.rx.HardwareDebug.Linker.option.dataEndian.little" valueType="enumerated"/>
|
||||
<tool command="rx-elf-ld" id="com.renesas.cdt.rx.hardwaredebug.win32.tool.linker.Id.564427274" name="Linker" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.linker.Id">
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Linker.option.dataEndian.1575779452" name="Data Endian" superClass="com.renesas.cdt.rx.HardwareDebug.Linker.option.dataEndian" value="Little-endian data" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.rx.HardwareDebug.Linker.option.archiveSearchDirectories.721512424" name="Archive search directories" superClass="com.renesas.cdt.rx.HardwareDebug.Linker.option.archiveSearchDirectories" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""${CONFIGDIR}""/>
|
||||
<listOptionValue builtIn="false" value=""${TCINSTALL}/lib/gcc/rx-elf/${GCC_VERSION}/no-fpu-libs""/>
|
||||
|
@ -85,25 +90,110 @@
|
|||
<listOptionValue builtIn="false" value="gcc"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Linker.option.userDefinedOptions.1648005936" name="User defined options" superClass="com.renesas.cdt.core.Linker.option.userDefinedOptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-e_PowerON_Reset"/>
|
||||
<listOptionValue builtIn="false" value="-Wl,-e_PowerON_Reset"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Linker.option.linkOrderList.1612883595" name="" superClass="com.renesas.cdt.core.Linker.option.linkOrderList" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="".\src\RTOSDemo.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src\hardware_setup.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src\interrupt_handlers.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src\reset_program.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src\vector_table.o""/>
|
||||
<listOptionValue builtIn="false" value="".\libRTOSDemo.a""/>
|
||||
<listOptionValue builtIn="false" value="".\src/cg_src\r_cg_cgc.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/cg_src\r_cg_cgc_user.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/cg_src\r_cg_hardware_setup.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/cg_src\r_cg_port.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/cg_src\r_cg_port_user.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/cg_src\r_cg_sci.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/cg_src\r_cg_sci_user_GCC.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Renesas_Code\interrupt_handlers.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Renesas_Code\reset_program.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Renesas_Code\vector_table.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\BlockQ.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\EventGroupsDemo.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\GenQTest.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\IntQueue.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\IntSemTest.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\QueueOverwrite.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\TaskNotify.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\TimerDemo.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\blocktim.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\countsem.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\death.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\dynamic.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\flop.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\recmutex.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/Standard_Demo_Tasks\semtest.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo/FreeRTOS-Plus-CLI\FreeRTOS_CLI.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo\IntQueueTimer.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo\RegTest_GCC.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo\Sample-CLI-commands.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo\UARTCommandConsole.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Full_Demo\main_full.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/FreeRTOS_Source/portable/MemMang\heap_4.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/FreeRTOS_Source/portable/GCC/RX100\port.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/FreeRTOS_Source\event_groups.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/FreeRTOS_Source\list.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/FreeRTOS_Source\queue.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/FreeRTOS_Source\tasks.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/FreeRTOS_Source\timers.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src/Blinky_Demo\main_blinky.o""/>
|
||||
<listOptionValue builtIn="false" value="".\src\main.o""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Linker.option.linkOptimizationflto.581799385" name="Enable link-time optimizations (-flto)" superClass="com.renesas.cdt.rx.HardwareDebug.Linker.option.linkOptimizationflto" value="false" valueType="boolean"/>
|
||||
<option command="-nostartfiles" id="com.renesas.cdt.rx.HardwareDebug.Linker.option.linkUsingGcc.1103324850" name="Link using "gcc" command instead of "ld" command" superClass="com.renesas.cdt.rx.HardwareDebug.Linker.option.linkUsingGcc" value="false" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.objcopy.Id.634856905" name="Objcopy" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.objcopy.Id"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="%com.renesas.cdt.rx.hardwaredebug.win32.configuration.Id.485661513.1746000023" name="RegTest_IAR.s" rcbsApplicability="disable" resourcePath="src/Full_Demo/RegTest_IAR.s" toolsToInvoke="com.renesas.cdt.rx.hardwaredebug.win32.tool.assembler.Id.19236880.127535740">
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.assembler.Id.19236880.127535740" name="Assembler" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.assembler.Id.19236880"/>
|
||||
<folderInfo id="%com.renesas.cdt.rx.hardwaredebug.win32.configuration.Id.485661513.702678308" name="/" resourcePath="src/cg_src">
|
||||
<toolChain id="%com.renesas.cdt.rx.hardwaredebug.win32.toolChain.Id.618147174" name="KPIT GNURX-ELF Toolchain" superClass="%com.renesas.cdt.rx.hardwaredebug.win32.toolChain.Id" unusedChildren="">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.rx.hardwaredebug.win32.targetPlatform.Id" osList="win32" superClass="com.renesas.cdt.rx.hardwaredebug.win32.targetPlatform.Id"/>
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.libgen.Id.1112916106" name="Library Generator" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.libgen.Id.2068462930"/>
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.compiler.Id.1945005018" name="Compiler" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.compiler.Id.1424807284">
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.optimizationLevel.312595561" name="Optimization level" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.optimizationLevel" value="com.renesas.cdt.rx.HardwareDebug.Compiler.option.optimizationLevel.speedCodeSize" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc61.1325218931" name="Disable emitting extra instructions to save and restore the registers around function calls (-fno-caller-saves )" superClass="com.renesas.cdt.core.Compiler.option.misc61" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc25.1192094709" name="Don't put function addresses in registers(-fno-function-cse)" superClass="com.renesas.cdt.core.Compiler.option.misc25" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc63.408932603" name="Avoid keeping the whole uncompressed sections in memory, only retaining the compressed ones (-flto-compression-level=0)" superClass="com.renesas.cdt.core.Compiler.option.misc63" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.flto.389571130" name="Enable Link-time optimizations (-flto)" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.flto" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc67.49719833" name="Do not Inline functions early before doing `-fprofile-generate' instrumentation and real inlining pass (-fno-early-inlining)" superClass="com.renesas.cdt.core.Compiler.option.misc67" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.cpuType.556980850" name="CPU type" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.cpuType" value="RX100" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.dataEndian.1624388464" name="Data Endian" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.dataEndian" value="Little-endian data" valueType="enumerated"/>
|
||||
<inputType id="%Base.Compiler.C.InputType.Id.1836594921" name="C Input" superClass="%Base.Compiler.C.InputType.Id"/>
|
||||
<inputType id="Base.Compiler.CPP.InputType.Id.1049685798" name="C++ Input" superClass="Base.Compiler.CPP.InputType.Id"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.assembler.Id.482302878" name="Assembler" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.assembler.Id.19236880">
|
||||
<inputType id="%Base.Assembler.inputType.Id.427384685" name="Assembler InputType" superClass="%Base.Assembler.inputType.Id"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.linker.Id.1153111216" name="Linker" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.linker.Id.564427274"/>
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.objcopy.Id.1747324511" name="Objcopy" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.objcopy.Id.634856905"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="%com.renesas.cdt.rx.hardwaredebug.win32.configuration.Id.485661513.1042285317" name="IntQueue.c" rcbsApplicability="disable" resourcePath="src/Full_Demo/Standard_Demo_Tasks/IntQueue.c" toolsToInvoke="com.renesas.cdt.rx.hardwaredebug.win32.tool.compiler.Id.1424807284.173350745">
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.compiler.Id.1424807284.173350745" name="Compiler" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.compiler.Id.1424807284">
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.cpuType.1173619311" name="CPU type" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.cpuType" value="RX100" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.dataEndian.438635862" name="Data Endian" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.dataEndian" value="Little-endian data" valueType="enumerated"/>
|
||||
<inputType id="%Base.Compiler.C.InputType.Id.1696311581" name="C Input" superClass="%Base.Compiler.C.InputType.Id"/>
|
||||
<inputType id="Base.Compiler.CPP.InputType.Id.393257669" name="C++ Input" superClass="Base.Compiler.CPP.InputType.Id"/>
|
||||
</tool>
|
||||
<tool customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.553315713" name="Resource Custom Build Step">
|
||||
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.1263892143" name="Resource Custom Build Step Input Type">
|
||||
<additionalInput kind="additionalinputdependency"/>
|
||||
</inputType>
|
||||
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.1910448590" name="Resource Custom Build Step Output Type"/>
|
||||
</tool>
|
||||
</fileInfo>
|
||||
<fileInfo id="%com.renesas.cdt.rx.hardwaredebug.win32.configuration.Id.485661513.498883362" name="IntQueueTimer.c" rcbsApplicability="disable" resourcePath="src/Full_Demo/IntQueueTimer.c" toolsToInvoke="com.renesas.cdt.rx.hardwaredebug.win32.tool.compiler.Id.1424807284.820409184">
|
||||
<tool id="com.renesas.cdt.rx.hardwaredebug.win32.tool.compiler.Id.1424807284.820409184" name="Compiler" superClass="com.renesas.cdt.rx.hardwaredebug.win32.tool.compiler.Id.1424807284">
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.optimizationLevel.445152985" name="Optimization level" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.optimizationLevel" value="com.renesas.cdt.rx.HardwareDebug.Compiler.option.optimizationLevel.speedCodeSize" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc61.351049028" name="Disable emitting extra instructions to save and restore the registers around function calls (-fno-caller-saves )" superClass="com.renesas.cdt.core.Compiler.option.misc61" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc25.20109428" name="Don't put function addresses in registers(-fno-function-cse)" superClass="com.renesas.cdt.core.Compiler.option.misc25" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc63.1500858220" name="Avoid keeping the whole uncompressed sections in memory, only retaining the compressed ones (-flto-compression-level=0)" superClass="com.renesas.cdt.core.Compiler.option.misc63" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.flto.1392792373" name="Enable Link-time optimizations (-flto)" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.flto" value="false" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.core.Compiler.option.misc67.832633692" name="Do not Inline functions early before doing `-fprofile-generate' instrumentation and real inlining pass (-fno-early-inlining)" superClass="com.renesas.cdt.core.Compiler.option.misc67" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.cpuType.1973833273" name="CPU type" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.cpuType" value="RX100" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.rx.HardwareDebug.Compiler.option.dataEndian.1233319758" name="Data Endian" superClass="com.renesas.cdt.rx.HardwareDebug.Compiler.option.dataEndian" value="Little-endian data" valueType="enumerated"/>
|
||||
<inputType id="%Base.Compiler.C.InputType.Id.1583671307" name="C Input" superClass="%Base.Compiler.C.InputType.Id"/>
|
||||
<inputType id="Base.Compiler.CPP.InputType.Id.61282871" name="C++ Input" superClass="Base.Compiler.CPP.InputType.Id"/>
|
||||
</tool>
|
||||
</fileInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="Full_Demo/RegTest_IAR.s|cg_src/r_cg_sbrk.h|cg_src/r_cg_sbrk.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry excluding="Full_Demo/RegTest_IAR.s" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
|
|
@ -30,11 +30,26 @@
|
|||
<type>2</type>
|
||||
<locationURI>FREERTOS_ROOT/FreeRTOS/Source</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/Full_Demo/FreeRTOS-Plus-CLI</name>
|
||||
<type>2</type>
|
||||
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/Full_Demo/Sample-CLI-commands.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>2</type>
|
||||
<locationURI>FREERTOS_ROOT/FreeRTOS/Demo/Common/Minimal</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/Full_Demo/UARTCommandConsole.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks/include</name>
|
||||
<type>2</type>
|
||||
|
@ -43,7 +58,7 @@
|
|||
</linkedResources>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1442930329366</id>
|
||||
<id>1443980078370</id>
|
||||
<name></name>
|
||||
<type>10</type>
|
||||
<matcher>
|
||||
|
@ -51,6 +66,42 @@
|
|||
<arguments>1.0-name-matches-false-false-settings</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443980078370</id>
|
||||
<name></name>
|
||||
<type>6</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-RTOSDemo.dep</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443980078380</id>
|
||||
<name></name>
|
||||
<type>6</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-RTOSDemo.ew*</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443980078390</id>
|
||||
<name></name>
|
||||
<type>10</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-Debug</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443979933599</id>
|
||||
<name>src</name>
|
||||
<type>6</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-PriorityDefinitions.h</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442848178229</id>
|
||||
<name>src/FreeRTOS_Source</name>
|
||||
|
@ -60,6 +111,15 @@
|
|||
<arguments>1.0-name-matches-false-false-croutine.c</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443970320129</id>
|
||||
<name>src/cg_src</name>
|
||||
<type>6</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-*_IAR.*</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442848203356</id>
|
||||
<name>src/FreeRTOS_Source/portable</name>
|
||||
|
@ -79,7 +139,34 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849604975</id>
|
||||
<id>1443970649129</id>
|
||||
<name>src/Full_Demo/FreeRTOS-Plus-CLI</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-FreeRTOS_CLI.h</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443970649129</id>
|
||||
<name>src/Full_Demo/FreeRTOS-Plus-CLI</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-*.url</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443970649139</id>
|
||||
<name>src/Full_Demo/FreeRTOS-Plus-CLI</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-FreeRTOS_CLI.c</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443988296032</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -88,7 +175,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849604980</id>
|
||||
<id>1443988296042</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -97,7 +184,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849604984</id>
|
||||
<id>1443988296042</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -106,7 +193,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849604987</id>
|
||||
<id>1443988296042</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -115,7 +202,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849604991</id>
|
||||
<id>1443988296052</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -124,7 +211,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849604996</id>
|
||||
<id>1443988296062</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -133,7 +220,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849605000</id>
|
||||
<id>1443988296062</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -142,7 +229,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849605004</id>
|
||||
<id>1443988296072</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -151,7 +238,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849605009</id>
|
||||
<id>1443988296072</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -160,7 +247,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849605013</id>
|
||||
<id>1443988296082</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -169,7 +256,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849605017</id>
|
||||
<id>1443988296082</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -178,7 +265,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849605021</id>
|
||||
<id>1443988296092</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -187,7 +274,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849605026</id>
|
||||
<id>1443988296102</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -196,16 +283,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849605030</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-TimerDemo.c</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442849605033</id>
|
||||
<id>1443988296102</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<configuration id="%com.renesas.cdt.rx.hardwaredebug.win32.configuration.Id.485661513" name="HardwareDebug">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider class="com.renesas.cdt.common.build.spec.RXGCCBuiltinSpecsDetector" console="false" env-hash="-41386653944825589" id="RXGCCBuiltinSpecsDetector" keep-relative-paths="false" name="Renesas GCCBuildinCompilerSettings" options-hash="-645709713" parameter="rx-elf-gcc -E -P -v -dD ${INPUTS}" prefer-non-shared="true">
|
||||
<provider class="com.renesas.cdt.common.build.spec.RXGCCBuiltinSpecsDetector" console="false" env-hash="-83633861543855079" id="RXGCCBuiltinSpecsDetector" keep-relative-paths="false" name="Renesas GCCBuildinCompilerSettings" options-hash="-645709713" parameter="rx-elf-gcc -E -P -v -dD ${INPUTS}" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="3"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value="C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\RX113-RSK_GCC_e2studio\RTOSDemo\HardwareDebug\RTOSDemo.x"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value="C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\RX100_RX113-RSK_GCC_e2studio_IAR\HardwareDebug\RTOSDemo.x"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value="C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\RX113-RSK_GCC_e2studio\RTOSDemo\HardwareDebug\RTOSDemo.x"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value="C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\RX100_RX113-RSK_GCC_e2studio_IAR\HardwareDebug\RTOSDemo.x"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
|
||||
|
|
|
@ -340,7 +340,7 @@
|
|||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin</file>
|
||||
|
|
|
@ -200,16 +200,16 @@
|
|||
</option>
|
||||
<option>
|
||||
<name>IccOptLevel</name>
|
||||
<state>1</state>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccOptStrategy</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
<state>2</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccOptLevelSlave</name>
|
||||
<state>1</state>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccOptAllowList</name>
|
||||
|
@ -329,6 +329,7 @@
|
|||
<state>$PROJ_DIR$\..\..\Source\portable\IAR\RX100</state>
|
||||
<state>$PROJ_DIR$\..\Common\include</state>
|
||||
<state>$PROJ_DIR$\src\Full_Demo</state>
|
||||
<state>$PROJ_DIR$\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-CLI</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCStdIncCheck</name>
|
||||
|
@ -1936,6 +1937,9 @@
|
|||
<file>
|
||||
<name>$PROJ_DIR$\src\cg_src\r_cg_sci.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\src\cg_src\r_cg_sci_user_IAR.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<group>
|
||||
<name>FreeRTOS_Source</name>
|
||||
|
@ -1972,6 +1976,12 @@
|
|||
</group>
|
||||
<group>
|
||||
<name>Full_Demo</name>
|
||||
<group>
|
||||
<name>FreeRTOS+CLI</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-CLI\FreeRTOS_CLI.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<group>
|
||||
<name>Standard_Demo_Tasks</name>
|
||||
<file>
|
||||
|
@ -2016,9 +2026,6 @@
|
|||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\TaskNotify.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\TimerDemo.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\src\Full_Demo\IntQueueTimer.c</name>
|
||||
|
@ -2029,6 +2036,12 @@
|
|||
<file>
|
||||
<name>$PROJ_DIR$\src\Full_Demo\RegTest_IAR.s</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_CLI_Demos\Sample-CLI-commands.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_CLI_Demos\UARTCommandConsole.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\src\FreeRTOSConfig.h</name>
|
||||
|
|
|
@ -6,20 +6,20 @@
|
|||
<Debug-Log>
|
||||
|
||||
|
||||
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log>
|
||||
<PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log>
|
||||
<Build>
|
||||
<ColumnWidth0>20</ColumnWidth0>
|
||||
<ColumnWidth1>1216</ColumnWidth1>
|
||||
<ColumnWidth2>324</ColumnWidth2>
|
||||
<ColumnWidth3>81</ColumnWidth3>
|
||||
</Build>
|
||||
<PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows></Build>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
|
||||
<Column0>255</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
<Column0>239</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Disassembly>
|
||||
<col-names>
|
||||
|
@ -48,27 +48,11 @@
|
|||
<Windows/>
|
||||
</PreferedWindows>
|
||||
</Register>
|
||||
</Static>
|
||||
<TASKVIEW><Column0>200</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3><Column4>100</Column4><Column5>100</Column5><Column6>100</Column6><Column7>100</Column7><Column8>150</Column8></TASKVIEW></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-6594-3339</Identity>
|
||||
<TabName>Debug Log</TabName>
|
||||
<Factory>Debug-Log</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<Identity>TabID-6072-3348</Identity>
|
||||
<TabName>Build</TabName>
|
||||
<Factory>Build</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd2><Wnd3>
|
||||
<Wnd0>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-17343-3342</Identity>
|
||||
|
@ -76,24 +60,24 @@
|
|||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode></NodeDict></Session>
|
||||
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS_Source</ExpandedNode><ExpandedNode>RTOSDemo/Full_Demo</ExpandedNode><ExpandedNode>RTOSDemo/Full_Demo/Standard_Demo_Tasks</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd3></Windows>
|
||||
<SelectedTab>0</SelectedTab></Wnd0><Wnd2><Tabs><Tab><Identity>TabID-12090-10424</Identity><TabName>Tasks</TabName><Factory>TASKVIEW</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd2></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>111</YPos2><SelStart2>6264</SelStart2><SelEnd2>6264</SelEnd2></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>124</YPos2><SelStart2>6239</SelStart2><SelEnd2>6239</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\Full_Demo\main_full.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>190</YPos2><SelStart2>11132</SelStart2><SelEnd2>11132</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\Common\Minimal\IntQueue.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>697</YPos2><SelStart2>26662</SelStart2><SelEnd2>26662</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>3309</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\Common\Minimal\QueueOverwrite.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>213</YPos2><SelStart2>8115</SelStart2><SelEnd2>8115</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-00C882C0><key>iaridepm.enu1</key></Toolbar-00C882C0></Sizes></Row0><Row1><Sizes><Toolbar-1542CDB8><key>debuggergui.enu1</key></Toolbar-1542CDB8></Sizes></Row1><Row2><Sizes/></Row2></Top><Left><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>718</Bottom><Right>329</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>197024</sizeVertCX><sizeVertCY>731707</sizeVertCY></Rect></Wnd3></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203252</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
<Top><Row0><Sizes><Toolbar-0114A4B8><key>iaridepm.enu1</key></Toolbar-0114A4B8><Toolbar-0CA66D80><key>debuggergui.enu1</key></Toolbar-0CA66D80></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>469</Bottom><Right>329</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>197024</sizeVertCX><sizeVertCY>478659</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>471</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>473</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>480691</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203252</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Project>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[DebugChecksum]
|
||||
Checksum=-948946463
|
||||
Checksum=-1824360014
|
||||
[CodeCoverage]
|
||||
Enabled=_ 0
|
||||
[Stack]
|
||||
|
@ -53,116 +53,116 @@ PinMode=0
|
|||
RegMode=0
|
||||
Endian=0
|
||||
ExtMemBlockNum=55
|
||||
ExtMemEndian_000=0
|
||||
ExtMemCondAccess_000=0
|
||||
ExtMemEndian_001=0
|
||||
ExtMemCondAccess_001=0
|
||||
ExtMemEndian_002=0
|
||||
ExtMemCondAccess_002=0
|
||||
ExtMemEndian_003=0
|
||||
ExtMemCondAccess_003=0
|
||||
ExtMemEndian_004=0
|
||||
ExtMemCondAccess_004=0
|
||||
ExtMemEndian_005=0
|
||||
ExtMemCondAccess_005=0
|
||||
ExtMemEndian_006=0
|
||||
ExtMemCondAccess_006=0
|
||||
ExtMemEndian_007=0
|
||||
ExtMemCondAccess_007=0
|
||||
ExtMemEndian_008=0
|
||||
ExtMemCondAccess_008=0
|
||||
ExtMemEndian_009=0
|
||||
ExtMemCondAccess_009=0
|
||||
ExtMemEndian_010=0
|
||||
ExtMemCondAccess_010=0
|
||||
ExtMemEndian_011=0
|
||||
ExtMemCondAccess_011=0
|
||||
ExtMemEndian_012=0
|
||||
ExtMemCondAccess_012=0
|
||||
ExtMemEndian_013=0
|
||||
ExtMemCondAccess_013=0
|
||||
ExtMemEndian_014=0
|
||||
ExtMemCondAccess_014=0
|
||||
ExtMemEndian_015=0
|
||||
ExtMemCondAccess_015=0
|
||||
ExtMemEndian_016=0
|
||||
ExtMemCondAccess_016=0
|
||||
ExtMemEndian_017=0
|
||||
ExtMemCondAccess_017=0
|
||||
ExtMemEndian_018=0
|
||||
ExtMemCondAccess_018=0
|
||||
ExtMemEndian_019=0
|
||||
ExtMemCondAccess_019=0
|
||||
ExtMemEndian_020=0
|
||||
ExtMemCondAccess_020=0
|
||||
ExtMemEndian_021=0
|
||||
ExtMemCondAccess_021=0
|
||||
ExtMemEndian_022=0
|
||||
ExtMemCondAccess_022=0
|
||||
ExtMemEndian_023=0
|
||||
ExtMemCondAccess_023=0
|
||||
ExtMemEndian_024=0
|
||||
ExtMemCondAccess_024=0
|
||||
ExtMemEndian_025=0
|
||||
ExtMemCondAccess_025=0
|
||||
ExtMemEndian_026=0
|
||||
ExtMemCondAccess_026=0
|
||||
ExtMemEndian_027=0
|
||||
ExtMemCondAccess_027=0
|
||||
ExtMemEndian_028=0
|
||||
ExtMemCondAccess_028=0
|
||||
ExtMemEndian_029=0
|
||||
ExtMemCondAccess_029=0
|
||||
ExtMemEndian_030=0
|
||||
ExtMemCondAccess_030=0
|
||||
ExtMemEndian_031=0
|
||||
ExtMemCondAccess_031=0
|
||||
ExtMemEndian_032=0
|
||||
ExtMemCondAccess_032=0
|
||||
ExtMemEndian_033=0
|
||||
ExtMemCondAccess_033=0
|
||||
ExtMemEndian_034=0
|
||||
ExtMemCondAccess_034=0
|
||||
ExtMemEndian_035=0
|
||||
ExtMemCondAccess_035=0
|
||||
ExtMemEndian_036=0
|
||||
ExtMemCondAccess_036=0
|
||||
ExtMemEndian_037=0
|
||||
ExtMemCondAccess_037=0
|
||||
ExtMemEndian_038=0
|
||||
ExtMemCondAccess_038=0
|
||||
ExtMemEndian_039=0
|
||||
ExtMemCondAccess_039=0
|
||||
ExtMemEndian_040=0
|
||||
ExtMemCondAccess_040=0
|
||||
ExtMemEndian_041=0
|
||||
ExtMemCondAccess_041=0
|
||||
ExtMemEndian_042=0
|
||||
ExtMemCondAccess_042=0
|
||||
ExtMemEndian_043=0
|
||||
ExtMemCondAccess_043=0
|
||||
ExtMemEndian_044=0
|
||||
ExtMemCondAccess_044=0
|
||||
ExtMemEndian_045=0
|
||||
ExtMemCondAccess_045=0
|
||||
ExtMemEndian_046=0
|
||||
ExtMemCondAccess_046=0
|
||||
ExtMemEndian_047=0
|
||||
ExtMemCondAccess_047=0
|
||||
ExtMemEndian_048=0
|
||||
ExtMemCondAccess_048=0
|
||||
ExtMemEndian_049=0
|
||||
ExtMemCondAccess_049=0
|
||||
ExtMemEndian_050=0
|
||||
ExtMemCondAccess_050=0
|
||||
ExtMemEndian_051=0
|
||||
ExtMemCondAccess_051=0
|
||||
ExtMemEndian_052=0
|
||||
ExtMemCondAccess_052=0
|
||||
ExtMemEndian_053=0
|
||||
ExtMemCondAccess_053=0
|
||||
ExtMemEndian_054=0
|
||||
ExtMemCondAccess_054=0
|
||||
ExtMemEndian_000=0
|
||||
ExtMemCondAccess_000=0
|
||||
ExtMemEndian_001=0
|
||||
ExtMemCondAccess_001=0
|
||||
ExtMemEndian_002=0
|
||||
ExtMemCondAccess_002=0
|
||||
ExtMemEndian_003=0
|
||||
ExtMemCondAccess_003=0
|
||||
ExtMemEndian_004=0
|
||||
ExtMemCondAccess_004=0
|
||||
ExtMemEndian_005=0
|
||||
ExtMemCondAccess_005=0
|
||||
ExtMemEndian_006=0
|
||||
ExtMemCondAccess_006=0
|
||||
ExtMemEndian_007=0
|
||||
ExtMemCondAccess_007=0
|
||||
ExtMemEndian_008=0
|
||||
ExtMemCondAccess_008=0
|
||||
ExtMemEndian_009=0
|
||||
ExtMemCondAccess_009=0
|
||||
ExtMemEndian_010=0
|
||||
ExtMemCondAccess_010=0
|
||||
ExtMemEndian_011=0
|
||||
ExtMemCondAccess_011=0
|
||||
ExtMemEndian_012=0
|
||||
ExtMemCondAccess_012=0
|
||||
ExtMemEndian_013=0
|
||||
ExtMemCondAccess_013=0
|
||||
ExtMemEndian_014=0
|
||||
ExtMemCondAccess_014=0
|
||||
ExtMemEndian_015=0
|
||||
ExtMemCondAccess_015=0
|
||||
ExtMemEndian_016=0
|
||||
ExtMemCondAccess_016=0
|
||||
ExtMemEndian_017=0
|
||||
ExtMemCondAccess_017=0
|
||||
ExtMemEndian_018=0
|
||||
ExtMemCondAccess_018=0
|
||||
ExtMemEndian_019=0
|
||||
ExtMemCondAccess_019=0
|
||||
ExtMemEndian_020=0
|
||||
ExtMemCondAccess_020=0
|
||||
ExtMemEndian_021=0
|
||||
ExtMemCondAccess_021=0
|
||||
ExtMemEndian_022=0
|
||||
ExtMemCondAccess_022=0
|
||||
ExtMemEndian_023=0
|
||||
ExtMemCondAccess_023=0
|
||||
ExtMemEndian_024=0
|
||||
ExtMemCondAccess_024=0
|
||||
ExtMemEndian_025=0
|
||||
ExtMemCondAccess_025=0
|
||||
ExtMemEndian_026=0
|
||||
ExtMemCondAccess_026=0
|
||||
ExtMemEndian_027=0
|
||||
ExtMemCondAccess_027=0
|
||||
ExtMemEndian_028=0
|
||||
ExtMemCondAccess_028=0
|
||||
ExtMemEndian_029=0
|
||||
ExtMemCondAccess_029=0
|
||||
ExtMemEndian_030=0
|
||||
ExtMemCondAccess_030=0
|
||||
ExtMemEndian_031=0
|
||||
ExtMemCondAccess_031=0
|
||||
ExtMemEndian_032=0
|
||||
ExtMemCondAccess_032=0
|
||||
ExtMemEndian_033=0
|
||||
ExtMemCondAccess_033=0
|
||||
ExtMemEndian_034=0
|
||||
ExtMemCondAccess_034=0
|
||||
ExtMemEndian_035=0
|
||||
ExtMemCondAccess_035=0
|
||||
ExtMemEndian_036=0
|
||||
ExtMemCondAccess_036=0
|
||||
ExtMemEndian_037=0
|
||||
ExtMemCondAccess_037=0
|
||||
ExtMemEndian_038=0
|
||||
ExtMemCondAccess_038=0
|
||||
ExtMemEndian_039=0
|
||||
ExtMemCondAccess_039=0
|
||||
ExtMemEndian_040=0
|
||||
ExtMemCondAccess_040=0
|
||||
ExtMemEndian_041=0
|
||||
ExtMemCondAccess_041=0
|
||||
ExtMemEndian_042=0
|
||||
ExtMemCondAccess_042=0
|
||||
ExtMemEndian_043=0
|
||||
ExtMemCondAccess_043=0
|
||||
ExtMemEndian_044=0
|
||||
ExtMemCondAccess_044=0
|
||||
ExtMemEndian_045=0
|
||||
ExtMemCondAccess_045=0
|
||||
ExtMemEndian_046=0
|
||||
ExtMemCondAccess_046=0
|
||||
ExtMemEndian_047=0
|
||||
ExtMemCondAccess_047=0
|
||||
ExtMemEndian_048=0
|
||||
ExtMemCondAccess_048=0
|
||||
ExtMemEndian_049=0
|
||||
ExtMemCondAccess_049=0
|
||||
ExtMemEndian_050=0
|
||||
ExtMemCondAccess_050=0
|
||||
ExtMemEndian_051=0
|
||||
ExtMemCondAccess_051=0
|
||||
ExtMemEndian_052=0
|
||||
ExtMemCondAccess_052=0
|
||||
ExtMemEndian_053=0
|
||||
ExtMemCondAccess_053=0
|
||||
ExtMemEndian_054=0
|
||||
ExtMemCondAccess_054=0
|
||||
InputClock=16.000000
|
||||
ICLK=32.000000
|
||||
AllowClkSrcChange=1
|
||||
|
@ -220,16 +220,16 @@ UnspecRange=1
|
|||
ActionState=1
|
||||
[Simulator]
|
||||
Freq=98000000
|
||||
[DataSample]
|
||||
LogEnabled=0
|
||||
GraphEnabled=0
|
||||
ShowTimeLog=1
|
||||
[DriverProfiling]
|
||||
Enabled=0
|
||||
Mode=1
|
||||
Graph=0
|
||||
Symbiont=0
|
||||
Exclusions=
|
||||
[DataSample]
|
||||
LogEnabled=0
|
||||
GraphEnabled=0
|
||||
ShowTimeLog=1
|
||||
[Log file]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
|
@ -238,7 +238,9 @@ Category=_ 0
|
|||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
[Breakpoints]
|
||||
Count=0
|
||||
Bp0=_ "STD_CODE" "{$PROJ_DIR$\src\Full_Demo\main_full.c}.415.4" 1 0 0 0 "" 0 ""
|
||||
Bp1=_ "STD_CODE" "{$PROJ_DIR$\..\Common\Minimal\IntQueue.c}.302.2" 1 0 0 0 "" 0 ""
|
||||
Count=2
|
||||
[Monitor Execution]
|
||||
Leave target running=0
|
||||
Release target=0
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Blinky_Demo</ExpandedNode></NodeDict></Session>
|
||||
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Full_Demo</ExpandedNode><ExpandedNode>RTOSDemo/Full_Demo/Standard_Demo_Tasks</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
|
@ -63,14 +63,14 @@
|
|||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>111</YPos2><SelStart2>6264</SelStart2><SelEnd2>6264</SelEnd2></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>64</YPos2><SelStart2>6239</SelStart2><SelEnd2>6239</SelEnd2></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-00C882C0><key>iaridepm.enu1</key></Toolbar-00C882C0></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>627</Bottom><Right>400</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>239286</sizeVertCX><sizeVertCY>639228</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>313</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>315</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>320122</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203252</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
<Top><Row0><Sizes><Toolbar-0114A4B8><key>iaridepm.enu1</key></Toolbar-0114A4B8></Sizes></Row0><Row1><Sizes/></Row1><Row2><Sizes/></Row2></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>627</Bottom><Right>400</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>239286</sizeVertCX><sizeVertCY>639228</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>313</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>315</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>320122</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203252</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
|
|
@ -84,24 +84,14 @@
|
|||
*
|
||||
* The Queue Send Task:
|
||||
* The queue send task is implemented by the prvQueueSendTask() function in
|
||||
* this file. prvQueueSendTask() sits in a loop that causes it to repeatedly
|
||||
* block for 200 milliseconds, before sending the value 100 to the queue that
|
||||
* was created within main_blinky(). Once the value is sent, the task loops
|
||||
* back around to block for another 200 milliseconds...and so on.
|
||||
* this file. It sends the value 100 to the queue every 200 milliseconds.
|
||||
*
|
||||
* The Queue Receive Task:
|
||||
* The queue receive task is implemented by the prvQueueReceiveTask() function
|
||||
* in this file. prvQueueReceiveTask() sits in a loop where it repeatedly
|
||||
* blocks on attempts to read data from the queue that was created within
|
||||
* main_blinky(). When data is received, the task checks the value of the
|
||||
* data, and if the value equals the expected 100, toggles an LED. The 'block
|
||||
* time' parameter passed to the queue receive function specifies that the
|
||||
* task should be held in the Blocked state indefinitely to wait for data to
|
||||
* be available on the queue. The queue receive task will only leave the
|
||||
* Blocked state when the queue send task writes to the queue. As the queue
|
||||
* send task writes to the queue every 200 milliseconds, the queue receive
|
||||
* task leaves the Blocked state every 200 milliseconds, and therefore toggles
|
||||
* the LED every 200 milliseconds.
|
||||
* in this file. It blocks on the queue to wait for data to arrive from the
|
||||
* queue send task - toggling the LED each time it receives the value 100. The
|
||||
* queue send task writes to the queue every 200ms, so the LED should toggle
|
||||
* every 200ms.
|
||||
*/
|
||||
|
||||
/* Kernel includes. */
|
||||
|
@ -120,7 +110,7 @@
|
|||
|
||||
/* The rate at which data is sent to the queue. The 200ms value is converted
|
||||
to ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )
|
||||
#define mainQUEUE_SEND_FREQUENCY_MS ( pdMS_TO_TICKS( 200UL ) )
|
||||
|
||||
/* The number of items the queue can hold. This is 1 as the receive task
|
||||
will remove items as they are added, meaning the send task should always find
|
||||
|
|
|
@ -93,13 +93,13 @@
|
|||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_IDLE_HOOK 1
|
||||
#define configUSE_TICK_HOOK 1
|
||||
#define configCPU_CLOCK_HZ ( 32000000 ) /* Set in mcu_info.h. */
|
||||
#define configPERIPHERAL_CLOCK_HZ ( 32000000 ) /* Set in muc_info.h. */
|
||||
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 125 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 45 * 1024 ) )
|
||||
#define configMAX_PRIORITIES ( 7 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 38 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 12 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
|
@ -113,9 +113,20 @@
|
|||
#define configUSE_MALLOC_FAILED_HOOK 0
|
||||
#define configUSE_APPLICATION_TASK_TAG 0
|
||||
#define configUSE_COUNTING_SEMAPHORES 1
|
||||
#define configUSE_TICKLESS_IDLE 0
|
||||
|
||||
#define configMAX_PRIORITIES ( 7 )
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||
#ifdef __ICCRX__
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 )
|
||||
#endif
|
||||
/* This demo makes use of one or more example stats formatting functions. These
|
||||
format the raw data provided by the uxTaskGetSystemState() function in to human
|
||||
readable ASCII form. See the notes in the implementation of vTaskList() within
|
||||
FreeRTOS/Source/tasks.c for limitations. */
|
||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
|
||||
|
||||
/* Software timer definitions. */
|
||||
#define configUSE_TIMERS 1
|
||||
|
@ -130,11 +141,11 @@ the pended interrupt. This would normally be the lowest priority. */
|
|||
/* The maximum interrupt priority from which FreeRTOS API calls can be made.
|
||||
Interrupts that use a priority above this will not be effected by anything the
|
||||
kernel is doing. */
|
||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4
|
||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 5
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
to exclude the API function. */
|
||||
|
||||
to exclude the API function - alternative just use the linker to remove unused
|
||||
functions - which would be normal anyway. */
|
||||
#define INCLUDE_vTaskPrioritySet 1
|
||||
#define INCLUDE_uxTaskPriorityGet 1
|
||||
#define INCLUDE_vTaskDelete 1
|
||||
|
@ -147,21 +158,24 @@ to exclude the API function. */
|
|||
#define INCLUDE_eTaskGetState 1
|
||||
#define INCLUDE_xTimerPendFunctionCall 1
|
||||
|
||||
/* Assert stops the system on the line that failed the assert(), which can then
|
||||
be viewed by pausing the debugger. */
|
||||
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
|
||||
|
||||
/* The configPRE_SLEEP_PROCESSING() and configPOST_SLEEP_PROCESSING() macros
|
||||
allow the application writer to add additional code before and after the MCU is
|
||||
placed into the low power state respectively. The implementations provided in
|
||||
this demo can be extended to save even more power - for example the analog
|
||||
input used by the low power demo could be switched off in the pre-sleep macro
|
||||
and back on again in the post sleep macro. */
|
||||
void vPreSleepProcessing( unsigned long xExpectedIdleTime );
|
||||
void vPostSleepProcessing( unsigned long xExpectedIdleTime );
|
||||
#define configPRE_SLEEP_PROCESSING( xExpectedIdleTime ) vPreSleepProcessing( xExpectedIdleTime );
|
||||
#define configPOST_SLEEP_PROCESSING( xExpectedIdleTime ) vPostSleepProcessing( xExpectedIdleTime );
|
||||
/* The buffer into which output generated by FreeRTOS+CLI is placed. This must
|
||||
be at least big enough to contain the output of the task-stats command, as the
|
||||
example implementation does not include buffer overlow checking. */
|
||||
#define configCOMMAND_INT_MAX_OUTPUT_SIZE 3500
|
||||
#define configINCLUDE_QUERY_HEAP_COMMAND 1
|
||||
|
||||
/* configTICK_VECTOR must be set to the interrupt vector used by the peripheral
|
||||
that generates the tick interrupt. */
|
||||
#define configTICK_VECTOR VECT_CMT0_CMI0
|
||||
|
||||
/* Override some of the priorities set in the common demo tasks. This is
|
||||
required to ensure false positive timing errors are not reported. */
|
||||
#define bktPRIMARY_PRIORITY ( configMAX_PRIORITIES - 3 )
|
||||
#define bktSECONDARY_PRIORITY ( configMAX_PRIORITIES - 4 )
|
||||
#define intqHIGHER_PRIORITY ( configMAX_PRIORITIES - 3 )
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
|
|
|
@ -71,6 +71,10 @@
|
|||
* This file contains the non-portable and therefore RX62N specific parts of
|
||||
* the IntQueue standard demo task - namely the configuration of the timers
|
||||
* that generate the interrupts and the interrupt entry points.
|
||||
*
|
||||
* ***NOTE***: When using GCC it is best to compile this file with maximum speed
|
||||
* optimisation - otherwise standard demo tasks that monitor their own
|
||||
* performance might fail assertion tests.
|
||||
*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
|
@ -82,7 +86,7 @@
|
|||
#include "IntQueue.h"
|
||||
|
||||
#define tmrTIMER_0_1_FREQUENCY ( 2000UL )
|
||||
#define tmrTIMER_2_3_FREQUENCY ( 2111UL )
|
||||
#define tmrTIMER_2_3_FREQUENCY ( 2007UL )
|
||||
|
||||
void vInitialiseTimerForIntQueueTest( void )
|
||||
{
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
*
|
||||
******************************************************************************
|
||||
*
|
||||
* main_full() creates all the demo application tasks and software timers, then
|
||||
* main_full() creates a set of demo application tasks and software timers, then
|
||||
* starts the scheduler. The web documentation provides more details of the
|
||||
* standard demo application tasks, which provide no particular functionality,
|
||||
* but do provide a good example of how to use the FreeRTOS API.
|
||||
|
@ -89,6 +89,12 @@
|
|||
* In addition to the standard demo tasks, the following tasks and tests are
|
||||
* defined and/or created within this file:
|
||||
*
|
||||
* "FreeRTOS+CLI command console" - The command console uses SCI1 for its
|
||||
* input and output. The baud rate is set to 19200. Type "help" to see a list
|
||||
* of registered commands. The FreeRTOS+CLI license is different to the
|
||||
* FreeRTOS license, see http://www.FreeRTOS.org/cli for license and usage
|
||||
* details.
|
||||
*
|
||||
* "Reg test" tasks - These fill both the core and floating point registers with
|
||||
* known values, then check that each register maintains its expected value for
|
||||
* the lifetime of the task. Each task uses a different set of values. The reg
|
||||
|
@ -97,15 +103,14 @@
|
|||
* error in the context switching mechanism.
|
||||
*
|
||||
* "Check" task - The check task period is initially set to three seconds. The
|
||||
* task checks that all the standard demo tasks, and the register check tasks,
|
||||
* are not only still executing, but are executing without reporting any errors.
|
||||
* If the check task discovers that a task has either stalled, or reported an
|
||||
* error, then it changes its own execution period from the initial three
|
||||
* seconds, to just 200ms. The check task also toggles an LED each time it is
|
||||
* called. This provides a visual indication of the system status: If the LED
|
||||
* toggles every three seconds, then no issues have been discovered. If the LED
|
||||
* toggles every 200ms, then an issue has been discovered with at least one
|
||||
* task.
|
||||
* task checks that all the standard demo tasks are not only still executing,
|
||||
* but are executing without reporting any errors. If the check task discovers
|
||||
* that a task has either stalled, or reported an error, then it changes its own
|
||||
* execution period from the initial three seconds, to just 200ms. The check
|
||||
* task also toggles an LED on each iteration of its loop. This provides a
|
||||
* visual indication of the system status: If the LED toggles every three
|
||||
* seconds, then no issues have been discovered. If the LED toggles every
|
||||
* 200ms, then an issue has been discovered with at least one task.
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
|
@ -130,7 +135,6 @@
|
|||
#include "partest.h"
|
||||
#include "comtest2.h"
|
||||
#include "serial.h"
|
||||
#include "TimerDemo.h"
|
||||
#include "QueueOverwrite.h"
|
||||
#include "IntQueue.h"
|
||||
#include "EventGroupsDemo.h"
|
||||
|
@ -148,30 +152,26 @@
|
|||
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
|
||||
#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainUART_COMMAND_CONSOLE_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3UL )
|
||||
#define mainCOM_TEST_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||
#define mainQUEUE_OVERWRITE_PRIORITY ( tskIDLE_PRIORITY )
|
||||
|
||||
/* The priority used by the UART command console task. */
|
||||
#define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
|
||||
|
||||
/* A block time of zero simply means "don't block". */
|
||||
#define mainDONT_BLOCK ( 0UL )
|
||||
#define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
||||
/* The period after which the check timer will expire, in ms, provided no errors
|
||||
have been reported by any of the standard demo tasks. ms are converted to the
|
||||
equivalent in ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainNO_ERROR_CHECK_TASK_PERIOD ( 3000UL / portTICK_PERIOD_MS )
|
||||
#define mainNO_ERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 3000UL )
|
||||
|
||||
/* The period at which the check timer will expire, in ms, if an error has been
|
||||
reported in one of the standard demo tasks. ms are converted to the equivalent
|
||||
in ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainERROR_CHECK_TASK_PERIOD ( 200UL / portTICK_PERIOD_MS )
|
||||
#define mainERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 200UL )
|
||||
|
||||
/* Parameters that are passed into the register check tasks solely for the
|
||||
purpose of ensuring parameters are passed into tasks correctly. */
|
||||
#define mainREG_TEST_1_PARAMETER ( ( void * ) 0x12121212UL )
|
||||
#define mainREG_TEST_2_PARAMETER ( ( void * ) 0x12345678UL )
|
||||
#define mainREG_TEST_1_PARAMETER ( ( void * ) 0x12121212UL )
|
||||
#define mainREG_TEST_2_PARAMETER ( ( void * ) 0x12345678UL )
|
||||
|
||||
/* The base period used by the timer test tasks. */
|
||||
#define mainTIMER_TEST_PERIOD ( 50 )
|
||||
|
@ -212,6 +212,17 @@ void vRegTest2Implementation( void );
|
|||
*/
|
||||
static void prvPseudoRandomiser( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Register commands that can be used with FreeRTOS+CLI. The commands are
|
||||
* defined in CLI-Commands.c and File-Related-CLI-Command.c respectively.
|
||||
*/
|
||||
extern void vRegisterSampleCLICommands( void );
|
||||
|
||||
/*
|
||||
* The task that manages the FreeRTOS+CLI input and output.
|
||||
*/
|
||||
extern void vUARTCommandConsoleStart( uint16_t usStackSize, UBaseType_t uxPriority );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The following two variables are used to communicate the status of the
|
||||
|
@ -220,9 +231,6 @@ then the register check tasks have not discovered any errors. If a variable
|
|||
stops incrementing, then an error has been found. */
|
||||
volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;
|
||||
|
||||
/* String for display in the web server. It is set to an error message if the
|
||||
check task detects an error. */
|
||||
const char *pcStatusMessage = "All tasks running without error";
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void main_full( void )
|
||||
|
@ -238,8 +246,7 @@ void main_full( void )
|
|||
vStartGenericQueueTasks( tskIDLE_PRIORITY );
|
||||
vStartRecursiveMutexTasks();
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
//_RB_ vStartMathTasks( mainFLOP_TASK_PRIORITY );
|
||||
vStartTimerDemoTask( mainTIMER_TEST_PERIOD );
|
||||
vStartMathTasks( mainFLOP_TASK_PRIORITY );
|
||||
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
|
||||
vStartEventGroupTasks();
|
||||
vStartTaskNotifyTask();
|
||||
|
@ -250,7 +257,14 @@ void main_full( void )
|
|||
xTaskCreate( prvRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL );
|
||||
|
||||
/* Create the task that just adds a little random behaviour. */
|
||||
xTaskCreate( prvPseudoRandomiser, "Rnd", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL );
|
||||
xTaskCreate( prvPseudoRandomiser, "Rnd", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 2, NULL );
|
||||
|
||||
/* Start the tasks that implements the command console on the UART, as
|
||||
described above. */
|
||||
vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY );
|
||||
|
||||
/* Register the standard CLI commands. */
|
||||
vRegisterSampleCLICommands();
|
||||
|
||||
/* Create the task that performs the 'check' functionality, as described at
|
||||
the top of this file. */
|
||||
|
@ -308,12 +322,11 @@ unsigned long ulErrorFound = pdFALSE;
|
|||
ulErrorFound |= 1UL << 0UL;
|
||||
}
|
||||
|
||||
#ifdef _RB_
|
||||
if( xAreMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
ulErrorFound |= 1UL << 1UL;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
ulErrorFound |= 1UL << 2UL;
|
||||
|
@ -349,11 +362,6 @@ unsigned long ulErrorFound = pdFALSE;
|
|||
ulErrorFound |= 1UL << 8UL;
|
||||
}
|
||||
|
||||
if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )
|
||||
{
|
||||
ulErrorFound |= 1UL << 9UL;
|
||||
}
|
||||
|
||||
if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
ulErrorFound |= 1UL << 10UL;
|
||||
|
@ -405,7 +413,6 @@ unsigned long ulErrorFound = pdFALSE;
|
|||
gone wrong (it might just be that the loop back connector required
|
||||
by the comtest tasks has not been fitted). */
|
||||
xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;
|
||||
pcStatusMessage = "Error found in at least one task.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -413,7 +420,7 @@ unsigned long ulErrorFound = pdFALSE;
|
|||
|
||||
static void prvPseudoRandomiser( void *pvParameters )
|
||||
{
|
||||
const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL, ulMinDelay = ( 35 / portTICK_PERIOD_MS );
|
||||
const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL, ulMinDelay = pdMS_TO_TICKS( 35 );
|
||||
volatile uint32_t ulNextRand = ( uint32_t ) &pvParameters, ulValue;
|
||||
|
||||
/* This task does nothing other than ensure there is a little bit of
|
||||
|
@ -440,7 +447,7 @@ volatile uint32_t ulNextRand = ( uint32_t ) &pvParameters, ulValue;
|
|||
__asm volatile( "NOP" );
|
||||
__asm volatile( "NOP" );
|
||||
__asm volatile( "NOP" );
|
||||
|
||||
vTaskDelay( 2 );
|
||||
ulValue--;
|
||||
}
|
||||
}
|
||||
|
@ -449,10 +456,6 @@ volatile uint32_t ulNextRand = ( uint32_t ) &pvParameters, ulValue;
|
|||
|
||||
void vFullDemoTickHook( void )
|
||||
{
|
||||
/* The full demo includes a software timer demo/test that requires
|
||||
prodding periodically from the tick interrupt. */
|
||||
vTimerPeriodicISRTests();
|
||||
|
||||
/* Call the periodic queue overwrite from ISR demo. */
|
||||
vQueueOverwritePeriodicISRDemo();
|
||||
|
||||
|
|
|
@ -1,112 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* DISCLAIMER
|
||||
* This software is supplied by Renesas Electronics Corporation and is only
|
||||
* intended for use with Renesas products. No other uses are authorized. This
|
||||
* software is owned by Renesas Electronics Corporation and is protected under
|
||||
* all applicable laws, including copyright laws.
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
|
||||
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
|
||||
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
|
||||
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
|
||||
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
|
||||
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
|
||||
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
* Renesas reserves the right, without notice, to make changes to this software
|
||||
* and to discontinue the availability of this software. By using this software,
|
||||
* you agree to the additional terms and conditions found by accessing the
|
||||
* following link:
|
||||
* http://www.renesas.com/disclaimer
|
||||
*******************************************************************************/
|
||||
/* Copyright (C) 2014 Renesas Electronics Corporation. All rights reserved. */
|
||||
/*******************************************************************************
|
||||
* File Name : r_rsk_async.c
|
||||
* Version : 1.00
|
||||
* Device(s) : R5F51138AxFP
|
||||
* Tool-Chain : CCRX
|
||||
* H/W Platform : RSKRX113
|
||||
* Description : Functions used to send data via the SCI in asynchronous mode
|
||||
*******************************************************************************/
|
||||
/*******************************************************************************
|
||||
* History : 26.08.2014 Ver. 1.00 First Release
|
||||
*******************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
System Includes
|
||||
*******************************************************************************/
|
||||
/* Following header file provides string type definitions. */
|
||||
#include <string.h>
|
||||
|
||||
/*******************************************************************************
|
||||
User Includes (Project Level Includes)
|
||||
*******************************************************************************/
|
||||
/* Defines port registers */
|
||||
#include "r_cg_macrodriver.h"
|
||||
#include "r_cg_sci.h"
|
||||
#include "r_rsk_async.h"
|
||||
|
||||
/*******************************************************************************
|
||||
User Defines
|
||||
*******************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* Global Variables
|
||||
*******************************************************************************/
|
||||
|
||||
/* Declaration of the command string to clear the terminal screen */
|
||||
static const char cmd_clr_scr[] =
|
||||
{ 27, 91, 50, 74, 0, 27, 91, 72, 0 };
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Prototypes
|
||||
*******************************************************************************/
|
||||
|
||||
/* text_write function prototype */
|
||||
static void text_write (const char * const msg_string);
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name: R_ASYNC_Init
|
||||
* Description : This function initialises the SCI channel connected to the
|
||||
* RS232 connector on the RSK. The channel is configured for
|
||||
* transmission and reception, and instructions are sent to the
|
||||
* terminal.
|
||||
* Argument : none
|
||||
* Return value : none
|
||||
*******************************************************************************/
|
||||
void R_ASYNC_Init (void)
|
||||
{
|
||||
|
||||
/* Set up SCI1 receive buffer */
|
||||
R_SCI1_Serial_Receive((uint8_t *) &g_rx_char, 1);
|
||||
|
||||
/* Enable SCI1 operations */
|
||||
R_SCI1_Start();
|
||||
|
||||
/* Clear the text on terminal window */
|
||||
text_write(cmd_clr_scr);
|
||||
|
||||
/* Display splash screen on terminal window */
|
||||
text_write("Renesas RSKRX113 Async Serial \r\n");
|
||||
|
||||
/* Inform user on how to stop transmission */
|
||||
text_write("Press 'z' to stop and any key to resume\r\n\n");
|
||||
}
|
||||
/*******************************************************************************
|
||||
* End of function R_ASYNC_Init
|
||||
*******************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : text_write
|
||||
* Description : Transmits null-terminated string.
|
||||
* Argument : (char*) msg_string - null terminated string
|
||||
* Return value : None
|
||||
*******************************************************************************/
|
||||
static void text_write (const char * const msg_string)
|
||||
{
|
||||
R_SCI1_AsyncTransmit((uint8_t *) msg_string, (uint16_t) strlen(msg_string));
|
||||
}
|
||||
/*******************************************************************************
|
||||
* End of function text_write
|
||||
*******************************************************************************/
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* DISCLAIMER
|
||||
* This software is supplied by Renesas Electronics Corporation and is only
|
||||
* intended for use with Renesas products. No other uses are authorized. This
|
||||
* software is owned by Renesas Electronics Corporation and is protected under
|
||||
* all applicable laws, including copyright laws.
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
|
||||
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
|
||||
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
|
||||
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
|
||||
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
|
||||
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
|
||||
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
* Renesas reserves the right, without notice, to make changes to this software
|
||||
* and to discontinue the availability of this software. By using this software,
|
||||
* you agree to the additional terms and conditions found by accessing the
|
||||
* following link:
|
||||
* http://www.renesas.com/disclaimer
|
||||
*******************************************************************************/
|
||||
/* Copyright (C) 2014 Renesas Electronics Corporation. All rights reserved. */
|
||||
/*******************************************************************************
|
||||
* File Name : r_rsk_async.h
|
||||
* Version : 1.00
|
||||
* Device(s) : R5F51138AxFP
|
||||
* Tool-Chain : CCRX
|
||||
* H/W Platform : RSKRX113
|
||||
* Description : Functions used to send data via the SCI in asynchronous mode
|
||||
******************************************************************************/
|
||||
/*******************************************************************************
|
||||
* History : 26.08.2014 Ver. 1.00 First Release
|
||||
*******************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* Macro Definitions
|
||||
*******************************************************************************/
|
||||
/* Multiple inclusion prevention macro */
|
||||
#ifndef R_RSK_ASYNC_H
|
||||
#define R_RSK_ASYNC_H
|
||||
|
||||
/*******************************************************************************
|
||||
* Global Function Prototypes
|
||||
*******************************************************************************/
|
||||
/* initialise asynchronous transmission*/
|
||||
void R_ASYNC_Init (void);
|
||||
|
||||
/* End of multiple inclusion prevention macro */
|
||||
#endif
|
||||
|
|
@ -25,6 +25,10 @@ extern void vPortSoftwareInterruptISR( void );
|
|||
extern void vPortTickISR( void );
|
||||
extern void vIntQTimerISR0( void );
|
||||
extern void vIntQTimerISR1( void );
|
||||
extern void r_sci1_transmit_interrupt( void );
|
||||
extern void r_sci1_transmitend_interrupt( void );
|
||||
extern void r_sci1_receive_interrupt( void );
|
||||
extern void r_sci1_receiveerror_interrupt( void );
|
||||
|
||||
#define FVECT_SECT __attribute__ ((section (".fvectors")))
|
||||
|
||||
|
@ -542,13 +546,13 @@ const fp RelocatableVectors[] RVECT_SECT = {
|
|||
//;0x0364 SCI0_TEI0
|
||||
(fp)INT_Excep_SCI0_TEI0,
|
||||
//;0x0368 SCI1_ERI1
|
||||
(fp)INT_Excep_SCI1_ERI1,
|
||||
(fp)r_sci1_receiveerror_interrupt,
|
||||
//;0x036C SCI1_RXI1
|
||||
(fp)INT_Excep_SCI1_RXI1,
|
||||
(fp)r_sci1_receive_interrupt,
|
||||
//;0x0370 SCI1_TXI1
|
||||
(fp)INT_Excep_SCI1_TXI1,
|
||||
(fp)r_sci1_transmit_interrupt,
|
||||
//;0x0374 SCI1_TEI1
|
||||
(fp)INT_Excep_SCI1_TEI1,
|
||||
(fp)r_sci1_transmitend_interrupt,
|
||||
//;0x0378 SCI5_ERI5
|
||||
(fp)INT_Excep_SCI5_ERI5,
|
||||
//;0x037C SCI5_RXI5
|
||||
|
|
|
@ -32,6 +32,7 @@ Includes
|
|||
***********************************************************************************************************************/
|
||||
#ifdef __ICCRX__
|
||||
#include <iorx113.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
/***********************************************************************************************************************
|
||||
* DISCLAIMER
|
||||
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
|
||||
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
|
||||
* applicable laws, including copyright laws.
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIESREGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
|
||||
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
|
||||
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
|
||||
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
|
||||
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
|
||||
* following link:
|
||||
* http://www.renesas.com/disclaimer
|
||||
*
|
||||
* Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved.
|
||||
***********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* File Name : r_cg_sbrk.c
|
||||
* Version : Code Generator for RX113 V1.02.01.02 [28 May 2015]
|
||||
* Device(s) : R5F51138AxFP
|
||||
* Tool-Chain : CCRX
|
||||
* Description : Program of sbrk.
|
||||
* Creation Date: 21/09/2015
|
||||
***********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
Pragma directive
|
||||
***********************************************************************************************************************/
|
||||
/* Start user code for pragma. Do not edit comment generated here */
|
||||
/* End user code. Do not edit comment generated here */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
Includes
|
||||
***********************************************************************************************************************/
|
||||
#include "r_cg_macrodriver.h"
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include "r_cg_sbrk.h"
|
||||
#include "r_cg_userdefine.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
Global variables and functions
|
||||
***********************************************************************************************************************/
|
||||
|
||||
int8_t *sbrk(size_t size);
|
||||
|
||||
extern int8_t *_s1ptr;
|
||||
|
||||
union HEAP_TYPE
|
||||
{
|
||||
int16_t dummy ; /* Dummy for 4-byte boundary */
|
||||
int8_t heap[HEAPSIZE]; /* Declaration of the area managed by sbrk */
|
||||
};
|
||||
|
||||
static union HEAP_TYPE heap_area ;
|
||||
|
||||
/* End address allocated by sbrk */
|
||||
static int8_t *brk = (int8_t *) &heap_area;
|
||||
|
||||
/**************************************************************************/
|
||||
/* sbrk:Memory area allocation */
|
||||
/* Return value:Start address of allocated area (Pass) */
|
||||
/* -1 (Failure) */
|
||||
/**************************************************************************/
|
||||
int8_t *sbrk(size_t size) /* Assigned area size */
|
||||
{
|
||||
int8_t *p;
|
||||
|
||||
if (brk+size > heap_area.heap + HEAPSIZE) /* Empty area size */
|
||||
{
|
||||
p = (int8_t *)-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
p = brk; /* Area assignment */
|
||||
brk += size; /* End address update */
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
/* Start user code for adding. Do not edit comment generated here */
|
||||
/* End user code. Do not edit comment generated here */
|
|
@ -1,48 +0,0 @@
|
|||
/***********************************************************************************************************************
|
||||
* DISCLAIMER
|
||||
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
|
||||
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
|
||||
* applicable laws, including copyright laws.
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIESREGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
|
||||
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
|
||||
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
|
||||
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
|
||||
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
|
||||
* following link:
|
||||
* http://www.renesas.com/disclaimer
|
||||
*
|
||||
* Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved.
|
||||
***********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* File Name : r_cg_sbrk.h
|
||||
* Version : Code Generator for RX113 V1.02.01.02 [28 May 2015]
|
||||
* Device(s) : R5F51138AxFP
|
||||
* Tool-Chain : CCRX
|
||||
* Description : Header file of sbrk file.
|
||||
* Creation Date: 21/09/2015
|
||||
***********************************************************************************************************************/
|
||||
#ifndef _SBRK_H
|
||||
#define _SBRK_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
Macro definitions (Register bit)
|
||||
***********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
Macro definitions
|
||||
***********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
Typedef definitions
|
||||
***********************************************************************************************************************/
|
||||
#define HEAPSIZE (0x400U) /* Size of area managed by sbrk */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
Global functions
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#endif
|
|
@ -285,9 +285,9 @@ void R_SCI1_Start(void);
|
|||
void R_SCI1_Stop(void);
|
||||
MD_STATUS R_SCI1_Serial_Send(uint8_t * const tx_buf, uint16_t tx_num);
|
||||
MD_STATUS R_SCI1_Serial_Receive(uint8_t * const rx_buf, uint16_t rx_num);
|
||||
static void r_sci1_callback_transmitend(void);
|
||||
static void r_sci1_callback_receiveend(void);
|
||||
static void r_sci1_callback_receiveerror(void);
|
||||
void r_sci1_callback_transmitend(void);
|
||||
void r_sci1_callback_receiveend(void);
|
||||
void r_sci1_callback_receiveerror(void);
|
||||
|
||||
/* Start user code for function. Do not edit comment generated here */
|
||||
|
||||
|
|
|
@ -0,0 +1,364 @@
|
|||
/***********************************************************************************************************************
|
||||
* DISCLAIMER
|
||||
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
|
||||
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
|
||||
* applicable laws, including copyright laws.
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIESREGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
|
||||
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
|
||||
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
|
||||
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
|
||||
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
|
||||
* following link:
|
||||
* http://www.renesas.com/disclaimer
|
||||
*
|
||||
* Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved.
|
||||
***********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* File Name : r_cg_sci_user.c
|
||||
* Version : Code Generator for RX113 V1.02.01.02 [28 May 2015]
|
||||
* Device(s) : R5F51138AxFP
|
||||
* Tool-Chain : CCRX
|
||||
* Description : This file implements device driver for SCI module.
|
||||
* Creation Date: 21/09/2015
|
||||
***********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
Pragma directive
|
||||
***********************************************************************************************************************/
|
||||
/* Start user code for pragma. Do not edit comment generated here */
|
||||
|
||||
|
||||
/*
|
||||
* This file originated from an example project for the RSK - it has been
|
||||
* adapted to allow it to be used in the FreeRTOS demo. Functions required by
|
||||
* UARTCommandConsole.c have been added.
|
||||
*
|
||||
* ***NOTE***: Transmitting generates an interrupt for each character, which
|
||||
* consumes CPU time, and can cause standard demo RTOS tasks that monitor their
|
||||
* own performance to fail asserts - therefore when using GCC it is best to
|
||||
* compile this file with maximum speed optimisation.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* End user code. Do not edit comment generated here */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
Includes
|
||||
***********************************************************************************************************************/
|
||||
#include "r_cg_macrodriver.h"
|
||||
#include "r_cg_sci.h"
|
||||
/* Start user code for include. Do not edit comment generated here */
|
||||
#include "rskrx113def.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "serial.h"
|
||||
/* End user code. Do not edit comment generated here */
|
||||
#include "r_cg_userdefine.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
Global variables and functions
|
||||
***********************************************************************************************************************/
|
||||
extern uint8_t * gp_sci1_tx_address; /* SCI1 send buffer address */
|
||||
extern uint16_t g_sci1_tx_count; /* SCI1 send data number */
|
||||
extern uint8_t * gp_sci1_rx_address; /* SCI1 receive buffer address */
|
||||
extern uint16_t g_sci1_rx_count; /* SCI1 receive data number */
|
||||
extern uint16_t g_sci1_rx_length; /* SCI1 receive data length */
|
||||
/* Start user code for global. Do not edit comment generated here */
|
||||
|
||||
/* Global used to receive a character from the PC terminal */
|
||||
uint8_t g_rx_char;
|
||||
|
||||
/* Flag used to control transmission to PC terminal */
|
||||
volatile uint8_t g_tx_flag = FALSE;
|
||||
|
||||
/* Characters received from the UART are stored in this queue, ready to be
|
||||
received by the application. ***NOTE*** Using a queue in this way is very
|
||||
convenient, but also very inefficient. It can be used here because characters
|
||||
will only arrive slowly. In a higher bandwidth system a circular RAM buffer or
|
||||
DMA should be used in place of this queue. */
|
||||
static QueueHandle_t xRxQueue = NULL;
|
||||
|
||||
/* When a task calls vSerialPutString() its handle is stored in xSendingTask,
|
||||
before being placed into the Blocked state (so does not use any CPU time) to
|
||||
wait for the transmission to end. The task handle is then used from the UART
|
||||
transmit end interrupt to remove the task from the Blocked state. */
|
||||
static TaskHandle_t xSendingTask = NULL;
|
||||
|
||||
/* Flag used locally to detect transmission complete. This is used by the
|
||||
auto generated API only. */
|
||||
static volatile uint8_t sci1_txdone;
|
||||
|
||||
/* End user code. Do not edit comment generated here */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: r_sci1_transmit_interrupt
|
||||
* Description : None
|
||||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
void r_sci1_transmit_interrupt(void) __attribute__((interrupt));
|
||||
void r_sci1_transmit_interrupt(void)
|
||||
{
|
||||
if (g_sci1_tx_count > 0U)
|
||||
{
|
||||
SCI1.TDR = *gp_sci1_tx_address;
|
||||
gp_sci1_tx_address++;
|
||||
g_sci1_tx_count--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SCI1.SCR.BIT.TIE = 0U;
|
||||
SCI1.SCR.BIT.TEIE = 1U;
|
||||
}
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: r_sci1_transmitend_interrupt
|
||||
* Description : None
|
||||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
void r_sci1_transmitend_interrupt(void) __attribute__((interrupt));
|
||||
void r_sci1_transmitend_interrupt(void)
|
||||
{
|
||||
/* Set TXD1 pin */
|
||||
PORT1.PMR.BYTE &= 0xBFU;
|
||||
SCI1.SCR.BIT.TIE = 0U;
|
||||
SCI1.SCR.BIT.TE = 0U;
|
||||
SCI1.SCR.BIT.TEIE = 0U;
|
||||
|
||||
r_sci1_callback_transmitend();
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: r_sci1_receive_interrupt
|
||||
* Description : None
|
||||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
void r_sci1_receive_interrupt(void) __attribute__((interrupt));
|
||||
void r_sci1_receive_interrupt(void)
|
||||
{
|
||||
if (g_sci1_rx_length > g_sci1_rx_count)
|
||||
{
|
||||
*gp_sci1_rx_address = SCI1.RDR;
|
||||
gp_sci1_rx_address++;
|
||||
g_sci1_rx_count++;
|
||||
|
||||
if (g_sci1_rx_length == g_sci1_rx_count)
|
||||
{
|
||||
r_sci1_callback_receiveend();
|
||||
}
|
||||
}
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: r_sci1_receiveerror_interrupt
|
||||
* Description : None
|
||||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
void r_sci1_receiveerror_interrupt(void) __attribute__((interrupt));
|
||||
void r_sci1_receiveerror_interrupt(void)
|
||||
{
|
||||
uint8_t err_type;
|
||||
|
||||
r_sci1_callback_receiveerror();
|
||||
|
||||
/* Clear overrun, framing and parity error flags */
|
||||
err_type = SCI1.SSR.BYTE;
|
||||
SCI1.SSR.BYTE = err_type & ( uint8_t ) 0xC7;
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: r_sci1_callback_transmitend
|
||||
* Description : This function is a callback function when SCI1 finishes transmission.
|
||||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
void r_sci1_callback_transmitend(void)
|
||||
{
|
||||
/* Start user code. Do not edit comment generated here */
|
||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* The sci1_txdone flag is used by the auto generated API only. */
|
||||
sci1_txdone = TRUE;
|
||||
|
||||
if( xSendingTask != NULL )
|
||||
{
|
||||
/* A task is waiting for the end of the Tx, unblock it now.
|
||||
http://www.freertos.org/vTaskNotifyGiveFromISR.html */
|
||||
vTaskNotifyGiveFromISR( xSendingTask, &xHigherPriorityTaskWoken );
|
||||
xSendingTask = NULL;
|
||||
|
||||
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/* End user code. Do not edit comment generated here */
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: r_sci1_callback_receiveend
|
||||
* Description : This function is a callback function when SCI1 finishes reception.
|
||||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
void r_sci1_callback_receiveend(void)
|
||||
{
|
||||
/* Start user code. Do not edit comment generated here */
|
||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
configASSERT( xRxQueue );
|
||||
|
||||
/* Transmitting generates an interrupt for each character, which consumes
|
||||
CPU time, and can cause standard demo RTOS tasks that monitor their own
|
||||
performance to fail asserts - so don't receive new CLI commands if a
|
||||
transmit is not already in progress. */
|
||||
if( sci1_txdone == TRUE )
|
||||
{
|
||||
/* Characters received from the UART are stored in this queue, ready to be
|
||||
received by the application. ***NOTE*** Using a queue in this way is very
|
||||
convenient, but also very inefficient. It can be used here because
|
||||
characters will only arrive slowly. In a higher bandwidth system a circular
|
||||
RAM buffer or DMA should be used in place of this queue. */
|
||||
xQueueSendFromISR( xRxQueue, &g_rx_char, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
/* Set up SCI1 receive buffer again */
|
||||
R_SCI1_Serial_Receive((uint8_t *) &g_rx_char, 1);
|
||||
|
||||
/* See http://www.freertos.org/xQueueOverwriteFromISR.html for information
|
||||
on the semantics of this ISR. */
|
||||
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||
/* End user code. Do not edit comment generated here */
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: r_sci1_callback_receiveerror
|
||||
* Description : This function is a callback function when SCI1 reception encounters error.
|
||||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
void r_sci1_callback_receiveerror(void)
|
||||
{
|
||||
/* Start user code. Do not edit comment generated here */
|
||||
/* End user code. Do not edit comment generated here */
|
||||
}
|
||||
|
||||
/* Start user code for adding. Do not edit comment generated here */
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: R_SCI1_AsyncTransmit
|
||||
* Description : This function sends SCI1 data and waits for the transmit end flag.
|
||||
* Arguments : tx_buf -
|
||||
* transfer buffer pointer
|
||||
* tx_num -
|
||||
* buffer size
|
||||
* Return Value : status -
|
||||
* MD_OK or MD_ARGERROR
|
||||
***********************************************************************************************************************/
|
||||
MD_STATUS R_SCI1_AsyncTransmit (uint8_t * const tx_buf, const uint16_t tx_num)
|
||||
{
|
||||
MD_STATUS status = MD_OK;
|
||||
|
||||
/* clear the flag before initiating a new transmission */
|
||||
sci1_txdone = FALSE;
|
||||
|
||||
/* Send the data using the API */
|
||||
status = R_SCI1_Serial_Send(tx_buf, tx_num);
|
||||
|
||||
/* Wait for the transmit end flag */
|
||||
while (FALSE == sci1_txdone)
|
||||
{
|
||||
/* Wait */
|
||||
}
|
||||
return (status);
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
* End of function R_SCI1_AsyncTransmit
|
||||
***********************************************************************************************************************/
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
( void ) ulWantedBaud;
|
||||
( void ) uxQueueLength;
|
||||
|
||||
/* Characters received from the UART are stored in this queue, ready to be
|
||||
received by the application. ***NOTE*** Using a queue in this way is very
|
||||
convenient, but also very inefficient. It can be used here because
|
||||
characters will only arrive slowly. In a higher bandwidth system a circular
|
||||
RAM buffer or DMA should be used in place of this queue. */
|
||||
xRxQueue = xQueueCreate( uxQueueLength, sizeof( char ) );
|
||||
configASSERT( xRxQueue );
|
||||
|
||||
/* Set up SCI1 receive buffer */
|
||||
R_SCI1_Serial_Receive((uint8_t *) &g_rx_char, 1);
|
||||
|
||||
/* Ensure the interrupt priority is at or below
|
||||
configMAX_SYSCALL_INTERRUPT_PRIORITY. */
|
||||
IPR( SCI1, ERI1 ) = configKERNEL_INTERRUPT_PRIORITY + 1;
|
||||
|
||||
/* Enable SCI1 operations */
|
||||
R_SCI1_Start();
|
||||
|
||||
/* Only one UART is supported, so it doesn't matter what is returned
|
||||
here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
const TickType_t xMaxBlockTime = pdMS_TO_TICKS( 5000 );
|
||||
|
||||
/* Only one port is supported. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Clear the flag before initiating a new transmission */
|
||||
sci1_txdone = FALSE;
|
||||
|
||||
/* Don't send the string unless the previous string has been sent. */
|
||||
if( xSendingTask == NULL )
|
||||
{
|
||||
/* Ensure the calling task's notification state is not already
|
||||
pending. */
|
||||
vTaskNotifyClear( NULL );
|
||||
|
||||
/* Store the handle of the transmitting task. This is used to unblock
|
||||
the task when the transmission has completed. */
|
||||
xSendingTask = xTaskGetCurrentTaskHandle();
|
||||
|
||||
/* Send the string using the auto-generated API. */
|
||||
R_SCI1_Serial_Send( ( uint8_t * ) pcString, usStringLength );
|
||||
|
||||
/* Wait in the Blocked state (so not using any CPU time) until the
|
||||
transmission has completed. */
|
||||
ulTaskNotifyTake( pdTRUE, xMaxBlockTime );
|
||||
}
|
||||
}
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )
|
||||
{
|
||||
/* Only one UART is supported. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Return a received character, if any are available. Otherwise block to
|
||||
wait for a character. */
|
||||
return xQueueReceive( xRxQueue, pcRxedChar, xBlockTime );
|
||||
}
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )
|
||||
{
|
||||
/* Just mapped to vSerialPutString() so the block time is not used. */
|
||||
( void ) xBlockTime;
|
||||
|
||||
vSerialPutString( pxPort, &cOutChar, sizeof( cOutChar ) );
|
||||
return pdPASS;
|
||||
}
|
||||
|
||||
/* End user code. Do not edit comment generated here */
|
|
@ -30,6 +30,16 @@
|
|||
Pragma directive
|
||||
***********************************************************************************************************************/
|
||||
/* Start user code for pragma. Do not edit comment generated here */
|
||||
|
||||
|
||||
/*
|
||||
* This file originated from an example project for the RSK - it has been
|
||||
* adapted to allow it to be used in the FreeRTOS demo. Functions required by
|
||||
* UARTCommandConsole.c have been added.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* End user code. Do not edit comment generated here */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
|
@ -39,7 +49,10 @@ Includes
|
|||
#include "r_cg_sci.h"
|
||||
/* Start user code for include. Do not edit comment generated here */
|
||||
#include "rskrx113def.h"
|
||||
//_RB_#include "r_cg_cmt.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "serial.h"
|
||||
/* End user code. Do not edit comment generated here */
|
||||
#include "r_cg_userdefine.h"
|
||||
|
||||
|
@ -59,7 +72,21 @@ uint8_t g_rx_char;
|
|||
/* Flag used to control transmission to PC terminal */
|
||||
volatile uint8_t g_tx_flag = FALSE;
|
||||
|
||||
/* Flag used locally to detect transmission complete */
|
||||
/* Characters received from the UART are stored in this queue, ready to be
|
||||
received by the application. ***NOTE*** Using a queue in this way is very
|
||||
convenient, but also very inefficient. It can be used here because characters
|
||||
will only arrive slowly. In a higher bandwidth system a circular RAM buffer or
|
||||
DMA should be used in place of this queue. */
|
||||
static QueueHandle_t xRxQueue = NULL;
|
||||
|
||||
/* When a task calls vSerialPutString() its handle is stored in xSendingTask,
|
||||
before being placed into the Blocked state (so does not use any CPU time) to
|
||||
wait for the transmission to end. The task handle is then used from the UART
|
||||
transmit end interrupt to remove the task from the Blocked state. */
|
||||
static TaskHandle_t xSendingTask = NULL;
|
||||
|
||||
/* Flag used locally to detect transmission complete. This is used by the
|
||||
auto generated API only. */
|
||||
static volatile uint8_t sci1_txdone;
|
||||
|
||||
/* End user code. Do not edit comment generated here */
|
||||
|
@ -70,12 +97,12 @@ static volatile uint8_t sci1_txdone;
|
|||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
#pragma vector = VECT_SCI1_TXI1
|
||||
#if FAST_INTERRUPT_VECTOR == VECT_SCI1_TXI1
|
||||
#pragma interrupt r_sci1_transmit_interrupt(vect=VECT(SCI1,TXI1),fint)
|
||||
__fast_interrupt static void r_sci1_transmit_interrupt(void)
|
||||
#else
|
||||
#pragma interrupt r_sci1_transmit_interrupt(vect=VECT(SCI1,TXI1))
|
||||
__interrupt static void r_sci1_transmit_interrupt(void)
|
||||
#endif
|
||||
static void r_sci1_transmit_interrupt(void)
|
||||
{
|
||||
if (g_sci1_tx_count > 0U)
|
||||
{
|
||||
|
@ -95,12 +122,12 @@ static void r_sci1_transmit_interrupt(void)
|
|||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
#pragma vector = VECT_SCI1_TEI1
|
||||
#if FAST_INTERRUPT_VECTOR == VECT_SCI1_TEI1
|
||||
#pragma interrupt r_sci1_transmitend_interrupt(vect=VECT(SCI1,TEI1),fint)
|
||||
__fast_interrupt static void r_sci1_transmitend_interrupt(void)
|
||||
#else
|
||||
#pragma interrupt r_sci1_transmitend_interrupt(vect=VECT(SCI1,TEI1))
|
||||
__interrupt static void r_sci1_transmitend_interrupt(void)
|
||||
#endif
|
||||
static void r_sci1_transmitend_interrupt(void)
|
||||
{
|
||||
/* Set TXD1 pin */
|
||||
PORT1.PMR.BYTE &= 0xBFU;
|
||||
|
@ -116,12 +143,12 @@ static void r_sci1_transmitend_interrupt(void)
|
|||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
#pragma vector = VECT_SCI1_RXI1
|
||||
#if FAST_INTERRUPT_VECTOR == VECT_SCI1_RXI1
|
||||
#pragma interrupt r_sci1_receive_interrupt(vect=VECT(SCI1,RXI1),fint)
|
||||
__fast_interrupt static void r_sci1_receive_interrupt(void)
|
||||
#else
|
||||
#pragma interrupt r_sci1_receive_interrupt(vect=VECT(SCI1,RXI1))
|
||||
__interrupt static void r_sci1_receive_interrupt(void)
|
||||
#endif
|
||||
static void r_sci1_receive_interrupt(void)
|
||||
{
|
||||
if (g_sci1_rx_length > g_sci1_rx_count)
|
||||
{
|
||||
|
@ -141,12 +168,12 @@ static void r_sci1_receive_interrupt(void)
|
|||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
#pragma vector = VECT_SCI1_ERI1
|
||||
#if FAST_INTERRUPT_VECTOR == VECT_SCI1_ERI1
|
||||
#pragma interrupt r_sci1_receiveerror_interrupt(vect=VECT(SCI1,ERI1),fint)
|
||||
__fast_interrupt static void r_sci1_receiveerror_interrupt(void)
|
||||
#else
|
||||
#pragma interrupt r_sci1_receiveerror_interrupt(vect=VECT(SCI1,ERI1))
|
||||
__interrupt static void r_sci1_receiveerror_interrupt(void)
|
||||
#endif
|
||||
static void r_sci1_receiveerror_interrupt(void)
|
||||
{
|
||||
uint8_t err_type;
|
||||
|
||||
|
@ -154,7 +181,7 @@ static void r_sci1_receiveerror_interrupt(void)
|
|||
|
||||
/* Clear overrun, framing and parity error flags */
|
||||
err_type = SCI1.SSR.BYTE;
|
||||
SCI1.SSR.BYTE = err_type & 0xC7U;
|
||||
SCI1.SSR.BYTE = err_type & ( uint8_t ) 0xC7;
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: r_sci1_callback_transmitend
|
||||
|
@ -162,11 +189,23 @@ static void r_sci1_receiveerror_interrupt(void)
|
|||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
static void r_sci1_callback_transmitend(void)
|
||||
void r_sci1_callback_transmitend(void)
|
||||
{
|
||||
/* Start user code. Do not edit comment generated here */
|
||||
sci1_txdone = TRUE;
|
||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* The sci1_txdone flag is used by the auto generated API only. */
|
||||
sci1_txdone = TRUE;
|
||||
|
||||
if( xSendingTask != NULL )
|
||||
{
|
||||
/* A task is waiting for the end of the Tx, unblock it now.
|
||||
http://www.freertos.org/vTaskNotifyGiveFromISR.html */
|
||||
vTaskNotifyGiveFromISR( xSendingTask, &xHigherPriorityTaskWoken );
|
||||
xSendingTask = NULL;
|
||||
|
||||
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/* End user code. Do not edit comment generated here */
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
|
@ -175,34 +214,33 @@ static void r_sci1_callback_transmitend(void)
|
|||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
static void r_sci1_callback_receiveend(void)
|
||||
void r_sci1_callback_receiveend(void)
|
||||
{
|
||||
/* Start user code. Do not edit comment generated here */
|
||||
/* Check the contents of g_rx_char */
|
||||
if ('z' == g_rx_char)
|
||||
{
|
||||
/* Stop the timer used to control transmission to PC terminal*/
|
||||
//_RB_ R_CMT0_Stop();
|
||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Turn off LED0 and turn on LED1 to indicate serial transmission
|
||||
inactive */
|
||||
LED0 = LED_OFF;
|
||||
LED1 = LED_ON;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Start the timer used to control transmission to PC terminal*/
|
||||
//_RB_ R_CMT0_Start();
|
||||
configASSERT( xRxQueue );
|
||||
|
||||
/* Turn on LED0 and turn off LED1 to indicate serial transmission
|
||||
active */
|
||||
LED0 = LED_ON;
|
||||
LED1 = LED_OFF;
|
||||
}
|
||||
/* Transmitting generates an interrupt for each character, which consumes
|
||||
CPU time, and can cause standard demo RTOS tasks that monitor their own
|
||||
performance to fail asserts - so don't receive new CLI commands if a
|
||||
transmit is not already in progress. */
|
||||
if( sci1_txdone == TRUE )
|
||||
{
|
||||
/* Characters received from the UART are stored in this queue, ready to be
|
||||
received by the application. ***NOTE*** Using a queue in this way is very
|
||||
convenient, but also very inefficient. It can be used here because
|
||||
characters will only arrive slowly. In a higher bandwidth system a circular
|
||||
RAM buffer or DMA should be used in place of this queue. */
|
||||
xQueueSendFromISR( xRxQueue, &g_rx_char, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
/* Set up SCI1 receive buffer again */
|
||||
R_SCI1_Serial_Receive((uint8_t *) &g_rx_char, 1);
|
||||
|
||||
/* See http://www.freertos.org/xQueueOverwriteFromISR.html for information
|
||||
on the semantics of this ISR. */
|
||||
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||
/* End user code. Do not edit comment generated here */
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
|
@ -211,7 +249,7 @@ static void r_sci1_callback_receiveend(void)
|
|||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
static void r_sci1_callback_receiveerror(void)
|
||||
void r_sci1_callback_receiveerror(void)
|
||||
{
|
||||
/* Start user code. Do not edit comment generated here */
|
||||
/* End user code. Do not edit comment generated here */
|
||||
|
@ -249,4 +287,89 @@ MD_STATUS R_SCI1_AsyncTransmit (uint8_t * const tx_buf, const uint16_t tx_num)
|
|||
* End of function R_SCI1_AsyncTransmit
|
||||
***********************************************************************************************************************/
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
( void ) ulWantedBaud;
|
||||
( void ) uxQueueLength;
|
||||
|
||||
/* Characters received from the UART are stored in this queue, ready to be
|
||||
received by the application. ***NOTE*** Using a queue in this way is very
|
||||
convenient, but also very inefficient. It can be used here because
|
||||
characters will only arrive slowly. In a higher bandwidth system a circular
|
||||
RAM buffer or DMA should be used in place of this queue. */
|
||||
xRxQueue = xQueueCreate( uxQueueLength, sizeof( char ) );
|
||||
configASSERT( xRxQueue );
|
||||
|
||||
/* Set up SCI1 receive buffer */
|
||||
R_SCI1_Serial_Receive((uint8_t *) &g_rx_char, 1);
|
||||
|
||||
/* Ensure the interrupt priority is at or below
|
||||
configMAX_SYSCALL_INTERRUPT_PRIORITY. */
|
||||
IPR( SCI1, ERI1 ) = configMAX_SYSCALL_INTERRUPT_PRIORITY - 1;
|
||||
|
||||
/* Enable SCI1 operations */
|
||||
R_SCI1_Start();
|
||||
|
||||
/* Only one UART is supported, so it doesn't matter what is returned
|
||||
here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
const TickType_t xMaxBlockTime = pdMS_TO_TICKS( 5000 );
|
||||
|
||||
/* Only one port is supported. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Clear the flag before initiating a new transmission */
|
||||
sci1_txdone = FALSE;
|
||||
|
||||
/* Don't send the string unless the previous string has been sent. */
|
||||
if( xSendingTask == NULL )
|
||||
{
|
||||
/* Ensure the calling task's notification state is not already
|
||||
pending. */
|
||||
vTaskNotifyClear( NULL );
|
||||
|
||||
/* Store the handle of the transmitting task. This is used to unblock
|
||||
the task when the transmission has completed. */
|
||||
xSendingTask = xTaskGetCurrentTaskHandle();
|
||||
|
||||
/* Send the string using the auto-generated API. */
|
||||
R_SCI1_Serial_Send( ( uint8_t * ) pcString, usStringLength );
|
||||
|
||||
/* Wait in the Blocked state (so not using any CPU time) until the
|
||||
transmission has completed. */
|
||||
ulTaskNotifyTake( pdTRUE, xMaxBlockTime );
|
||||
}
|
||||
}
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )
|
||||
{
|
||||
/* Only one UART is supported. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Return a received character, if any are available. Otherwise block to
|
||||
wait for a character. */
|
||||
return xQueueReceive( xRxQueue, pcRxedChar, xBlockTime );
|
||||
}
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )
|
||||
{
|
||||
/* Just mapped to vSerialPutString() so the block time is not used. */
|
||||
( void ) xBlockTime;
|
||||
|
||||
vSerialPutString( pxPort, &cOutChar, sizeof( cOutChar ) );
|
||||
return pdPASS;
|
||||
}
|
||||
|
||||
/* End user code. Do not edit comment generated here */
|
|
@ -90,7 +90,6 @@
|
|||
#include "task.h"
|
||||
#include "semphr.h"
|
||||
|
||||
/* Renesas includes. */
|
||||
/* Renesas includes. */
|
||||
#include <rskrx113def.h>
|
||||
#include "r_cg_macrodriver.h"
|
||||
|
@ -143,12 +142,15 @@ int main( void )
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Should never get reached. */
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Some hardware setup is performed before main() is called. This routine
|
||||
just ensures the LEDs start off. */
|
||||
LED0 = LED_OFF;
|
||||
LED1 = LED_OFF;
|
||||
LED2 = LED_OFF;
|
||||
|
@ -203,6 +205,7 @@ volatile size_t xFreeHeapSpace;
|
|||
|
||||
void vApplicationTickHook( void )
|
||||
{
|
||||
/* The tick hook is not used by the blinky demo, but is by the full demo. */
|
||||
#if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0
|
||||
{
|
||||
extern void vFullDemoTickHook( void );
|
||||
|
@ -214,7 +217,9 @@ void vApplicationTickHook( void )
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The RX port uses this callback function to configure its tick interrupt.
|
||||
This allows the application to choose the tick interrupt source. */
|
||||
This allows the application to choose the tick interrupt source.
|
||||
***NOTE***: configTICK_VECTOR must be set in FreeRTOSConfig.h to be correct for
|
||||
whichever vector is used. */
|
||||
void vApplicationSetupTimerInterrupt( void )
|
||||
{
|
||||
const uint32_t ulEnableRegisterWrite = 0xA50BUL, ulDisableRegisterWrite = 0xA500UL;
|
||||
|
|
|
@ -42,9 +42,9 @@
|
|||
<option id="com.renesas.cdt.renesas.Compiler.option.deviceShortName.491615829" name="DeviceShortName" superClass="com.renesas.cdt.renesas.Compiler.option.deviceShortName" value="R5F51138AxFP" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.renesas.Compiler.option.incFileDirectories.1906083430" name="Include file directories" superClass="com.renesas.cdt.renesas.Compiler.option.incFileDirectories" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${TCINSTALL}/include""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Full_Demo/FreeRTOS-Plus-CLI}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Full_Demo/Standard_Demo_Tasks/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Full_Demo}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Renesas_Code}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/FreeRTOS_Source/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/FreeRTOS_Source/portable/Renesas/RX100}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
|
||||
|
@ -137,8 +137,14 @@
|
|||
</fileInfo>
|
||||
<folderInfo id="com.renesas.cdt.rxc.hardwaredebug.win32.configuration.Id.941970450.497502634" name="/" resourcePath="src/FreeRTOS_Source">
|
||||
<toolChain id="com.renesas.cdt.rxc.hardwaredebug.win32.toolChain.Id.45016972" name="Renesas RXC Toolchain" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.toolChain.Id" unusedChildren="">
|
||||
<tool id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.compiler.Id.1830726910" name="Compiler" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.compiler.Id.741766106"/>
|
||||
<tool id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.assembler.Id.252059482" name="Assembler" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.assembler.Id.1503720976"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.rxc.hardwaredebug.win32.targetPlatform.Id" isAbstract="false" osList="win32" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.targetPlatform.Id"/>
|
||||
<tool id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.compiler.Id.1830726910" name="Compiler" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.compiler.Id.741766106">
|
||||
<inputType id="%Base.Compiler.Shc.C.Input.Id.1332314765" name="C Input" superClass="%Base.Compiler.Shc.C.Input.Id"/>
|
||||
<inputType id="%Base.Compiler.Shc.C.Input1.Id.1495032261" name="C++ Input" superClass="%Base.Compiler.Shc.C.Input1.Id"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.assembler.Id.252059482" name="Assembler" outputFlag="" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.assembler.Id.1503720976">
|
||||
<inputType id="%Base.Assembler.shcInputType.Id.1764572327" name="Assembler InputType" superClass="%Base.Assembler.shcInputType.Id"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.linker.Id.270734961" name="Linker" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.linker.Id.1635879936"/>
|
||||
<tool id="%com.renesas.cdt.rxc.hardwaredebug.win32.tool.libgen.Id.345810510" name="Standard Library" superClass="%com.renesas.cdt.rxc.hardwaredebug.win32.tool.libgen.Id.763608360"/>
|
||||
<tool id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.convertor.Id.2001992067" name="Converter" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.convertor.Id.345873254"/>
|
||||
|
@ -178,7 +184,7 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cg_src/r_cg_sbrk.h|cg_src/r_cg_sbrk.c|cg_src/r_cg_main.c|cg_src/r_cg_cmt_user.c|cg_src/r_cg_cmt.h|cg_src/r_cg_cmt.c|cg_src - Copy|r_okaya_lcd.c|cg_src_OLD|r_cg_vecttbl.c|r_cg_vect.h|r_cg_userdefine.h|r_cg_stacksct.h|r_cg_sci.h|r_cg_sci.c|r_cg_sci_user.c|r_cg_sbrk.h|r_cg_sbrk.c|r_cg_resetprg.c|r_cg_port.h|r_cg_port.c|r_cg_port_user.c|r_cg_main.c|r_cg_macrodriver.h|r_cg_lpc.h|r_cg_lpc.c|r_cg_lpc_user.c|r_cg_intprg.c|r_cg_icu.h|r_cg_icu.c|r_cg_icu_user.c|r_cg_hardware_setup.c|r_cg_dbsct.c|r_cg_cmt.h|r_cg_cmt.c|r_cg_cmt_user.c|r_cg_cgc.h|r_cg_cgc.c|r_cg_cgc_user.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry excluding="cg_src/r_cg_main.c|cg_src/r_cg_cmt_user.c|cg_src/r_cg_cmt.h|cg_src/r_cg_cmt.c|cg_src - Copy|r_okaya_lcd.c|cg_src_OLD|r_cg_vecttbl.c|r_cg_vect.h|r_cg_userdefine.h|r_cg_stacksct.h|r_cg_sci.h|r_cg_sci.c|r_cg_sci_user.c|r_cg_sbrk.h|r_cg_sbrk.c|r_cg_resetprg.c|r_cg_port.h|r_cg_port.c|r_cg_port_user.c|r_cg_main.c|r_cg_macrodriver.h|r_cg_lpc.h|r_cg_lpc.c|r_cg_lpc_user.c|r_cg_intprg.c|r_cg_icu.h|r_cg_icu.c|r_cg_icu_user.c|r_cg_hardware_setup.c|r_cg_dbsct.c|r_cg_cmt.h|r_cg_cmt.c|r_cg_cmt_user.c|r_cg_cgc.h|r_cg_cgc.c|r_cg_cgc_user.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
|
|
@ -30,11 +30,26 @@
|
|||
<type>2</type>
|
||||
<locationURI>FREERTOS_ROOT/FreeRTOS/Source</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/Full_Demo/FreeRTOS-Plus-CLI</name>
|
||||
<type>2</type>
|
||||
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/Full_Demo/Sample-CLI-commands.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>2</type>
|
||||
<locationURI>FREERTOS_ROOT/FreeRTOS/Demo/Common/Minimal</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/Full_Demo/UARTCommandConsole.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks/include</name>
|
||||
<type>2</type>
|
||||
|
@ -79,7 +94,34 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201321</id>
|
||||
<id>1443945160058</id>
|
||||
<name>src/Full_Demo/FreeRTOS-Plus-CLI</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-*.c</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443945160058</id>
|
||||
<name>src/Full_Demo/FreeRTOS-Plus-CLI</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-*.h</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443945160068</id>
|
||||
<name>src/Full_Demo/FreeRTOS-Plus-CLI</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-*.url</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1443988432315</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -88,7 +130,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201326</id>
|
||||
<id>1443988432325</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -97,7 +139,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201332</id>
|
||||
<id>1443988432325</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -106,7 +148,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201337</id>
|
||||
<id>1443988432335</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -115,7 +157,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201342</id>
|
||||
<id>1443988432345</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -124,7 +166,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201347</id>
|
||||
<id>1443988432345</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -133,7 +175,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201353</id>
|
||||
<id>1443988432355</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -142,7 +184,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201358</id>
|
||||
<id>1443988432365</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -151,7 +193,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201363</id>
|
||||
<id>1443988432365</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -160,7 +202,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201367</id>
|
||||
<id>1443988432375</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -169,7 +211,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201373</id>
|
||||
<id>1443988432385</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -178,7 +220,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201377</id>
|
||||
<id>1443988432395</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -187,7 +229,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201382</id>
|
||||
<id>1443988432405</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -196,7 +238,7 @@
|
|||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201387</id>
|
||||
<id>1443988432415</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
|
@ -204,15 +246,6 @@
|
|||
<arguments>1.0-name-matches-false-false-TaskNotify.c</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442838201391</id>
|
||||
<name>src/Full_Demo/Standard_Demo_Tasks</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-TimerDemo.c</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>1442832632368</id>
|
||||
<name>src/FreeRTOS_Source/portable/MemMang</name>
|
||||
|
|
|
@ -84,24 +84,14 @@
|
|||
*
|
||||
* The Queue Send Task:
|
||||
* The queue send task is implemented by the prvQueueSendTask() function in
|
||||
* this file. prvQueueSendTask() sits in a loop that causes it to repeatedly
|
||||
* block for 200 milliseconds, before sending the value 100 to the queue that
|
||||
* was created within main_blinky(). Once the value is sent, the task loops
|
||||
* back around to block for another 200 milliseconds...and so on.
|
||||
* this file. It sends the value 100 to the queue every 200 milliseconds.
|
||||
*
|
||||
* The Queue Receive Task:
|
||||
* The queue receive task is implemented by the prvQueueReceiveTask() function
|
||||
* in this file. prvQueueReceiveTask() sits in a loop where it repeatedly
|
||||
* blocks on attempts to read data from the queue that was created within
|
||||
* main_blinky(). When data is received, the task checks the value of the
|
||||
* data, and if the value equals the expected 100, toggles an LED. The 'block
|
||||
* time' parameter passed to the queue receive function specifies that the
|
||||
* task should be held in the Blocked state indefinitely to wait for data to
|
||||
* be available on the queue. The queue receive task will only leave the
|
||||
* Blocked state when the queue send task writes to the queue. As the queue
|
||||
* send task writes to the queue every 200 milliseconds, the queue receive
|
||||
* task leaves the Blocked state every 200 milliseconds, and therefore toggles
|
||||
* the LED every 200 milliseconds.
|
||||
* in this file. It blocks on the queue to wait for data to arrive from the
|
||||
* queue send task - toggling the LED each time it receives the value 100. The
|
||||
* queue send task writes to the queue every 200ms, so the LED should toggle
|
||||
* every 200ms.
|
||||
*/
|
||||
|
||||
/* Kernel includes. */
|
||||
|
@ -120,7 +110,7 @@
|
|||
|
||||
/* The rate at which data is sent to the queue. The 200ms value is converted
|
||||
to ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )
|
||||
#define mainQUEUE_SEND_FREQUENCY_MS ( pdMS_TO_TICKS( 200UL ) )
|
||||
|
||||
/* The number of items the queue can hold. This is 1 as the receive task
|
||||
will remove items as they are added, meaning the send task should always find
|
||||
|
|
|
@ -87,13 +87,14 @@
|
|||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_IDLE_HOOK 1
|
||||
#define configUSE_TICK_HOOK 1
|
||||
#define configCPU_CLOCK_HZ ( 32000000 ) /* Set in mcu_info.h. */
|
||||
#define configPERIPHERAL_CLOCK_HZ ( 32000000 ) /* Set in muc_info.h. */
|
||||
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
|
||||
#define configMAX_PRIORITIES ( 7 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 45 * 1024 ) )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 38 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 12 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
|
@ -107,13 +108,17 @@
|
|||
#define configUSE_MALLOC_FAILED_HOOK 0
|
||||
#define configUSE_APPLICATION_TASK_TAG 0
|
||||
#define configUSE_COUNTING_SEMAPHORES 1
|
||||
#define configUSE_TICKLESS_IDLE 0
|
||||
|
||||
#define configMAX_PRIORITIES ( 7 )
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||
/* This demo makes use of one or more example stats formatting functions. These
|
||||
format the raw data provided by the uxTaskGetSystemState() function in to human
|
||||
readable ASCII form. See the notes in the implementation of vTaskList() within
|
||||
FreeRTOS/Source/tasks.c for limitations. */
|
||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
|
||||
|
||||
/* Software timer definitions. */
|
||||
#define configUSE_TIMERS 1
|
||||
#define configTIMER_TASK_PRIORITY ( 3 )
|
||||
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||
#define configTIMER_QUEUE_LENGTH 5
|
||||
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE )
|
||||
|
||||
|
@ -127,8 +132,8 @@ kernel is doing. */
|
|||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
to exclude the API function. */
|
||||
|
||||
to exclude the API function - alternative just use the linker to remove unused
|
||||
functions - which would be normal anyway. */
|
||||
#define INCLUDE_vTaskPrioritySet 1
|
||||
#define INCLUDE_uxTaskPriorityGet 1
|
||||
#define INCLUDE_vTaskDelete 1
|
||||
|
@ -141,18 +146,15 @@ to exclude the API function. */
|
|||
#define INCLUDE_eTaskGetState 1
|
||||
#define INCLUDE_xTimerPendFunctionCall 1
|
||||
|
||||
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
|
||||
/* Assert stops the system on the line that failed the assert(), which can then
|
||||
be viewed by pausing the debugger. */
|
||||
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); brk(); for( ;; ); }
|
||||
|
||||
/* The configPRE_SLEEP_PROCESSING() and configPOST_SLEEP_PROCESSING() macros
|
||||
allow the application writer to add additional code before and after the MCU is
|
||||
placed into the low power state respectively. The implementations provided in
|
||||
this demo can be extended to save even more power - for example the analog
|
||||
input used by the low power demo could be switched off in the pre-sleep macro
|
||||
and back on again in the post sleep macro. */
|
||||
void vPreSleepProcessing( unsigned long xExpectedIdleTime );
|
||||
void vPostSleepProcessing( unsigned long xExpectedIdleTime );
|
||||
#define configPRE_SLEEP_PROCESSING( xExpectedIdleTime ) vPreSleepProcessing( xExpectedIdleTime );
|
||||
#define configPOST_SLEEP_PROCESSING( xExpectedIdleTime ) vPostSleepProcessing( xExpectedIdleTime );
|
||||
/* The buffer into which output generated by FreeRTOS+CLI is placed. This must
|
||||
be at least big enough to contain the output of the task-stats command, as the
|
||||
example implementation does not include buffer overlow checking. */
|
||||
#define configCOMMAND_INT_MAX_OUTPUT_SIZE 3500
|
||||
#define configINCLUDE_QUERY_HEAP_COMMAND 1
|
||||
|
||||
/* configTICK_VECTOR must be set to the interrupt vector used by the peripheral
|
||||
that generates the tick interrupt. */
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
*
|
||||
******************************************************************************
|
||||
*
|
||||
* main_full() creates all the demo application tasks and software timers, then
|
||||
* main_full() creates a set of demo application tasks and software timers, then
|
||||
* starts the scheduler. The web documentation provides more details of the
|
||||
* standard demo application tasks, which provide no particular functionality,
|
||||
* but do provide a good example of how to use the FreeRTOS API.
|
||||
|
@ -89,6 +89,12 @@
|
|||
* In addition to the standard demo tasks, the following tasks and tests are
|
||||
* defined and/or created within this file:
|
||||
*
|
||||
* "FreeRTOS+CLI command console" - The command console uses SCI1 for its
|
||||
* input and output. The baud rate is set to 19200. Type "help" to see a list
|
||||
* of registered commands. The FreeRTOS+CLI license is different to the
|
||||
* FreeRTOS license, see http://www.FreeRTOS.org/cli for license and usage
|
||||
* details.
|
||||
*
|
||||
* "Reg test" tasks - These fill both the core and floating point registers with
|
||||
* known values, then check that each register maintains its expected value for
|
||||
* the lifetime of the task. Each task uses a different set of values. The reg
|
||||
|
@ -97,15 +103,14 @@
|
|||
* error in the context switching mechanism.
|
||||
*
|
||||
* "Check" task - The check task period is initially set to three seconds. The
|
||||
* task checks that all the standard demo tasks, and the register check tasks,
|
||||
* are not only still executing, but are executing without reporting any errors.
|
||||
* If the check task discovers that a task has either stalled, or reported an
|
||||
* error, then it changes its own execution period from the initial three
|
||||
* seconds, to just 200ms. The check task also toggles an LED each time it is
|
||||
* called. This provides a visual indication of the system status: If the LED
|
||||
* toggles every three seconds, then no issues have been discovered. If the LED
|
||||
* toggles every 200ms, then an issue has been discovered with at least one
|
||||
* task.
|
||||
* task checks that all the standard demo tasks are not only still executing,
|
||||
* but are executing without reporting any errors. If the check task discovers
|
||||
* that a task has either stalled, or reported an error, then it changes its own
|
||||
* execution period from the initial three seconds, to just 200ms. The check
|
||||
* task also toggles an LED on each iteration of its loop. This provides a
|
||||
* visual indication of the system status: If the LED toggles every three
|
||||
* seconds, then no issues have been discovered. If the LED toggles every
|
||||
* 200ms, then an issue has been discovered with at least one task.
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
|
@ -129,7 +134,6 @@
|
|||
#include "partest.h"
|
||||
#include "comtest2.h"
|
||||
#include "serial.h"
|
||||
#include "TimerDemo.h"
|
||||
#include "QueueOverwrite.h"
|
||||
#include "IntQueue.h"
|
||||
#include "EventGroupsDemo.h"
|
||||
|
@ -146,30 +150,26 @@
|
|||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2UL )
|
||||
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
|
||||
#define mainUART_COMMAND_CONSOLE_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3UL )
|
||||
#define mainCOM_TEST_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||
#define mainQUEUE_OVERWRITE_PRIORITY ( tskIDLE_PRIORITY )
|
||||
|
||||
/* The priority used by the UART command console task. */
|
||||
#define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
|
||||
|
||||
/* A block time of zero simply means "don't block". */
|
||||
#define mainDONT_BLOCK ( 0UL )
|
||||
#define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
||||
/* The period after which the check timer will expire, in ms, provided no errors
|
||||
have been reported by any of the standard demo tasks. ms are converted to the
|
||||
equivalent in ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainNO_ERROR_CHECK_TASK_PERIOD ( 3000UL / portTICK_PERIOD_MS )
|
||||
#define mainNO_ERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 3000UL )
|
||||
|
||||
/* The period at which the check timer will expire, in ms, if an error has been
|
||||
reported in one of the standard demo tasks. ms are converted to the equivalent
|
||||
in ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainERROR_CHECK_TASK_PERIOD ( 200UL / portTICK_PERIOD_MS )
|
||||
#define mainERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 200UL )
|
||||
|
||||
/* Parameters that are passed into the register check tasks solely for the
|
||||
purpose of ensuring parameters are passed into tasks correctly. */
|
||||
#define mainREG_TEST_1_PARAMETER ( ( void * ) 0x12121212UL )
|
||||
#define mainREG_TEST_2_PARAMETER ( ( void * ) 0x12345678UL )
|
||||
#define mainREG_TEST_1_PARAMETER ( ( void * ) 0x12121212UL )
|
||||
#define mainREG_TEST_2_PARAMETER ( ( void * ) 0x12345678UL )
|
||||
|
||||
/* The base period used by the timer test tasks. */
|
||||
#define mainTIMER_TEST_PERIOD ( 50 )
|
||||
|
@ -210,6 +210,17 @@ static void prvRegTest2Implementation( void );
|
|||
*/
|
||||
static void prvPseudoRandomiser( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Register commands that can be used with FreeRTOS+CLI. The commands are
|
||||
* defined in CLI-Commands.c and File-Related-CLI-Command.c respectively.
|
||||
*/
|
||||
extern void vRegisterSampleCLICommands( void );
|
||||
|
||||
/*
|
||||
* The task that manages the FreeRTOS+CLI input and output.
|
||||
*/
|
||||
extern void vUARTCommandConsoleStart( uint16_t usStackSize, UBaseType_t uxPriority );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The following two variables are used to communicate the status of the
|
||||
|
@ -218,9 +229,6 @@ then the register check tasks have not discovered any errors. If a variable
|
|||
stops incrementing, then an error has been found. */
|
||||
volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;
|
||||
|
||||
/* String for display in the web server. It is set to an error message if the
|
||||
check task detects an error. */
|
||||
const char *pcStatusMessage = "All tasks running without error";
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void main_full( void )
|
||||
|
@ -236,7 +244,6 @@ void main_full( void )
|
|||
vStartGenericQueueTasks( tskIDLE_PRIORITY );
|
||||
vStartRecursiveMutexTasks();
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
vStartTimerDemoTask( mainTIMER_TEST_PERIOD );
|
||||
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
|
||||
vStartEventGroupTasks();
|
||||
vStartTaskNotifyTask();
|
||||
|
@ -249,6 +256,13 @@ void main_full( void )
|
|||
/* Create the task that just adds a little random behaviour. */
|
||||
xTaskCreate( prvPseudoRandomiser, "Rnd", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL );
|
||||
|
||||
/* Start the tasks that implements the command console on the UART, as
|
||||
described above. */
|
||||
vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY );
|
||||
|
||||
/* Register the standard CLI commands. */
|
||||
vRegisterSampleCLICommands();
|
||||
|
||||
/* Create the task that performs the 'check' functionality, as described at
|
||||
the top of this file. */
|
||||
xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
@ -340,11 +354,6 @@ unsigned long ulErrorFound = pdFALSE;
|
|||
ulErrorFound |= 1UL << 8UL;
|
||||
}
|
||||
|
||||
if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )
|
||||
{
|
||||
ulErrorFound |= 1UL << 9UL;
|
||||
}
|
||||
|
||||
if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
ulErrorFound |= 1UL << 10UL;
|
||||
|
@ -396,7 +405,6 @@ unsigned long ulErrorFound = pdFALSE;
|
|||
gone wrong (it might just be that the loop back connector required
|
||||
by the comtest tasks has not been fitted). */
|
||||
xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;
|
||||
pcStatusMessage = "Error found in at least one task.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -441,10 +449,6 @@ volatile uint32_t ulNextRand = ( uint32_t ) &pvParameters, ulValue;
|
|||
|
||||
void vFullDemoTickHook( void )
|
||||
{
|
||||
/* The full demo includes a software timer demo/test that requires
|
||||
prodding periodically from the tick interrupt. */
|
||||
vTimerPeriodicISRTests();
|
||||
|
||||
/* Call the periodic queue overwrite from ISR demo. */
|
||||
vQueueOverwritePeriodicISRDemo();
|
||||
|
||||
|
|
|
@ -1,112 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* DISCLAIMER
|
||||
* This software is supplied by Renesas Electronics Corporation and is only
|
||||
* intended for use with Renesas products. No other uses are authorized. This
|
||||
* software is owned by Renesas Electronics Corporation and is protected under
|
||||
* all applicable laws, including copyright laws.
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
|
||||
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
|
||||
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
|
||||
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
|
||||
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
|
||||
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
|
||||
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
* Renesas reserves the right, without notice, to make changes to this software
|
||||
* and to discontinue the availability of this software. By using this software,
|
||||
* you agree to the additional terms and conditions found by accessing the
|
||||
* following link:
|
||||
* http://www.renesas.com/disclaimer
|
||||
*******************************************************************************/
|
||||
/* Copyright (C) 2014 Renesas Electronics Corporation. All rights reserved. */
|
||||
/*******************************************************************************
|
||||
* File Name : r_rsk_async.c
|
||||
* Version : 1.00
|
||||
* Device(s) : R5F51138AxFP
|
||||
* Tool-Chain : CCRX
|
||||
* H/W Platform : RSKRX113
|
||||
* Description : Functions used to send data via the SCI in asynchronous mode
|
||||
*******************************************************************************/
|
||||
/*******************************************************************************
|
||||
* History : 26.08.2014 Ver. 1.00 First Release
|
||||
*******************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
System Includes
|
||||
*******************************************************************************/
|
||||
/* Following header file provides string type definitions. */
|
||||
#include <string.h>
|
||||
|
||||
/*******************************************************************************
|
||||
User Includes (Project Level Includes)
|
||||
*******************************************************************************/
|
||||
/* Defines port registers */
|
||||
#include "r_cg_macrodriver.h"
|
||||
#include "r_cg_sci.h"
|
||||
#include "r_rsk_async.h"
|
||||
|
||||
/*******************************************************************************
|
||||
User Defines
|
||||
*******************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* Global Variables
|
||||
*******************************************************************************/
|
||||
|
||||
/* Declaration of the command string to clear the terminal screen */
|
||||
static const char cmd_clr_scr[] =
|
||||
{ 27, 91, 50, 74, 0, 27, 91, 72, 0 };
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Prototypes
|
||||
*******************************************************************************/
|
||||
|
||||
/* text_write function prototype */
|
||||
static void text_write (const char * const msg_string);
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name: R_ASYNC_Init
|
||||
* Description : This function initialises the SCI channel connected to the
|
||||
* RS232 connector on the RSK. The channel is configured for
|
||||
* transmission and reception, and instructions are sent to the
|
||||
* terminal.
|
||||
* Argument : none
|
||||
* Return value : none
|
||||
*******************************************************************************/
|
||||
void R_ASYNC_Init (void)
|
||||
{
|
||||
|
||||
/* Set up SCI1 receive buffer */
|
||||
R_SCI1_Serial_Receive((uint8_t *) &g_rx_char, 1);
|
||||
|
||||
/* Enable SCI1 operations */
|
||||
R_SCI1_Start();
|
||||
|
||||
/* Clear the text on terminal window */
|
||||
text_write(cmd_clr_scr);
|
||||
|
||||
/* Display splash screen on terminal window */
|
||||
text_write("Renesas RSKRX113 Async Serial \r\n");
|
||||
|
||||
/* Inform user on how to stop transmission */
|
||||
text_write("Press 'z' to stop and any key to resume\r\n\n");
|
||||
}
|
||||
/*******************************************************************************
|
||||
* End of function R_ASYNC_Init
|
||||
*******************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : text_write
|
||||
* Description : Transmits null-terminated string.
|
||||
* Argument : (char*) msg_string - null terminated string
|
||||
* Return value : None
|
||||
*******************************************************************************/
|
||||
static void text_write (const char * const msg_string)
|
||||
{
|
||||
R_SCI1_AsyncTransmit((uint8_t *) msg_string, (uint16_t) strlen(msg_string));
|
||||
}
|
||||
/*******************************************************************************
|
||||
* End of function text_write
|
||||
*******************************************************************************/
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* DISCLAIMER
|
||||
* This software is supplied by Renesas Electronics Corporation and is only
|
||||
* intended for use with Renesas products. No other uses are authorized. This
|
||||
* software is owned by Renesas Electronics Corporation and is protected under
|
||||
* all applicable laws, including copyright laws.
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
|
||||
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
|
||||
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
|
||||
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
|
||||
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
|
||||
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
|
||||
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
* Renesas reserves the right, without notice, to make changes to this software
|
||||
* and to discontinue the availability of this software. By using this software,
|
||||
* you agree to the additional terms and conditions found by accessing the
|
||||
* following link:
|
||||
* http://www.renesas.com/disclaimer
|
||||
*******************************************************************************/
|
||||
/* Copyright (C) 2014 Renesas Electronics Corporation. All rights reserved. */
|
||||
/*******************************************************************************
|
||||
* File Name : r_rsk_async.h
|
||||
* Version : 1.00
|
||||
* Device(s) : R5F51138AxFP
|
||||
* Tool-Chain : CCRX
|
||||
* H/W Platform : RSKRX113
|
||||
* Description : Functions used to send data via the SCI in asynchronous mode
|
||||
******************************************************************************/
|
||||
/*******************************************************************************
|
||||
* History : 26.08.2014 Ver. 1.00 First Release
|
||||
*******************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* Macro Definitions
|
||||
*******************************************************************************/
|
||||
/* Multiple inclusion prevention macro */
|
||||
#ifndef R_RSK_ASYNC_H
|
||||
#define R_RSK_ASYNC_H
|
||||
|
||||
/*******************************************************************************
|
||||
* Global Function Prototypes
|
||||
*******************************************************************************/
|
||||
/* initialise asynchronous transmission*/
|
||||
void R_ASYNC_Init (void);
|
||||
|
||||
/* End of multiple inclusion prevention macro */
|
||||
#endif
|
||||
|
|
@ -285,9 +285,9 @@ void R_SCI1_Start(void);
|
|||
void R_SCI1_Stop(void);
|
||||
MD_STATUS R_SCI1_Serial_Send(uint8_t * const tx_buf, uint16_t tx_num);
|
||||
MD_STATUS R_SCI1_Serial_Receive(uint8_t * const rx_buf, uint16_t rx_num);
|
||||
static void r_sci1_callback_transmitend(void);
|
||||
static void r_sci1_callback_receiveend(void);
|
||||
static void r_sci1_callback_receiveerror(void);
|
||||
void r_sci1_callback_transmitend(void);
|
||||
void r_sci1_callback_receiveend(void);
|
||||
void r_sci1_callback_receiveerror(void);
|
||||
|
||||
/* Start user code for function. Do not edit comment generated here */
|
||||
|
||||
|
@ -304,4 +304,4 @@ extern uint8_t g_rx_char;
|
|||
extern volatile uint8_t g_tx_flag;
|
||||
|
||||
/* End user code. Do not edit comment generated here */
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -30,6 +30,16 @@
|
|||
Pragma directive
|
||||
***********************************************************************************************************************/
|
||||
/* Start user code for pragma. Do not edit comment generated here */
|
||||
|
||||
|
||||
/*
|
||||
* This file originated from an example project for the RSK - it has been
|
||||
* adapted to allow it to be used in the FreeRTOS demo. Functions required by
|
||||
* UARTCommandConsole.c have been added.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* End user code. Do not edit comment generated here */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
|
@ -39,7 +49,10 @@ Includes
|
|||
#include "r_cg_sci.h"
|
||||
/* Start user code for include. Do not edit comment generated here */
|
||||
#include "rskrx113def.h"
|
||||
//_RB_#include "r_cg_cmt.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "serial.h"
|
||||
/* End user code. Do not edit comment generated here */
|
||||
#include "r_cg_userdefine.h"
|
||||
|
||||
|
@ -59,7 +72,21 @@ uint8_t g_rx_char;
|
|||
/* Flag used to control transmission to PC terminal */
|
||||
volatile uint8_t g_tx_flag = FALSE;
|
||||
|
||||
/* Flag used locally to detect transmission complete */
|
||||
/* Characters received from the UART are stored in this queue, ready to be
|
||||
received by the application. ***NOTE*** Using a queue in this way is very
|
||||
convenient, but also very inefficient. It can be used here because characters
|
||||
will only arrive slowly. In a higher bandwidth system a circular RAM buffer or
|
||||
DMA should be used in place of this queue. */
|
||||
static QueueHandle_t xRxQueue = NULL;
|
||||
|
||||
/* When a task calls vSerialPutString() its handle is stored in xSendingTask,
|
||||
before being placed into the Blocked state (so does not use any CPU time) to
|
||||
wait for the transmission to end. The task handle is then used from the UART
|
||||
transmit end interrupt to remove the task from the Blocked state. */
|
||||
static TaskHandle_t xSendingTask = NULL;
|
||||
|
||||
/* Flag used locally to detect transmission complete. This is used by the
|
||||
auto generated API only. */
|
||||
static volatile uint8_t sci1_txdone;
|
||||
|
||||
/* End user code. Do not edit comment generated here */
|
||||
|
@ -154,7 +181,7 @@ static void r_sci1_receiveerror_interrupt(void)
|
|||
|
||||
/* Clear overrun, framing and parity error flags */
|
||||
err_type = SCI1.SSR.BYTE;
|
||||
SCI1.SSR.BYTE = err_type & 0xC7U;
|
||||
SCI1.SSR.BYTE = err_type & ( uint8_t ) 0xC7;
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
* Function Name: r_sci1_callback_transmitend
|
||||
|
@ -162,11 +189,23 @@ static void r_sci1_receiveerror_interrupt(void)
|
|||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
static void r_sci1_callback_transmitend(void)
|
||||
void r_sci1_callback_transmitend(void)
|
||||
{
|
||||
/* Start user code. Do not edit comment generated here */
|
||||
sci1_txdone = TRUE;
|
||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* The sci1_txdone flag is used by the auto generated API only. */
|
||||
sci1_txdone = TRUE;
|
||||
|
||||
if( xSendingTask != NULL )
|
||||
{
|
||||
/* A task is waiting for the end of the Tx, unblock it now.
|
||||
http://www.freertos.org/vTaskNotifyGiveFromISR.html */
|
||||
vTaskNotifyGiveFromISR( xSendingTask, &xHigherPriorityTaskWoken );
|
||||
xSendingTask = NULL;
|
||||
|
||||
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/* End user code. Do not edit comment generated here */
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
|
@ -175,34 +214,33 @@ static void r_sci1_callback_transmitend(void)
|
|||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
static void r_sci1_callback_receiveend(void)
|
||||
void r_sci1_callback_receiveend(void)
|
||||
{
|
||||
/* Start user code. Do not edit comment generated here */
|
||||
/* Check the contents of g_rx_char */
|
||||
if ('z' == g_rx_char)
|
||||
{
|
||||
/* Stop the timer used to control transmission to PC terminal*/
|
||||
//_RB_ R_CMT0_Stop();
|
||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Turn off LED0 and turn on LED1 to indicate serial transmission
|
||||
inactive */
|
||||
LED0 = LED_OFF;
|
||||
LED1 = LED_ON;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Start the timer used to control transmission to PC terminal*/
|
||||
//_RB_ R_CMT0_Start();
|
||||
configASSERT( xRxQueue );
|
||||
|
||||
/* Turn on LED0 and turn off LED1 to indicate serial transmission
|
||||
active */
|
||||
LED0 = LED_ON;
|
||||
LED1 = LED_OFF;
|
||||
}
|
||||
/* Transmitting generates an interrupt for each character, which consumes
|
||||
CPU time, and can cause standard demo RTOS tasks that monitor their own
|
||||
performance to fail asserts - so don't receive new CLI commands if a
|
||||
transmit is not already in progress. */
|
||||
if( sci1_txdone == TRUE )
|
||||
{
|
||||
/* Characters received from the UART are stored in this queue, ready to be
|
||||
received by the application. ***NOTE*** Using a queue in this way is very
|
||||
convenient, but also very inefficient. It can be used here because
|
||||
characters will only arrive slowly. In a higher bandwidth system a circular
|
||||
RAM buffer or DMA should be used in place of this queue. */
|
||||
xQueueSendFromISR( xRxQueue, &g_rx_char, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
/* Set up SCI1 receive buffer again */
|
||||
R_SCI1_Serial_Receive((uint8_t *) &g_rx_char, 1);
|
||||
|
||||
/* See http://www.freertos.org/xQueueOverwriteFromISR.html for information
|
||||
on the semantics of this ISR. */
|
||||
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||
/* End user code. Do not edit comment generated here */
|
||||
}
|
||||
/***********************************************************************************************************************
|
||||
|
@ -211,7 +249,7 @@ static void r_sci1_callback_receiveend(void)
|
|||
* Arguments : None
|
||||
* Return Value : None
|
||||
***********************************************************************************************************************/
|
||||
static void r_sci1_callback_receiveerror(void)
|
||||
void r_sci1_callback_receiveerror(void)
|
||||
{
|
||||
/* Start user code. Do not edit comment generated here */
|
||||
/* End user code. Do not edit comment generated here */
|
||||
|
@ -249,4 +287,89 @@ MD_STATUS R_SCI1_AsyncTransmit (uint8_t * const tx_buf, const uint16_t tx_num)
|
|||
* End of function R_SCI1_AsyncTransmit
|
||||
***********************************************************************************************************************/
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
( void ) ulWantedBaud;
|
||||
( void ) uxQueueLength;
|
||||
|
||||
/* Characters received from the UART are stored in this queue, ready to be
|
||||
received by the application. ***NOTE*** Using a queue in this way is very
|
||||
convenient, but also very inefficient. It can be used here because
|
||||
characters will only arrive slowly. In a higher bandwidth system a circular
|
||||
RAM buffer or DMA should be used in place of this queue. */
|
||||
xRxQueue = xQueueCreate( uxQueueLength, sizeof( char ) );
|
||||
configASSERT( xRxQueue );
|
||||
|
||||
/* Set up SCI1 receive buffer */
|
||||
R_SCI1_Serial_Receive((uint8_t *) &g_rx_char, 1);
|
||||
|
||||
/* Ensure the interrupt priority is at or below
|
||||
configMAX_SYSCALL_INTERRUPT_PRIORITY. */
|
||||
IPR( SCI1, ERI1 ) = configMAX_SYSCALL_INTERRUPT_PRIORITY - 1;
|
||||
|
||||
/* Enable SCI1 operations */
|
||||
R_SCI1_Start();
|
||||
|
||||
/* Only one UART is supported, so it doesn't matter what is returned
|
||||
here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
const TickType_t xMaxBlockTime = pdMS_TO_TICKS( 5000 );
|
||||
|
||||
/* Only one port is supported. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Clear the flag before initiating a new transmission */
|
||||
sci1_txdone = FALSE;
|
||||
|
||||
/* Don't send the string unless the previous string has been sent. */
|
||||
if( xSendingTask == NULL )
|
||||
{
|
||||
/* Ensure the calling task's notification state is not already
|
||||
pending. */
|
||||
vTaskNotifyClear( NULL );
|
||||
|
||||
/* Store the handle of the transmitting task. This is used to unblock
|
||||
the task when the transmission has completed. */
|
||||
xSendingTask = xTaskGetCurrentTaskHandle();
|
||||
|
||||
/* Send the string using the auto-generated API. */
|
||||
R_SCI1_Serial_Send( ( uint8_t * ) pcString, usStringLength );
|
||||
|
||||
/* Wait in the Blocked state (so not using any CPU time) until the
|
||||
transmission has completed. */
|
||||
ulTaskNotifyTake( pdTRUE, xMaxBlockTime );
|
||||
}
|
||||
}
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )
|
||||
{
|
||||
/* Only one UART is supported. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Return a received character, if any are available. Otherwise block to
|
||||
wait for a character. */
|
||||
return xQueueReceive( xRxQueue, pcRxedChar, xBlockTime );
|
||||
}
|
||||
|
||||
/* Function required in order to link UARTCommandConsole.c - which is used by
|
||||
multiple different demo application. */
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )
|
||||
{
|
||||
/* Just mapped to vSerialPutString() so the block time is not used. */
|
||||
( void ) xBlockTime;
|
||||
|
||||
vSerialPutString( pxPort, &cOutChar, sizeof( cOutChar ) );
|
||||
return pdPASS;
|
||||
}
|
||||
|
||||
/* End user code. Do not edit comment generated here */
|
||||
|
|
|
@ -76,8 +76,7 @@
|
|||
* implemented and described in main_full.c.
|
||||
*
|
||||
* This file implements the code that is not demo specific, including the
|
||||
* hardware setup, standard FreeRTOS hook functions, and the ISR hander called
|
||||
* by the RTOS after interrupt entry (including nesting) has been taken care of.
|
||||
* hardware setup and standard FreeRTOS hook functions.
|
||||
*
|
||||
* ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON
|
||||
* THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO
|
||||
|
@ -90,16 +89,14 @@
|
|||
#include "task.h"
|
||||
#include "semphr.h"
|
||||
|
||||
/* Renesas includes. */
|
||||
/* Renesas includes. */
|
||||
#include <rskrx113def.h>
|
||||
#include "r_cg_macrodriver.h"
|
||||
#include "r_cg_sci.h"
|
||||
#include "r_rsk_async.h"
|
||||
|
||||
/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
|
||||
or 0 to run the more comprehensive test and demo application. */
|
||||
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
|
||||
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -144,18 +141,15 @@ int main( void )
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Should never get reached. */
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Set up SCI1 receive buffer */
|
||||
R_SCI1_Serial_Receive((uint8_t *) &g_rx_char, 1);
|
||||
|
||||
/* Enable SCI1 operations */
|
||||
R_SCI1_Start();
|
||||
|
||||
/* Some hardware setup is performed before main() is called. This routine
|
||||
just ensures the LEDs start off. */
|
||||
LED0 = LED_OFF;
|
||||
LED1 = LED_OFF;
|
||||
LED2 = LED_OFF;
|
||||
|
@ -210,6 +204,7 @@ volatile size_t xFreeHeapSpace;
|
|||
|
||||
void vApplicationTickHook( void )
|
||||
{
|
||||
/* The tick hook is not used by the blinky demo, but is by the full demo. */
|
||||
#if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0
|
||||
{
|
||||
extern void vFullDemoTickHook( void );
|
||||
|
@ -221,7 +216,9 @@ void vApplicationTickHook( void )
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The RX port uses this callback function to configure its tick interrupt.
|
||||
This allows the application to choose the tick interrupt source. */
|
||||
This allows the application to choose the tick interrupt source.
|
||||
***NOTE***: configTICK_VECTOR must be set in FreeRTOSConfig.h to be correct for
|
||||
whichever vector is used. */
|
||||
void vApplicationSetupTimerInterrupt( void )
|
||||
{
|
||||
const uint32_t ulEnableRegisterWrite = 0xA50BUL, ulDisableRegisterWrite = 0xA500UL;
|
||||
|
|
|
@ -1,429 +0,0 @@
|
|||
/*
|
||||
FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
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. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
The tasks defined on this page demonstrate the use of recursive mutexes.
|
||||
|
||||
For recursive mutex functionality the created mutex should be created using
|
||||
xSemaphoreCreateRecursiveMutex(), then be manipulated
|
||||
using the xSemaphoreTakeRecursive() and xSemaphoreGiveRecursive() API
|
||||
functions.
|
||||
|
||||
This demo creates three tasks all of which access the same recursive mutex:
|
||||
|
||||
prvRecursiveMutexControllingTask() has the highest priority so executes
|
||||
first and grabs the mutex. It then performs some recursive accesses -
|
||||
between each of which it sleeps for a short period to let the lower
|
||||
priority tasks execute. When it has completed its demo functionality
|
||||
it gives the mutex back before suspending itself.
|
||||
|
||||
prvRecursiveMutexBlockingTask() attempts to access the mutex by performing
|
||||
a blocking 'take'. The blocking task has a lower priority than the
|
||||
controlling task so by the time it executes the mutex has already been
|
||||
taken by the controlling task, causing the blocking task to block. It
|
||||
does not unblock until the controlling task has given the mutex back,
|
||||
and it does not actually run until the controlling task has suspended
|
||||
itself (due to the relative priorities). When it eventually does obtain
|
||||
the mutex all it does is give the mutex back prior to also suspending
|
||||
itself. At this point both the controlling task and the blocking task are
|
||||
suspended.
|
||||
|
||||
prvRecursiveMutexPollingTask() runs at the idle priority. It spins round
|
||||
a tight loop attempting to obtain the mutex with a non-blocking call. As
|
||||
the lowest priority task it will not successfully obtain the mutex until
|
||||
both the controlling and blocking tasks are suspended. Once it eventually
|
||||
does obtain the mutex it first unsuspends both the controlling task and
|
||||
blocking task prior to giving the mutex back - resulting in the polling
|
||||
task temporarily inheriting the controlling tasks priority.
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "semphr.h"
|
||||
|
||||
/* Demo app include files. */
|
||||
#include "recmutex.h"
|
||||
|
||||
/* Priorities assigned to the three tasks. */
|
||||
#define recmuCONTROLLING_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define recmuBLOCKING_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define recmuPOLLING_TASK_PRIORITY ( tskIDLE_PRIORITY + 0 )
|
||||
|
||||
/* In this version the tick period is very long, so the short delay cannot be
|
||||
for too many ticks, or the check task will execute and find that the recmutex
|
||||
tasks have not completed their functionality and then signal an error. The
|
||||
delay does however have to be long enough to allow the lower priority tasks
|
||||
a chance of executing - this is basically achieved by reducing the number
|
||||
of times the loop that takes/gives the recursive mutex executes. */
|
||||
#define recmuMAX_COUNT ( 2 )
|
||||
#define recmuSHORT_DELAY ( 20 )
|
||||
#define recmuNO_DELAY ( ( TickType_t ) 0 )
|
||||
#define recmuFIVE_TICK_DELAY ( ( TickType_t ) 5 )
|
||||
|
||||
/* The three tasks as described at the top of this file. */
|
||||
static void prvRecursiveMutexControllingTask( void *pvParameters );
|
||||
static void prvRecursiveMutexBlockingTask( void *pvParameters );
|
||||
static void prvRecursiveMutexPollingTask( void *pvParameters );
|
||||
|
||||
/* The mutex used by the demo. */
|
||||
static SemaphoreHandle_t xMutex;
|
||||
|
||||
/* Variables used to detect and latch errors. */
|
||||
static volatile portBASE_TYPE xErrorOccurred = pdFALSE, xControllingIsSuspended = pdFALSE, xBlockingIsSuspended = pdFALSE;
|
||||
static volatile unsigned portBASE_TYPE uxControllingCycles = 0, uxBlockingCycles = 0, uxPollingCycles = 0;
|
||||
|
||||
/* Handles of the two higher priority tasks, required so they can be resumed
|
||||
(unsuspended). */
|
||||
static TaskHandle_t xControllingTaskHandle, xBlockingTaskHandle, xPollingTaskHandle;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vStartRecursiveMutexTasks( void )
|
||||
{
|
||||
/* Just creates the mutex and the three tasks. */
|
||||
|
||||
xMutex = xSemaphoreCreateRecursiveMutex();
|
||||
|
||||
/* vQueueAddToRegistry() adds the mutex to the registry, if one is
|
||||
in use. The registry is provided as a means for kernel aware
|
||||
debuggers to locate mutex and has no purpose if a kernel aware debugger
|
||||
is not being used. The call to vQueueAddToRegistry() will be removed
|
||||
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is
|
||||
defined to be less than 1. */
|
||||
vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Recursive_Mutex" );
|
||||
|
||||
|
||||
if( xMutex != NULL )
|
||||
{
|
||||
xTaskCreate( prvRecursiveMutexControllingTask, "Rec1Ctrl", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle );
|
||||
xTaskCreate( prvRecursiveMutexBlockingTask, "Rec2Blck", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle );
|
||||
xTaskCreate( prvRecursiveMutexPollingTask, "Rec3Poll", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, &xPollingTaskHandle );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvRecursiveMutexControllingTask( void *pvParameters )
|
||||
{
|
||||
unsigned portBASE_TYPE ux;
|
||||
|
||||
/* Just to remove compiler warning. */
|
||||
( void ) pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Should not be able to 'give' the mutex, as we have not yet 'taken'
|
||||
it. The first time through, the mutex will not have been used yet,
|
||||
subsequent times through, at this point the mutex will be held by the
|
||||
polling task. */
|
||||
if( xSemaphoreGiveRecursive( xMutex ) == pdPASS )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
for( ux = 0; ux < recmuMAX_COUNT; ux++ )
|
||||
{
|
||||
/* We should now be able to take the mutex as many times as
|
||||
we like.
|
||||
|
||||
The first time through the mutex will be immediately available, on
|
||||
subsequent times through the mutex will be held by the polling task
|
||||
at this point and this Take will cause the polling task to inherit
|
||||
the priority of this task. In this case the block time must be
|
||||
long enough to ensure the polling task will execute again before the
|
||||
block time expires. If the block time does expire then the error
|
||||
flag will be set here. */
|
||||
if( xSemaphoreTakeRecursive( xMutex, recmuFIVE_TICK_DELAY ) != pdPASS )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
/* Ensure the other task attempting to access the mutex (and the
|
||||
other demo tasks) are able to execute to ensure they either block
|
||||
(where a block time is specified) or return an error (where no
|
||||
block time is specified) as the mutex is held by this task. */
|
||||
vTaskDelay( recmuSHORT_DELAY );
|
||||
}
|
||||
|
||||
/* For each time we took the mutex, give it back. */
|
||||
for( ux = 0; ux < recmuMAX_COUNT; ux++ )
|
||||
{
|
||||
/* Ensure the other task attempting to access the mutex (and the
|
||||
other demo tasks) are able to execute. */
|
||||
vTaskDelay( recmuSHORT_DELAY );
|
||||
|
||||
/* We should now be able to give the mutex as many times as we
|
||||
took it. When the mutex is available again the Blocking task
|
||||
should be unblocked but not run because it has a lower priority
|
||||
than this task. The polling task should also not run at this point
|
||||
as it too has a lower priority than this task. */
|
||||
if( xSemaphoreGiveRecursive( xMutex ) != pdPASS )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
#if configUSE_PREEMPTION == 0
|
||||
taskYIELD();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Having given it back the same number of times as it was taken, we
|
||||
should no longer be the mutex owner, so the next give should fail. */
|
||||
if( xSemaphoreGiveRecursive( xMutex ) == pdPASS )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
/* Keep count of the number of cycles this task has performed so a
|
||||
stall can be detected. */
|
||||
uxControllingCycles++;
|
||||
|
||||
/* Suspend ourselves so the blocking task can execute. */
|
||||
xControllingIsSuspended = pdTRUE;
|
||||
vTaskSuspend( NULL );
|
||||
xControllingIsSuspended = pdFALSE;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvRecursiveMutexBlockingTask( void *pvParameters )
|
||||
{
|
||||
/* Just to remove compiler warning. */
|
||||
( void ) pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* This task will run while the controlling task is blocked, and the
|
||||
controlling task will block only once it has the mutex - therefore
|
||||
this call should block until the controlling task has given up the
|
||||
mutex, and not actually execute past this call until the controlling
|
||||
task is suspended. */
|
||||
if( xSemaphoreTakeRecursive( xMutex, portMAX_DELAY ) == pdPASS )
|
||||
{
|
||||
if( xControllingIsSuspended != pdTRUE )
|
||||
{
|
||||
/* Did not expect to execute until the controlling task was
|
||||
suspended. */
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Give the mutex back before suspending ourselves to allow
|
||||
the polling task to obtain the mutex. */
|
||||
if( xSemaphoreGiveRecursive( xMutex ) != pdPASS )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
xBlockingIsSuspended = pdTRUE;
|
||||
vTaskSuspend( NULL );
|
||||
xBlockingIsSuspended = pdFALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We should not leave the xSemaphoreTakeRecursive() function
|
||||
until the mutex was obtained. */
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
/* The controlling and blocking tasks should be in lock step. */
|
||||
if( uxControllingCycles != ( uxBlockingCycles + 1 ) )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
/* Keep count of the number of cycles this task has performed so a
|
||||
stall can be detected. */
|
||||
uxBlockingCycles++;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvRecursiveMutexPollingTask( void *pvParameters )
|
||||
{
|
||||
/* Just to remove compiler warning. */
|
||||
( void ) pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Keep attempting to obtain the mutex. We should only obtain it when
|
||||
the blocking task has suspended itself, which in turn should only
|
||||
happen when the controlling task is also suspended. */
|
||||
if( xSemaphoreTakeRecursive( xMutex, recmuNO_DELAY ) == pdPASS )
|
||||
{
|
||||
/* Is the blocking task suspended? */
|
||||
if( ( xBlockingIsSuspended != pdTRUE ) || ( xControllingIsSuspended != pdTRUE ) )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Keep count of the number of cycles this task has performed
|
||||
so a stall can be detected. */
|
||||
uxPollingCycles++;
|
||||
|
||||
/* We can resume the other tasks here even though they have a
|
||||
higher priority than the polling task. When they execute they
|
||||
will attempt to obtain the mutex but fail because the polling
|
||||
task is still the mutex holder. The polling task (this task)
|
||||
will then inherit the higher priority. The Blocking task will
|
||||
block indefinitely when it attempts to obtain the mutex, the
|
||||
Controlling task will only block for a fixed period and an
|
||||
error will be latched if the polling task has not returned the
|
||||
mutex by the time this fixed period has expired. */
|
||||
vTaskResume( xBlockingTaskHandle );
|
||||
#if configUSE_PREEMPTION == 0
|
||||
taskYIELD();
|
||||
#endif
|
||||
|
||||
vTaskResume( xControllingTaskHandle );
|
||||
#if configUSE_PREEMPTION == 0
|
||||
taskYIELD();
|
||||
#endif
|
||||
|
||||
/* The other two tasks should now have executed and no longer
|
||||
be suspended. */
|
||||
if( ( xBlockingIsSuspended == pdTRUE ) || ( xControllingIsSuspended == pdTRUE ) )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
/* Release the mutex, disinheriting the higher priority again. */
|
||||
if( xSemaphoreGiveRecursive( xMutex ) != pdPASS )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
#if configUSE_PREEMPTION == 0
|
||||
taskYIELD();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if configUSE_PREEMPTION == 0
|
||||
{
|
||||
taskYIELD();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* This is called to check that all the created tasks are still running. */
|
||||
portBASE_TYPE xAreRecursiveMutexTasksStillRunning( void )
|
||||
{
|
||||
portBASE_TYPE xReturn;
|
||||
static unsigned portBASE_TYPE uxLastControllingCycles = 0, uxLastBlockingCycles = 0, uxLastPollingCycles = 0;
|
||||
|
||||
/* Is the controlling task still cycling? */
|
||||
if( uxLastControllingCycles == uxControllingCycles )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
uxLastControllingCycles = uxControllingCycles;
|
||||
}
|
||||
|
||||
/* Is the blocking task still cycling? */
|
||||
if( uxLastBlockingCycles == uxBlockingCycles )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
uxLastBlockingCycles = uxBlockingCycles;
|
||||
}
|
||||
|
||||
/* Is the polling task still cycling? */
|
||||
if( uxLastPollingCycles == uxPollingCycles )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
uxLastPollingCycles = uxPollingCycles;
|
||||
}
|
||||
|
||||
if( xErrorOccurred == pdTRUE )
|
||||
{
|
||||
xReturn = pdFAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = pdTRUE;
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -149,10 +149,10 @@
|
|||
<ClCompile Include="..\Common\Minimal\QueueOverwrite.c" />
|
||||
<ClCompile Include="..\Common\Minimal\QueueSet.c" />
|
||||
<ClCompile Include="..\Common\Minimal\QueueSetPolling.c" />
|
||||
<ClCompile Include="..\Common\Minimal\recmutex.c" />
|
||||
<ClCompile Include="..\Common\Minimal\semtest.c" />
|
||||
<ClCompile Include="..\Common\Minimal\TaskNotify.c" />
|
||||
<ClCompile Include="..\Common\Minimal\timerdemo.c" />
|
||||
<ClCompile Include="DemosModifiedForLowTickRate\recmutex.c" />
|
||||
<ClCompile Include="main.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
<Filter Include="FreeRTOS Source\Source\Portable">
|
||||
<UniqueIdentifier>{88f409e6-d396-4ac5-94bd-7a99c914be46}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Demo App Source\Common Demo Tasks\ModifiedForLowTickRate">
|
||||
<UniqueIdentifier>{143cf5a3-f134-4439-9f71-a201ae23b44b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Configuration Files">
|
||||
<UniqueIdentifier>{19ff1a34-36de-4c48-9d10-3fb1fa0d1fa4}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
|
@ -76,9 +73,6 @@
|
|||
<ClCompile Include="..\Common\Minimal\blocktim.c">
|
||||
<Filter>Demo App Source\Common Demo Tasks</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DemosModifiedForLowTickRate\recmutex.c">
|
||||
<Filter>Demo App Source\Common Demo Tasks\ModifiedForLowTickRate</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\Source\timers.c">
|
||||
<Filter>FreeRTOS Source\Source</Filter>
|
||||
</ClCompile>
|
||||
|
@ -145,6 +139,9 @@
|
|||
<ClCompile Include="..\Common\Minimal\QueueSetPolling.c">
|
||||
<Filter>Demo App Source\Common Demo Tasks</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Common\Minimal\recmutex.c">
|
||||
<Filter>Demo App Source\Common Demo Tasks</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="FreeRTOSConfig.h">
|
||||
|
|
|
@ -82,7 +82,6 @@
|
|||
#include "string.h"
|
||||
|
||||
/* Hardware specifics. */
|
||||
#warning Used to include the chip specific header here.
|
||||
#include "machine.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -166,8 +166,8 @@ extern void vTaskExitCritical( void );
|
|||
#define portEXIT_CRITICAL() vTaskExitCritical()
|
||||
|
||||
/* As this port allows interrupt nesting... */
|
||||
#define portSET_INTERRUPT_MASK_FROM_ISR() get_ipl(); set_ipl( ( long ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ) set_ipl( ( long ) uxSavedInterruptStatus )
|
||||
#define portSET_INTERRUPT_MASK_FROM_ISR() ( UBaseType_t ) get_ipl(); set_ipl( ( signed long ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ) set_ipl( ( signed long ) uxSavedInterruptStatus )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue