mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 16:57:41 -04:00
Fix MingW RTOS demo. (#897)
* Fix MingW RTOS demo. * Remove unnused variable. * Fix header check. * Remove tabs from source files. * Fix spelling. * Remove unneeded call to vTraceStop. * Fix function. * Fix code coverage project. * Add Makefile to MinGW demo. Co-authored-by: Jason Carroll <czjaso@amazon.com>
This commit is contained in:
parent
628f4216e5
commit
a545cb2aee
12 changed files with 1654 additions and 1363 deletions
|
@ -1,72 +0,0 @@
|
||||||
eclipse.preferences.version=1
|
|
||||||
inEditor=false
|
|
||||||
org.eclipse.cdt.codan.checkers.errnoreturn=-Warning
|
|
||||||
org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
|
|
||||||
org.eclipse.cdt.codan.checkers.errreturnvalue=-Error
|
|
||||||
org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.checkers.nocommentinside=-Error
|
|
||||||
org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.checkers.nolinecomment=-Error
|
|
||||||
org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.checkers.noreturn=-Error
|
|
||||||
org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.CatchByReference=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},unknown\=>false,exceptions\=>()}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},skip\=>true}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.InvalidArguments=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.OverloadProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>()}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},paramNot\=>false}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},else\=>false,afterelse\=>false}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=-Warning
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>("@(\#)","$Id")}
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=-Error
|
|
||||||
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
|
|
@ -1,31 +0,0 @@
|
||||||
eclipse.preferences.version=1
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.1332190083/CPATH/delimiter=;
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.1332190083/CPATH/operation=remove
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.1332190083/C_INCLUDE_PATH/delimiter=;
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.1332190083/C_INCLUDE_PATH/operation=remove
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.1332190083/append=true
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.1332190083/appendContributed=true
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.539393069/CPATH/delimiter=;
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.539393069/CPATH/operation=remove
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.539393069/C_INCLUDE_PATH/delimiter=;
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.539393069/C_INCLUDE_PATH/operation=remove
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.539393069/append=true
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.539393069/appendContributed=true
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239/CPATH/delimiter=;
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239/CPATH/operation=remove
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239/C_INCLUDE_PATH/delimiter=;
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239/C_INCLUDE_PATH/operation=remove
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239/append=true
|
|
||||||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239/appendContributed=true
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.1332190083/LIBRARY_PATH/delimiter=;
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.1332190083/LIBRARY_PATH/operation=remove
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.1332190083/append=true
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.1332190083/appendContributed=true
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.539393069/LIBRARY_PATH/delimiter=;
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.539393069/LIBRARY_PATH/operation=remove
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.539393069/append=true
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.539393069/appendContributed=true
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239/LIBRARY_PATH/delimiter=;
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239/LIBRARY_PATH/operation=remove
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239/append=true
|
|
||||||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.396692239/appendContributed=true
|
|
|
@ -1,2 +0,0 @@
|
||||||
eclipse.preferences.version=1
|
|
||||||
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
|
|
|
@ -23,6 +23,7 @@
|
||||||
* https://github.com/FreeRTOS
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FREERTOS_CONFIG_H
|
#ifndef FREERTOS_CONFIG_H
|
||||||
#define FREERTOS_CONFIG_H
|
#define FREERTOS_CONFIG_H
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@
|
||||||
#define configUSE_DAEMON_TASK_STARTUP_HOOK 1
|
#define configUSE_DAEMON_TASK_STARTUP_HOOK 1
|
||||||
#define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */
|
#define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */
|
||||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */
|
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */
|
||||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 65 * 1024 ) )
|
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 100 * 1024 ) )
|
||||||
#define configMAX_TASK_NAME_LEN ( 12 )
|
#define configMAX_TASK_NAME_LEN ( 12 )
|
||||||
#define configUSE_TRACE_FACILITY 1
|
#define configUSE_TRACE_FACILITY 1
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
|
|
148
FreeRTOS/Demo/WIN32-MingW/Makefile
Normal file
148
FreeRTOS/Demo/WIN32-MingW/Makefile
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
# Build directory
|
||||||
|
BUILD_DIR := ./build
|
||||||
|
|
||||||
|
# Compiler - Note this expects you are using MinGW version of GCC
|
||||||
|
CC := gcc
|
||||||
|
CFLAGS := -O0 -g3 -Wall -Wextra -c -fmessage-length=0 -Wcast-qual -D_WIN32_WINNT=0x0601
|
||||||
|
|
||||||
|
ifeq ($(COVERAGE_TEST),1)
|
||||||
|
CFLAGS += -DprojCOVERAGE_TEST=1
|
||||||
|
else
|
||||||
|
CFLAGS += -DprojCOVERAGE_TEST=0
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Linker - Note this expects you are using MinGW version of GCC
|
||||||
|
LD := gcc
|
||||||
|
LDFLAGS := -Xlinker -Map=$(BUILD_DIR)/rtosdemo.map
|
||||||
|
|
||||||
|
# Executable Targets
|
||||||
|
EXE := $(BUILD_DIR)/RTOSDemo.exe
|
||||||
|
|
||||||
|
# FreeRTOS Kernel
|
||||||
|
FREERTOS_KERNEL_DIR := $(abspath ../../Source)
|
||||||
|
FREERTOS_KERNEL_INCLUDES :=
|
||||||
|
FREERTOS_KERNEL_SOURCES :=
|
||||||
|
FREERTOS_KERNEL_INCLUDE_DIRS :=
|
||||||
|
FREERTOS_KERNEL_OBJS :=
|
||||||
|
FREERTOS_KERNEL_BUILD_DIR := $(BUILD_DIR)/FreeRTOS-Kernel
|
||||||
|
|
||||||
|
## FreeRTOS Kernel includes
|
||||||
|
FREERTOS_KERNEL_INCLUDES += $(wildcard $(FREERTOS_KERNEL_DIR)/include/*.h)
|
||||||
|
FREERTOS_KERNEL_INCLUDE_DIRS += -I $(FREERTOS_KERNEL_DIR)/include
|
||||||
|
|
||||||
|
## FreeRTOS Kernel sources
|
||||||
|
FREERTOS_KERNEL_SOURCES += $(wildcard $(FREERTOS_KERNEL_DIR)/*.c)
|
||||||
|
FREERTOS_KERNEL_SOURCES += $(FREERTOS_KERNEL_DIR)/portable/MemMang/heap_5.c
|
||||||
|
|
||||||
|
## FreeRTOS Kernel Windows port includes
|
||||||
|
FREERTOS_KERNEL_INCLUDES += $(FREERTOS_KERNEL_DIR)/portable/MSVC-MingW/portmacro.h
|
||||||
|
FREERTOS_KERNEL_INCLUDE_DIRS += -I $(FREERTOS_KERNEL_DIR)/portable/MSVC-MingW
|
||||||
|
|
||||||
|
## FreeRTOS Kernel Windows port sources
|
||||||
|
FREERTOS_KERNEL_SOURCES += $(FREERTOS_KERNEL_DIR)/portable/MSVC-MingW/port.c
|
||||||
|
|
||||||
|
## FreeRTOS Kernel configuration includes
|
||||||
|
FREERTOS_KERNEL_INCLUDES += ./FreeRTOSConfig.h
|
||||||
|
FREERTOS_KERNEL_INCLUDE_DIRS += -I .
|
||||||
|
|
||||||
|
# FreeRTOS Kernel objects
|
||||||
|
FREERTOS_KERNEL_SOURCES_NAMES :=$(notdir $(FREERTOS_KERNEL_SOURCES))
|
||||||
|
FREERTOS_KERNEL_OBJS := $(FREERTOS_KERNEL_SOURCES_NAMES:%.c=$(FREERTOS_KERNEL_BUILD_DIR)/%.o)
|
||||||
|
|
||||||
|
# Trace Recorder
|
||||||
|
FREERTOS_PLUS_TRACE_DIR := $(abspath ../../../FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace)
|
||||||
|
FREERTOS_PLUS_TRACE_INCLUDES :=
|
||||||
|
FREERTOS_PLUS_TRACE_SOURCES :=
|
||||||
|
FREERTOS_PLUS_TRACE_INCLUDE_DIRS :=
|
||||||
|
FREERTOS_PLUS_TRACE_OBJS :=
|
||||||
|
FREERTOS_PLUS_TRACE_BUILD_DIR := $(BUILD_DIR)/FreeRTOS-Plus-Trace
|
||||||
|
|
||||||
|
## Trace Recorder includes
|
||||||
|
FREERTOS_PLUS_TRACE_INCLUDES += $(wildcard $(FREERTOS_PLUS_TRACE_DIR)/Include/*.h)
|
||||||
|
FREERTOS_PLUS_TRACE_INCLUDE_DIRS += -I $(FREERTOS_PLUS_TRACE_DIR)/Include
|
||||||
|
|
||||||
|
## Trace Recorder sources
|
||||||
|
FREERTOS_PLUS_TRACE_SOURCES += $(wildcard $(FREERTOS_PLUS_TRACE_DIR)/*.c)
|
||||||
|
|
||||||
|
## Trace Recorder configuration includes
|
||||||
|
FREERTOS_PLUS_TRACE_INCLUDES += $(wildcard ./Trace_Recorder_Configuration/*.h)
|
||||||
|
FREERTOS_PLUS_TRACE_INCLUDE_DIRS += -I ./Trace_Recorder_Configuration
|
||||||
|
|
||||||
|
# Trace Recoder objects
|
||||||
|
FREERTOS_PLUS_TRACE_SOURCES_NAMES :=$(notdir $(FREERTOS_PLUS_TRACE_SOURCES))
|
||||||
|
FREERTOS_PLUS_TRACE_OBJS := $(FREERTOS_PLUS_TRACE_SOURCES_NAMES:%.c=$(FREERTOS_PLUS_TRACE_BUILD_DIR)/%.o)
|
||||||
|
|
||||||
|
# Demos
|
||||||
|
FREERTOS_DEMOS_DIR := $(abspath ../Common/Minimal)
|
||||||
|
FREERTOS_DEMOS_INCLUDES :=
|
||||||
|
FREERTOS_DEMOS_SOURCES :=
|
||||||
|
FREERTOS_DEMOS_INCLUDE_DIRS :=
|
||||||
|
FREERTOS_DEMOS_OBJS :=
|
||||||
|
FREERTOS_DEMOS_BUILD_DIR := $(BUILD_DIR)/FreeRTOS-Demos
|
||||||
|
|
||||||
|
## Demos includes
|
||||||
|
FREERTOS_DEMOS_INCLUDES := $(wildcard $(FREERTOS_DEMOS_DIR)/../include/*.h)
|
||||||
|
FREERTOS_DEMOS_INCLUDE_DIRS := -I $(FREERTOS_DEMOS_DIR)/../include
|
||||||
|
|
||||||
|
## Demos sources
|
||||||
|
FREERTOS_DEMOS_SOURCES += $(wildcard $(FREERTOS_DEMOS_DIR)/*.c)
|
||||||
|
|
||||||
|
### Filter out unsupported demos
|
||||||
|
FREERTOS_DEMOS_SOURCES := $(filter-out $(FREERTOS_DEMOS_DIR)/comtest_strings.c, $(FREERTOS_DEMOS_SOURCES))
|
||||||
|
FREERTOS_DEMOS_SOURCES := $(filter-out $(FREERTOS_DEMOS_DIR)/comtest.c, $(FREERTOS_DEMOS_SOURCES))
|
||||||
|
FREERTOS_DEMOS_SOURCES := $(filter-out $(FREERTOS_DEMOS_DIR)/flash_timer.c, $(FREERTOS_DEMOS_SOURCES))
|
||||||
|
FREERTOS_DEMOS_SOURCES := $(filter-out $(FREERTOS_DEMOS_DIR)/flash.c, $(FREERTOS_DEMOS_SOURCES))
|
||||||
|
FREERTOS_DEMOS_SOURCES := $(filter-out $(FREERTOS_DEMOS_DIR)/IntQueue.c, $(FREERTOS_DEMOS_SOURCES))
|
||||||
|
FREERTOS_DEMOS_SOURCES := $(filter-out $(FREERTOS_DEMOS_DIR)/recmutex.c, $(FREERTOS_DEMOS_SOURCES))
|
||||||
|
FREERTOS_DEMOS_SOURCES += ./DemosModifiedForLowTickRate/recmutex.c
|
||||||
|
FREERTOS_DEMOS_SOURCES := $(filter-out $(FREERTOS_DEMOS_DIR)/sp_flop.c, $(FREERTOS_DEMOS_SOURCES))
|
||||||
|
FREERTOS_DEMOS_SOURCES := $(filter-out $(FREERTOS_DEMOS_DIR)/TaskNotifyArray.c, $(FREERTOS_DEMOS_SOURCES))
|
||||||
|
|
||||||
|
## Demos objects
|
||||||
|
FREERTOS_DEMOS_SOURCES_NAMES :=$(notdir $(FREERTOS_DEMOS_SOURCES))
|
||||||
|
FREERTOS_DEMOS_OBJS := $(FREERTOS_DEMOS_SOURCES_NAMES:%.c=$(FREERTOS_DEMOS_BUILD_DIR)/%.o)
|
||||||
|
|
||||||
|
# Main
|
||||||
|
MAIN_DIR := .
|
||||||
|
MAIN_INCLUDES :=
|
||||||
|
MAIN_SOURCES :=
|
||||||
|
MAIN_INCLUDE_DIRS :=
|
||||||
|
MAIN_BUILD_DIR := $(BUILD_DIR)/main
|
||||||
|
|
||||||
|
## Main includes
|
||||||
|
|
||||||
|
## Main sources
|
||||||
|
MAIN_SOURCES += $(wildcard $(MAIN_DIR)/*.c)
|
||||||
|
|
||||||
|
## Main objects
|
||||||
|
MAIN_SOURCES_NAMES :=$(notdir $(MAIN_SOURCES))
|
||||||
|
MAIN_OBJS := $(MAIN_SOURCES_NAMES:%.c=$(MAIN_BUILD_DIR)/%.o)
|
||||||
|
|
||||||
|
$(EXE) : $(MAIN_OBJS) $(FREERTOS_KERNEL_OBJS) $(FREERTOS_DEMOS_OBJS) $(FREERTOS_PLUS_TRACE_OBJS)
|
||||||
|
$(LD) $(LDFLAGS) -o $@ $^ -lwinmm
|
||||||
|
|
||||||
|
# Main objects rules
|
||||||
|
$(MAIN_OBJS): %.o: $(MAIN_SOURCES) $(MAIN_INCLUDES) $(FREERTOS_KERNEL_INCLUDES) $(FREERTOS_PLUS_TRACE_INCLUDES) $(FREERTOS_DEMOS_INCLUDES)
|
||||||
|
mkdir -p $(@D)
|
||||||
|
$(CC) $(CFLAGS) $(FREERTOS_KERNEL_INCLUDE_DIRS) $(FREERTOS_PLUS_TRACE_INCLUDE_DIRS) $(FREERTOS_DEMOS_INCLUDE_DIRS) -o $@ $(filter %$(notdir $(patsubst %.o, %.c, $@)), $^)
|
||||||
|
|
||||||
|
# FreeRTOS Kernel objects rules
|
||||||
|
$(FREERTOS_KERNEL_OBJS): %.o: $(FREERTOS_KERNEL_SOURCES) $(FREERTOS_KERNEL_INCLUDES) $(FREERTOS_PLUS_TRACE_INCLUDES)
|
||||||
|
mkdir -p $(@D)
|
||||||
|
$(CC) $(CFLAGS) $(FREERTOS_KERNEL_INCLUDE_DIRS) $(FREERTOS_PLUS_TRACE_INCLUDE_DIRS) -o $@ $(filter %$(notdir $(patsubst %.o, %.c, $@)), $^)
|
||||||
|
|
||||||
|
# FreeRTOS Demos objects rules
|
||||||
|
$(FREERTOS_DEMOS_OBJS): %.o: $(FREERTOS_DEMOS_SOURCES) $(FREERTOS_DEMOS_INCLUDES) $(FREERTOS_KERNEL_INCLUDES) $(FREERTOS_PLUS_TRACE_INCLUDES)
|
||||||
|
mkdir -p $(@D)
|
||||||
|
$(CC) $(CFLAGS) $(FREERTOS_DEMOS_INCLUDE_DIRS) $(FREERTOS_KERNEL_INCLUDE_DIRS) $(FREERTOS_PLUS_TRACE_INCLUDE_DIRS) -o $@ $(filter %$(notdir $(patsubst %.o, %.c, $@)), $^)
|
||||||
|
|
||||||
|
# Trace Recorder object filess
|
||||||
|
$(FREERTOS_PLUS_TRACE_OBJS): %.o: $(FREERTOS_PLUS_TRACE_SOURCES) $(FREERTOS_PLUS_TRACE_INCLUDES) $(FREERTOS_KERNEL_INCLUDES)
|
||||||
|
mkdir -p $(@D)
|
||||||
|
$(CC) $(CFLAGS) $(FREERTOS_PLUS_TRACE_INCLUDE_DIRS) $(FREERTOS_KERNEL_INCLUDE_DIRS) -o $@ $(filter %$(notdir $(patsubst %.o, %.c, $@)), $^)
|
||||||
|
|
||||||
|
# Clean rule
|
||||||
|
clean:
|
||||||
|
rm -rf $(BUILD_DIR)
|
||||||
|
|
||||||
|
|
|
@ -1,49 +1,13 @@
|
||||||
/*******************************************************************************
|
/*
|
||||||
* Trace Recorder Library for Tracealyzer v3.1.2
|
* Trace Recorder for Tracealyzer v4.6.0
|
||||||
* Percepio AB, www.percepio.com
|
* Copyright 2021 Percepio AB
|
||||||
|
* www.percepio.com
|
||||||
*
|
*
|
||||||
* trcConfig.h
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
* Main configuration parameters for the trace recorder library.
|
* Main configuration parameters for the trace recorder library.
|
||||||
* More settings can be found in trcStreamingConfig.h and trcSnapshotConfig.h.
|
* More settings can be found in trcStreamingConfig.h and trcSnapshotConfig.h.
|
||||||
*
|
*/
|
||||||
* Read more at http://percepio.com/2016/10/05/rtos-tracing/
|
|
||||||
*
|
|
||||||
* Terms of Use
|
|
||||||
* This file is part of the trace recorder library (RECORDER), which is the
|
|
||||||
* intellectual property of Percepio AB (PERCEPIO) and provided under a
|
|
||||||
* license as follows.
|
|
||||||
* The RECORDER may be used free of charge for the purpose of recording data
|
|
||||||
* intended for analysis in PERCEPIO products. It may not be used or modified
|
|
||||||
* for other purposes without explicit permission from PERCEPIO.
|
|
||||||
* You may distribute the RECORDER in its original source code form, assuming
|
|
||||||
* this text (terms of use, disclaimer, copyright notice) is unchanged. You are
|
|
||||||
* allowed to distribute the RECORDER with minor modifications intended for
|
|
||||||
* configuration or porting of the RECORDER, e.g., to allow using it on a
|
|
||||||
* specific processor, processor family or with a specific communication
|
|
||||||
* interface. Any such modifications should be documented directly below
|
|
||||||
* this comment block.
|
|
||||||
*
|
|
||||||
* Disclaimer
|
|
||||||
* The RECORDER is being delivered to you AS IS and PERCEPIO makes no warranty
|
|
||||||
* as to its use or performance. PERCEPIO does not and cannot warrant the
|
|
||||||
* performance or results you may obtain by using the RECORDER or documentation.
|
|
||||||
* PERCEPIO make no warranties, express or implied, as to noninfringement of
|
|
||||||
* third party rights, merchantability, or fitness for any particular purpose.
|
|
||||||
* In no event will PERCEPIO, its technology partners, or distributors be liable
|
|
||||||
* to you for any consequential, incidental or special damages, including any
|
|
||||||
* lost profits or lost savings, even if a representative of PERCEPIO has been
|
|
||||||
* advised of the possibility of such damages, or for any claim by any third
|
|
||||||
* party. Some jurisdictions do not allow the exclusion or limitation of
|
|
||||||
* incidental, consequential or special damages, or the exclusion of implied
|
|
||||||
* warranties or limitations on how long an implied warranty may last, so the
|
|
||||||
* above limitations may not apply to you.
|
|
||||||
*
|
|
||||||
* Tabs are used for indent in this file (1 tab = 4 spaces)
|
|
||||||
*
|
|
||||||
* Copyright Percepio AB, 2016.
|
|
||||||
* www.percepio.com
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
#ifndef TRC_CONFIG_H
|
#ifndef TRC_CONFIG_H
|
||||||
#define TRC_CONFIG_H
|
#define TRC_CONFIG_H
|
||||||
|
@ -59,12 +23,10 @@ extern "C" {
|
||||||
* required at least for the ARM Cortex-M port, that uses the ARM CMSIS API.
|
* required at least for the ARM Cortex-M port, that uses the ARM CMSIS API.
|
||||||
* Try that in case of build problems. Otherwise, remove the #error line below.
|
* Try that in case of build problems. Otherwise, remove the #error line below.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
//#error "Trace Recorder: Please include your processor's header file here and remove this line."
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/**
|
||||||
* Configuration Macro: TRC_CFG_HARDWARE_PORT
|
* @def TRC_CFG_HARDWARE_PORT
|
||||||
*
|
* @brief Specify what hardware port to use (i.e., the "timestamping driver").
|
||||||
* Specify what hardware port to use (i.e., the "timestamping driver").
|
|
||||||
*
|
*
|
||||||
* All ARM Cortex-M MCUs are supported by "TRC_HARDWARE_PORT_ARM_Cortex_M".
|
* All ARM Cortex-M MCUs are supported by "TRC_HARDWARE_PORT_ARM_Cortex_M".
|
||||||
* This port uses the DWT cycle counter for Cortex-M3/M4/M7 devices, which is
|
* This port uses the DWT cycle counter for Cortex-M3/M4/M7 devices, which is
|
||||||
|
@ -78,78 +40,34 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* See trcHardwarePort.h for available ports and information on how to
|
* See trcHardwarePort.h for available ports and information on how to
|
||||||
* define your own port, if not already present.
|
* define your own port, if not already present.
|
||||||
******************************************************************************/
|
*/
|
||||||
#define TRC_CFG_HARDWARE_PORT TRC_HARDWARE_PORT_Win32
|
#define TRC_CFG_HARDWARE_PORT TRC_HARDWARE_PORT_Win32
|
||||||
|
|
||||||
/*******************************************************************************
|
/**
|
||||||
* Configuration Macro: TRC_CFG_RECORDER_MODE
|
* @def TRC_CFG_SCHEDULING_ONLY
|
||||||
*
|
* @brief Macro which should be defined as an integer value.
|
||||||
* Specify what recording mode to use. Snapshot means that the data is saved in
|
|
||||||
* an internal RAM buffer, for later upload. Streaming means that the data is
|
|
||||||
* transferred continuously to the host PC.
|
|
||||||
*
|
|
||||||
* For more information, see http://percepio.com/2016/10/05/rtos-tracing/
|
|
||||||
* and the Tracealyzer User Manual.
|
|
||||||
*
|
|
||||||
* Values:
|
|
||||||
* TRC_RECORDER_MODE_SNAPSHOT
|
|
||||||
* TRC_RECORDER_MODE_STREAMING
|
|
||||||
******************************************************************************/
|
|
||||||
#define TRC_CFG_RECORDER_MODE TRC_RECORDER_MODE_SNAPSHOT
|
|
||||||
/******************************************************************************
|
|
||||||
* TRC_CFG_FREERTOS_VERSION
|
|
||||||
*
|
|
||||||
* Specify what version of FreeRTOS that is used (don't change unless using the
|
|
||||||
* trace recorder library with an older version of FreeRTOS).
|
|
||||||
*
|
|
||||||
* TRC_FREERTOS_VERSION_7_3_X If using FreeRTOS v7.3.X
|
|
||||||
* TRC_FREERTOS_VERSION_7_4_X If using FreeRTOS v7.4.X
|
|
||||||
* TRC_FREERTOS_VERSION_7_5_X If using FreeRTOS v7.5.X
|
|
||||||
* TRC_FREERTOS_VERSION_7_6_X If using FreeRTOS v7.6.X
|
|
||||||
* TRC_FREERTOS_VERSION_8_X_X If using FreeRTOS v8.X.X
|
|
||||||
* TRC_FREERTOS_VERSION_9_0_0 If using FreeRTOS v9.0.0
|
|
||||||
* TRC_FREERTOS_VERSION_9_0_1 If using FreeRTOS v9.0.1
|
|
||||||
* TRC_FREERTOS_VERSION_9_0_2 If using FreeRTOS v9.0.2
|
|
||||||
* TRC_FREERTOS_VERSION_10_0_0 If using FreeRTOS v10.0.0
|
|
||||||
* TRC_FREERTOS_VERSION_10_0_1 If using FreeRTOS v10.0.1
|
|
||||||
* TRC_FREERTOS_VERSION_10_1_0 If using FreeRTOS v10.1.0
|
|
||||||
* TRC_FREERTOS_VERSION_10_1_1 If using FreeRTOS v10.1.1
|
|
||||||
* TRC_FREERTOS_VERSION_10_2_0 If using FreeRTOS v10.2.0
|
|
||||||
* TRC_FREERTOS_VERSION_10_2_1 If using FreeRTOS v10.2.1
|
|
||||||
* TRC_FREERTOS_VERSION_10_3_0 If using FreeRTOS v10.3.0
|
|
||||||
* TRC_FREERTOS_VERSION_10_3_1 If using FreeRTOS v10.3.1
|
|
||||||
* TRC_FREERTOS_VERSION_10_4_0 If using FreeRTOS v10.4.0 or later
|
|
||||||
*****************************************************************************/
|
|
||||||
#define TRC_CFG_FREERTOS_VERSION TRC_FREERTOS_VERSION_10_4_0
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* TRC_CFG_SCHEDULING_ONLY
|
|
||||||
*
|
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
*
|
*
|
||||||
* If this setting is enabled (= 1), only scheduling events are recorded.
|
* If this setting is enabled (= 1), only scheduling events are recorded.
|
||||||
* If disabled (= 0), all events are recorded (unless filtered in other ways).
|
* If disabled (= 0), all events are recorded (unless filtered in other ways).
|
||||||
*
|
*
|
||||||
* Default value is 0 (= include additional events).
|
* Default value is 0 (= include additional events).
|
||||||
******************************************************************************/
|
*/
|
||||||
#define TRC_CFG_SCHEDULING_ONLY 0
|
#define TRC_CFG_SCHEDULING_ONLY 0
|
||||||
|
|
||||||
/******************************************************************************
|
/**
|
||||||
* TRC_CFG_INCLUDE_MEMMANG_EVENTS
|
* @def TRC_CFG_INCLUDE_MEMMANG_EVENTS
|
||||||
*
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
*
|
||||||
* This controls if malloc and free calls should be traced. Set this to zero (0)
|
* This controls if malloc and free calls should be traced. Set this to zero (0)
|
||||||
* to exclude malloc/free calls, or one (1) to include such events in the trace.
|
* to exclude malloc/free calls, or one (1) to include such events in the trace.
|
||||||
*
|
*
|
||||||
* Default value is 1.
|
* Default value is 1.
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_INCLUDE_MEMMANG_EVENTS 1
|
#define TRC_CFG_INCLUDE_MEMMANG_EVENTS 1
|
||||||
|
|
||||||
/******************************************************************************
|
/**
|
||||||
* TRC_CFG_INCLUDE_USER_EVENTS
|
* @def TRC_CFG_INCLUDE_USER_EVENTS
|
||||||
*
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
*
|
||||||
* If this is zero (0), all code related to User Events is excluded in order
|
* If this is zero (0), all code related to User Events is excluded in order
|
||||||
* to reduce code size. Any attempts of storing User Events are then silently
|
* to reduce code size. Any attempts of storing User Events are then silently
|
||||||
|
@ -164,32 +82,37 @@ extern "C" {
|
||||||
* Note: In streaming mode, User Events are used to provide error messages
|
* Note: In streaming mode, User Events are used to provide error messages
|
||||||
* and warnings from the recorder (in case of incorrect configuration) for
|
* and warnings from the recorder (in case of incorrect configuration) for
|
||||||
* display in Tracealyzer. Disabling user events will also disable these
|
* display in Tracealyzer. Disabling user events will also disable these
|
||||||
* warnings. You can however still catch them by calling xTraceGetLastError
|
* warnings. You can however still catch them by calling xTraceErrorGetLast
|
||||||
* or by putting breakpoints in prvTraceError and prvTraceWarning.
|
* or by putting breakpoints in xTraceError and xTraceWarning.
|
||||||
*
|
*
|
||||||
* Default value is 1.
|
* Default value is 1.
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_INCLUDE_USER_EVENTS 1
|
#define TRC_CFG_INCLUDE_USER_EVENTS 1
|
||||||
|
|
||||||
/*****************************************************************************
|
/**
|
||||||
* TRC_CFG_INCLUDE_ISR_TRACING
|
* @def TRC_CFG_INCLUDE_ISR_TRACING
|
||||||
*
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
*
|
||||||
* If this is zero (0), the code for recording Interrupt Service Routines is
|
* If this is zero (0), the code for recording Interrupt Service Routines is
|
||||||
* excluded, in order to reduce code size.
|
* excluded, in order to reduce code size. This means that any calls to
|
||||||
|
* vTraceStoreISRBegin/vTraceStoreISREnd will be ignored.
|
||||||
|
* This does not completely disable ISR tracing, in cases where an ISR is
|
||||||
|
* calling a traced kernel service. These events will still be recorded and
|
||||||
|
* show up in anonymous ISR instances in Tracealyzer, with names such as
|
||||||
|
* "ISR sending to <queue name>".
|
||||||
|
* To disable such tracing, please refer to vTraceSetFilterGroup and
|
||||||
|
* vTraceSetFilterMask.
|
||||||
*
|
*
|
||||||
* Default value is 1.
|
* Default value is 1.
|
||||||
*
|
*
|
||||||
* Note: tracing ISRs requires that you insert calls to vTraceStoreISRBegin
|
* Note: tracing ISRs requires that you insert calls to vTraceStoreISRBegin
|
||||||
* and vTraceStoreISREnd in your interrupt handlers.
|
* and vTraceStoreISREnd in your interrupt handlers.
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_INCLUDE_ISR_TRACING 1
|
#define TRC_CFG_INCLUDE_ISR_TRACING 1
|
||||||
|
|
||||||
/*****************************************************************************
|
/**
|
||||||
* TRC_CFG_INCLUDE_READY_EVENTS
|
* @def TRC_CFG_INCLUDE_READY_EVENTS
|
||||||
*
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
*
|
||||||
* If one (1), events are recorded when tasks enter scheduling state "ready".
|
* If one (1), events are recorded when tasks enter scheduling state "ready".
|
||||||
* This allows Tracealyzer to show the initial pending time before tasks enter
|
* This allows Tracealyzer to show the initial pending time before tasks enter
|
||||||
|
@ -198,72 +121,102 @@ extern "C" {
|
||||||
* longer traces in the same amount of RAM.
|
* longer traces in the same amount of RAM.
|
||||||
*
|
*
|
||||||
* Default value is 1.
|
* Default value is 1.
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_INCLUDE_READY_EVENTS 1
|
#define TRC_CFG_INCLUDE_READY_EVENTS 1
|
||||||
|
|
||||||
/*****************************************************************************
|
/**
|
||||||
* TRC_CFG_INCLUDE_OSTICK_EVENTS
|
* @def TRC_CFG_INCLUDE_OSTICK_EVENTS
|
||||||
*
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
*
|
||||||
* If this is one (1), events will be generated whenever the OS clock is
|
* If this is one (1), events will be generated whenever the OS clock is
|
||||||
* increased. If zero (0), OS tick events are not generated, which allows for
|
* increased. If zero (0), OS tick events are not generated, which allows for
|
||||||
* recording longer traces in the same amount of RAM.
|
* recording longer traces in the same amount of RAM.
|
||||||
*
|
*
|
||||||
* Default value is 1.
|
* Default value is 1.
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_INCLUDE_OSTICK_EVENTS 1
|
#define TRC_CFG_INCLUDE_OSTICK_EVENTS 1
|
||||||
|
|
||||||
/*****************************************************************************
|
/**
|
||||||
* TRC_CFG_INCLUDE_EVENT_GROUP_EVENTS
|
* @def TRC_CFG_ENABLE_STACK_MONITOR
|
||||||
*
|
* @brief If enabled (1), the recorder periodically reports the unused stack space of
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* all active tasks.
|
||||||
*
|
* The stack monitoring runs in the Tracealyzer Control task, TzCtrl. This task
|
||||||
* If this is zero (0), the trace will exclude any "event group" events.
|
* is always created by the recorder when in streaming mode.
|
||||||
*
|
* In snapshot mode, the TzCtrl task is only used for stack monitoring and is
|
||||||
* Default value is 0 (excluded) since dependent on event_groups.c
|
* not created unless this is enabled.
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_INCLUDE_EVENT_GROUP_EVENTS 1
|
#define TRC_CFG_ENABLE_STACK_MONITOR 1
|
||||||
|
|
||||||
/*****************************************************************************
|
/**
|
||||||
* TRC_CFG_INCLUDE_TIMER_EVENTS
|
* @def TRC_CFG_STACK_MONITOR_MAX_TASKS
|
||||||
|
* @brief Macro which should be defined as a non-zero integer value.
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* This controls how many tasks that can be monitored by the stack monitor.
|
||||||
|
* If this is too small, some tasks will be excluded and a warning is shown.
|
||||||
*
|
*
|
||||||
* If this is zero (0), the trace will exclude any Timer events.
|
* Default value is 10.
|
||||||
*
|
*/
|
||||||
* Default value is 0 since dependent on timers.c
|
#define TRC_CFG_STACK_MONITOR_MAX_TASKS 50
|
||||||
*****************************************************************************/
|
|
||||||
#define TRC_CFG_INCLUDE_TIMER_EVENTS 1
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/**
|
||||||
* TRC_CFG_INCLUDE_PEND_FUNC_CALL_EVENTS
|
* @def TRC_CFG_STACK_MONITOR_MAX_REPORTS
|
||||||
|
* @brief Macro which should be defined as a non-zero integer value.
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* This defines how many tasks that will be subject to stack usage analysis for
|
||||||
|
* each execution of the Tracealyzer Control task (TzCtrl). Note that the stack
|
||||||
|
* monitoring cycles between the tasks, so this does not affect WHICH tasks that
|
||||||
|
* are monitored, but HOW OFTEN each task stack is analyzed.
|
||||||
*
|
*
|
||||||
* If this is zero (0), the trace will exclude any "pending function call"
|
* This setting can be combined with TRC_CFG_CTRL_TASK_DELAY to tune the
|
||||||
* events, such as xTimerPendFunctionCall().
|
* frequency of the stack monitoring. This is motivated since the stack analysis
|
||||||
|
* can take some time to execute.
|
||||||
|
* However, note that the stack analysis runs in a separate task (TzCtrl) that
|
||||||
|
* can be executed on low priority. This way, you can avoid that the stack
|
||||||
|
* analysis disturbs any time-sensitive tasks.
|
||||||
*
|
*
|
||||||
* Default value is 0 since dependent on timers.c
|
* Default value is 1.
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_INCLUDE_PEND_FUNC_CALL_EVENTS 1
|
#define TRC_CFG_STACK_MONITOR_MAX_REPORTS 1
|
||||||
|
|
||||||
/*******************************************************************************
|
/**
|
||||||
* Configuration Macro: TRC_CFG_INCLUDE_STREAM_BUFFER_EVENTS
|
* @def TRC_CFG_CTRL_TASK_PRIORITY
|
||||||
|
* @brief The scheduling priority of the Tracealyzer Control (TzCtrl) task.
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* In streaming mode, TzCtrl is used to receive start/stop commands from
|
||||||
|
* Tracealyzer and in some cases also to transmit the trace data (for stream
|
||||||
|
* ports that uses the internal buffer, like TCP/IP). For such stream ports,
|
||||||
|
* make sure the TzCtrl priority is high enough to ensure reliable periodic
|
||||||
|
* execution and transfer of the data, but low enough to avoid disturbing any
|
||||||
|
* time-sensitive functions.
|
||||||
*
|
*
|
||||||
* If this is zero (0), the trace will exclude any stream buffer or message
|
* In Snapshot mode, TzCtrl is only used for the stack usage monitoring and is
|
||||||
* buffer events.
|
* not created if stack monitoring is disabled. TRC_CFG_CTRL_TASK_PRIORITY should
|
||||||
*
|
* be low, to avoid disturbing any time-sensitive tasks.
|
||||||
* Default value is 0 since dependent on stream_buffer.c (new in FreeRTOS v10)
|
*/
|
||||||
******************************************************************************/
|
#define TRC_CFG_CTRL_TASK_PRIORITY 1
|
||||||
#define TRC_CFG_INCLUDE_STREAM_BUFFER_EVENTS 1
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/**
|
||||||
* Configuration Macro: TRC_CFG_RECORDER_BUFFER_ALLOCATION
|
* @def TRC_CFG_CTRL_TASK_DELAY
|
||||||
|
* @brief The delay between loops of the TzCtrl task (see TRC_CFG_CTRL_TASK_PRIORITY),
|
||||||
|
* which affects the frequency of the stack monitoring.
|
||||||
*
|
*
|
||||||
* Specifies how the recorder buffer is allocated (also in case of streaming, in
|
* In streaming mode, this also affects the trace data transfer if you are using
|
||||||
|
* a stream port leveraging the internal buffer (like TCP/IP). A shorter delay
|
||||||
|
* increases the CPU load of TzCtrl somewhat, but may improve the performance of
|
||||||
|
* of the trace streaming, especially if the trace buffer is small.
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_CTRL_TASK_DELAY 2
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_CTRL_TASK_STACK_SIZE
|
||||||
|
* @brief The stack size of the Tracealyzer Control (TzCtrl) task.
|
||||||
|
* See TRC_CFG_CTRL_TASK_PRIORITY for further information about TzCtrl.
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_CTRL_TASK_STACK_SIZE 1024
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_RECORDER_BUFFER_ALLOCATION
|
||||||
|
* @brief Specifies how the recorder buffer is allocated (also in case of streaming, in
|
||||||
* port using the recorder's internal temporary buffer)
|
* port using the recorder's internal temporary buffer)
|
||||||
*
|
*
|
||||||
* Values:
|
* Values:
|
||||||
|
@ -275,13 +228,12 @@ extern "C" {
|
||||||
* (static) or in runtime (malloc).
|
* (static) or in runtime (malloc).
|
||||||
* The custom mode allows you to control how and where the allocation is made,
|
* The custom mode allows you to control how and where the allocation is made,
|
||||||
* for details see TRC_ALLOC_CUSTOM_BUFFER and vTraceSetRecorderDataBuffer().
|
* for details see TRC_ALLOC_CUSTOM_BUFFER and vTraceSetRecorderDataBuffer().
|
||||||
******************************************************************************/
|
*/
|
||||||
#define TRC_CFG_RECORDER_BUFFER_ALLOCATION TRC_RECORDER_BUFFER_ALLOCATION_STATIC
|
#define TRC_CFG_RECORDER_BUFFER_ALLOCATION TRC_RECORDER_BUFFER_ALLOCATION_STATIC
|
||||||
|
|
||||||
/******************************************************************************
|
/**
|
||||||
* TRC_CFG_MAX_ISR_NESTING
|
* @def TRC_CFG_MAX_ISR_NESTING
|
||||||
*
|
* @brief Defines how many levels of interrupt nesting the recorder can handle, in
|
||||||
* Defines how many levels of interrupt nesting the recorder can handle, in
|
|
||||||
* case multiple ISRs are traced and ISR nesting is possible. If this
|
* case multiple ISRs are traced and ISR nesting is possible. If this
|
||||||
* is exceeded, the particular ISR will not be traced and the recorder then
|
* is exceeded, the particular ISR will not be traced and the recorder then
|
||||||
* logs an error message. This setting is used to allocate an internal stack
|
* logs an error message. This setting is used to allocate an internal stack
|
||||||
|
@ -290,15 +242,75 @@ extern "C" {
|
||||||
* This value must be a non-zero positive constant, at least 1.
|
* This value must be a non-zero positive constant, at least 1.
|
||||||
*
|
*
|
||||||
* Default value: 8
|
* Default value: 8
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_MAX_ISR_NESTING 8
|
#define TRC_CFG_MAX_ISR_NESTING 8
|
||||||
|
|
||||||
/* Specific configuration, depending on Streaming/Snapshot mode */
|
/**
|
||||||
#if (TRC_CFG_RECORDER_MODE == TRC_RECORDER_MODE_SNAPSHOT)
|
* @def TRC_CFG_ISR_TAILCHAINING_THRESHOLD
|
||||||
#include "trcSnapshotConfig.h"
|
* @brief Macro which should be defined as an integer value.
|
||||||
#elif (TRC_CFG_RECORDER_MODE == TRC_RECORDER_MODE_STREAMING)
|
*
|
||||||
#include "trcStreamingConfig.h"
|
* If tracing multiple ISRs, this setting allows for accurate display of the
|
||||||
#endif
|
* context-switching also in cases when the ISRs execute in direct sequence.
|
||||||
|
*
|
||||||
|
* vTraceStoreISREnd normally assumes that the ISR returns to the previous
|
||||||
|
* context, i.e., a task or a preempted ISR. But if another traced ISR
|
||||||
|
* executes in direct sequence, Tracealyzer may incorrectly display a minimal
|
||||||
|
* fragment of the previous context in between the ISRs.
|
||||||
|
*
|
||||||
|
* By using TRC_CFG_ISR_TAILCHAINING_THRESHOLD you can avoid this. This is
|
||||||
|
* however a threshold value that must be measured for your specific setup.
|
||||||
|
* See http://percepio.com/2014/03/21/isr_tailchaining_threshold/
|
||||||
|
*
|
||||||
|
* The default setting is 0, meaning "disabled" and that you may get an
|
||||||
|
* extra fragments of the previous context in between tail-chained ISRs.
|
||||||
|
*
|
||||||
|
* Note: This setting has separate definitions in trcSnapshotConfig.h and
|
||||||
|
* trcStreamingConfig.h, since it is affected by the recorder mode.
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_ISR_TAILCHAINING_THRESHOLD 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_RECORDER_DATA_INIT
|
||||||
|
* @brief Macro which states wether the recorder data should have an initial value.
|
||||||
|
*
|
||||||
|
* In very specific cases where traced objects are created before main(),
|
||||||
|
* the recorder will need to be started even before that. In these cases,
|
||||||
|
* the recorder data would be initialized by vTraceEnable(TRC_INIT) but could
|
||||||
|
* then later be overwritten by the initialization value.
|
||||||
|
* If this is an issue for you, set TRC_CFG_RECORDER_DATA_INIT to 0.
|
||||||
|
* The following code can then be used before any traced objects are created:
|
||||||
|
*
|
||||||
|
* extern uint32_t RecorderEnabled;
|
||||||
|
* RecorderEnabled = 0;
|
||||||
|
* xTraceInitialize();
|
||||||
|
*
|
||||||
|
* After the clocks are properly initialized, use vTraceEnable(...) to start
|
||||||
|
* the tracing.
|
||||||
|
*
|
||||||
|
* Default value is 1.
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_RECORDER_DATA_INIT 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_RECORDER_DATA_ATTRIBUTE
|
||||||
|
* @brief When setting TRC_CFG_RECORDER_DATA_INIT to 0, you might also need to make
|
||||||
|
* sure certain recorder data is placed in a specific RAM section to avoid being
|
||||||
|
* zeroed out after initialization. Define TRC_CFG_RECORDER_DATA_ATTRIBUTE as
|
||||||
|
* that attribute.
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* #define TRC_CFG_RECORDER_DATA_ATTRIBUTE __attribute__((section(".bss.trace_recorder_data")))
|
||||||
|
*
|
||||||
|
* Default value is empty.
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_RECORDER_DATA_ATTRIBUTE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_USE_TRACE_ASSERT
|
||||||
|
* @brief Enable or disable debug asserts. Information regarding any assert that is
|
||||||
|
* triggered will be in trcAssert.c.
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_USE_TRACE_ASSERT 0
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,116 @@
|
||||||
|
/*
|
||||||
|
* Trace Recorder for Tracealyzer v4.6.0
|
||||||
|
* Copyright 2021 Percepio AB
|
||||||
|
* www.percepio.com
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Configuration parameters for the kernel port.
|
||||||
|
* More settings can be found in trcKernelPortStreamingConfig.h and
|
||||||
|
* trcKernelPortSnapshotConfig.h.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TRC_KERNEL_PORT_CONFIG_H
|
||||||
|
#define TRC_KERNEL_PORT_CONFIG_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_RECORDER_MODE
|
||||||
|
* @brief Specify what recording mode to use. Snapshot means that the data is saved in
|
||||||
|
* an internal RAM buffer, for later upload. Streaming means that the data is
|
||||||
|
* transferred continuously to the host PC.
|
||||||
|
*
|
||||||
|
* For more information, see http://percepio.com/2016/10/05/rtos-tracing/
|
||||||
|
* and the Tracealyzer User Manual.
|
||||||
|
*
|
||||||
|
* Values:
|
||||||
|
* TRC_RECORDER_MODE_SNAPSHOT
|
||||||
|
* TRC_RECORDER_MODE_STREAMING
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_RECORDER_MODE TRC_RECORDER_MODE_SNAPSHOT
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_FREERTOS_VERSION
|
||||||
|
* @brief Specify what version of FreeRTOS that is used (don't change unless using the
|
||||||
|
* trace recorder library with an older version of FreeRTOS).
|
||||||
|
*
|
||||||
|
* TRC_FREERTOS_VERSION_7_3_X If using FreeRTOS v7.3.X
|
||||||
|
* TRC_FREERTOS_VERSION_7_4_X If using FreeRTOS v7.4.X
|
||||||
|
* TRC_FREERTOS_VERSION_7_5_X If using FreeRTOS v7.5.X
|
||||||
|
* TRC_FREERTOS_VERSION_7_6_X If using FreeRTOS v7.6.X
|
||||||
|
* TRC_FREERTOS_VERSION_8_X_X If using FreeRTOS v8.X.X
|
||||||
|
* TRC_FREERTOS_VERSION_9_0_0 If using FreeRTOS v9.0.0
|
||||||
|
* TRC_FREERTOS_VERSION_9_0_1 If using FreeRTOS v9.0.1
|
||||||
|
* TRC_FREERTOS_VERSION_9_0_2 If using FreeRTOS v9.0.2
|
||||||
|
* TRC_FREERTOS_VERSION_10_0_0 If using FreeRTOS v10.0.0
|
||||||
|
* TRC_FREERTOS_VERSION_10_0_1 If using FreeRTOS v10.0.1
|
||||||
|
* TRC_FREERTOS_VERSION_10_1_0 If using FreeRTOS v10.1.0
|
||||||
|
* TRC_FREERTOS_VERSION_10_1_1 If using FreeRTOS v10.1.1
|
||||||
|
* TRC_FREERTOS_VERSION_10_2_0 If using FreeRTOS v10.2.0
|
||||||
|
* TRC_FREERTOS_VERSION_10_2_1 If using FreeRTOS v10.2.1
|
||||||
|
* TRC_FREERTOS_VERSION_10_3_0 If using FreeRTOS v10.3.0
|
||||||
|
* TRC_FREERTOS_VERSION_10_3_1 If using FreeRTOS v10.3.1
|
||||||
|
* TRC_FREERTOS_VERSION_10_4_0 If using FreeRTOS v10.4.0
|
||||||
|
* TRC_FREERTOS_VERSION_10_4_1 If using FreeRTOS v10.4.1 or later
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_FREERTOS_VERSION TRC_FREERTOS_VERSION_10_4_1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_INCLUDE_EVENT_GROUP_EVENTS
|
||||||
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
|
*
|
||||||
|
* If this is zero (0), the trace will exclude any "event group" events.
|
||||||
|
*
|
||||||
|
* Default value is 0 (excluded) since dependent on event_groups.c
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_INCLUDE_EVENT_GROUP_EVENTS 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_INCLUDE_TIMER_EVENTS
|
||||||
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
|
*
|
||||||
|
* If this is zero (0), the trace will exclude any Timer events.
|
||||||
|
*
|
||||||
|
* Default value is 0 since dependent on timers.c
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_INCLUDE_TIMER_EVENTS 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_INCLUDE_PEND_FUNC_CALL_EVENTS
|
||||||
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
|
*
|
||||||
|
* If this is zero (0), the trace will exclude any "pending function call"
|
||||||
|
* events, such as xTimerPendFunctionCall().
|
||||||
|
*
|
||||||
|
* Default value is 0 since dependent on timers.c
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_INCLUDE_PEND_FUNC_CALL_EVENTS 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_INCLUDE_STREAM_BUFFER_EVENTS
|
||||||
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
|
*
|
||||||
|
* If this is zero (0), the trace will exclude any stream buffer or message
|
||||||
|
* buffer events.
|
||||||
|
*
|
||||||
|
* Default value is 0 since dependent on stream_buffer.c (new in FreeRTOS v10)
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_INCLUDE_STREAM_BUFFER_EVENTS 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_ACKNOWLEDGE_QUEUE_SET_SEND
|
||||||
|
* @brief When using FreeRTOS v10.3.0 or v10.3.1, please make sure that the trace
|
||||||
|
* point in prvNotifyQueueSetContainer() in queue.c is renamed from
|
||||||
|
* traceQUEUE_SEND to traceQUEUE_SET_SEND in order to tell them apart from
|
||||||
|
* other traceQUEUE_SEND trace points. Then set this to TRC_ACKNOWLEDGED.
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_ACKNOWLEDGE_QUEUE_SET_SEND 0 /* TRC_ACKNOWLEDGED */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* TRC_KERNEL_PORT_CONFIG_H */
|
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* Trace Recorder for Tracealyzer v4.6.0
|
||||||
|
* Copyright 2021 Percepio AB
|
||||||
|
* www.percepio.com
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Kernel port configuration parameters for snapshot mode.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TRC_KERNEL_PORT_SNAPSHOT_CONFIG_H
|
||||||
|
#define TRC_KERNEL_PORT_SNAPSHOT_CONFIG_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_NTASK, TRC_CFG_NISR, TRC_CFG_NQUEUE, TRC_CFG_NSEMAPHORE...
|
||||||
|
* @brief A group of macros which should be defined as integer values, zero or larger.
|
||||||
|
*
|
||||||
|
* These define the capacity of the Object Property Table, i.e., the maximum
|
||||||
|
* number of objects active at any given point, within each object class (e.g.,
|
||||||
|
* task, queue, semaphore, ...).
|
||||||
|
*
|
||||||
|
* If tasks or other objects are deleted in your system, this
|
||||||
|
* setting does not limit the total amount of objects created, only the number
|
||||||
|
* of objects that have been successfully created but not yet deleted.
|
||||||
|
*
|
||||||
|
* Using too small values will cause vTraceError to be called, which stores an
|
||||||
|
* error message in the trace that is shown when opening the trace file. The
|
||||||
|
* error message can also be retrieved using xTraceGetLastError.
|
||||||
|
*
|
||||||
|
* It can be wise to start with large values for these constants,
|
||||||
|
* unless you are very confident on these numbers. Then do a recording and
|
||||||
|
* check the actual usage by selecting View menu -> Trace Details ->
|
||||||
|
* Resource Usage -> Object Table.
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_NTASK 150
|
||||||
|
#define TRC_CFG_NISR 90
|
||||||
|
#define TRC_CFG_NQUEUE 90
|
||||||
|
#define TRC_CFG_NSEMAPHORE 90
|
||||||
|
#define TRC_CFG_NMUTEX 90
|
||||||
|
#define TRC_CFG_NTIMER 250
|
||||||
|
#define TRC_CFG_NEVENTGROUP 90
|
||||||
|
#define TRC_CFG_NSTREAMBUFFER 50
|
||||||
|
#define TRC_CFG_NMESSAGEBUFFER 50
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def TRC_CFG_NAME_LEN_TASK, TRC_CFG_NAME_LEN_QUEUE, ...
|
||||||
|
* @brief Macros that specify the maximum lengths (number of characters) for names of
|
||||||
|
* kernel objects, such as tasks and queues. If longer names are used, they will
|
||||||
|
* be truncated when stored in the recorder.
|
||||||
|
*/
|
||||||
|
#define TRC_CFG_NAME_LEN_TASK 15
|
||||||
|
#define TRC_CFG_NAME_LEN_ISR 15
|
||||||
|
#define TRC_CFG_NAME_LEN_QUEUE 15
|
||||||
|
#define TRC_CFG_NAME_LEN_SEMAPHORE 15
|
||||||
|
#define TRC_CFG_NAME_LEN_MUTEX 15
|
||||||
|
#define TRC_CFG_NAME_LEN_TIMER 15
|
||||||
|
#define TRC_CFG_NAME_LEN_EVENTGROUP 15
|
||||||
|
#define TRC_CFG_NAME_LEN_STREAMBUFFER 15
|
||||||
|
#define TRC_CFG_NAME_LEN_MESSAGEBUFFER 15
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* TRC_KERNEL_PORT_SNAPSHOT_CONFIG_H */
|
|
@ -1,58 +1,24 @@
|
||||||
/*******************************************************************************
|
/*
|
||||||
* Trace Recorder Library for Tracealyzer v3.1.2
|
* Trace Recorder for Tracealyzer v4.6.0
|
||||||
* Percepio AB, www.percepio.com
|
* Copyright 2021 Percepio AB
|
||||||
|
* www.percepio.com
|
||||||
*
|
*
|
||||||
* trcSnapshotConfig.h
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
* Configuration parameters for trace recorder library in snapshot mode.
|
* Configuration parameters for trace recorder library in snapshot mode.
|
||||||
* Read more at http://percepio.com/2016/10/05/rtos-tracing/
|
* Read more at http://percepio.com/2016/10/05/rtos-tracing/
|
||||||
*
|
*/
|
||||||
* Terms of Use
|
|
||||||
* This file is part of the trace recorder library (RECORDER), which is the
|
|
||||||
* intellectual property of Percepio AB (PERCEPIO) and provided under a
|
|
||||||
* license as follows.
|
|
||||||
* The RECORDER may be used free of charge for the purpose of recording data
|
|
||||||
* intended for analysis in PERCEPIO products. It may not be used or modified
|
|
||||||
* for other purposes without explicit permission from PERCEPIO.
|
|
||||||
* You may distribute the RECORDER in its original source code form, assuming
|
|
||||||
* this text (terms of use, disclaimer, copyright notice) is unchanged. You are
|
|
||||||
* allowed to distribute the RECORDER with minor modifications intended for
|
|
||||||
* configuration or porting of the RECORDER, e.g., to allow using it on a
|
|
||||||
* specific processor, processor family or with a specific communication
|
|
||||||
* interface. Any such modifications should be documented directly below
|
|
||||||
* this comment block.
|
|
||||||
*
|
|
||||||
* Disclaimer
|
|
||||||
* The RECORDER is being delivered to you AS IS and PERCEPIO makes no warranty
|
|
||||||
* as to its use or performance. PERCEPIO does not and cannot warrant the
|
|
||||||
* performance or results you may obtain by using the RECORDER or documentation.
|
|
||||||
* PERCEPIO make no warranties, express or implied, as to noninfringement of
|
|
||||||
* third party rights, merchantability, or fitness for any particular purpose.
|
|
||||||
* In no event will PERCEPIO, its technology partners, or distributors be liable
|
|
||||||
* to you for any consequential, incidental or special damages, including any
|
|
||||||
* lost profits or lost savings, even if a representative of PERCEPIO has been
|
|
||||||
* advised of the possibility of such damages, or for any claim by any third
|
|
||||||
* party. Some jurisdictions do not allow the exclusion or limitation of
|
|
||||||
* incidental, consequential or special damages, or the exclusion of implied
|
|
||||||
* warranties or limitations on how long an implied warranty may last, so the
|
|
||||||
* above limitations may not apply to you.
|
|
||||||
*
|
|
||||||
* Tabs are used for indent in this file (1 tab = 4 spaces)
|
|
||||||
*
|
|
||||||
* Copyright Percepio AB, 2017.
|
|
||||||
* www.percepio.com
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
#ifndef TRC_SNAPSHOT_CONFIG_H
|
#ifndef TRC_SNAPSHOT_CONFIG_H
|
||||||
#define TRC_SNAPSHOT_CONFIG_H
|
#define TRC_SNAPSHOT_CONFIG_H
|
||||||
|
|
||||||
#define TRC_SNAPSHOT_MODE_RING_BUFFER (0x01)
|
#ifdef __cplusplus
|
||||||
#define TRC_SNAPSHOT_MODE_STOP_WHEN_FULL (0x02)
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/******************************************************************************
|
/**
|
||||||
* TRC_CFG_SNAPSHOT_MODE
|
* @def TRC_CFG_SNAPSHOT_MODE
|
||||||
*
|
* @brief Macro which should be defined as one of:
|
||||||
* Macro which should be defined as one of:
|
|
||||||
* - TRC_SNAPSHOT_MODE_RING_BUFFER
|
* - TRC_SNAPSHOT_MODE_RING_BUFFER
|
||||||
* - TRC_SNAPSHOT_MODE_STOP_WHEN_FULL
|
* - TRC_SNAPSHOT_MODE_STOP_WHEN_FULL
|
||||||
* Default is TRC_SNAPSHOT_MODE_RING_BUFFER.
|
* Default is TRC_SNAPSHOT_MODE_RING_BUFFER.
|
||||||
|
@ -66,13 +32,12 @@
|
||||||
* When TRC_CFG_SNAPSHOT_MODE is TRC_SNAPSHOT_MODE_STOP_WHEN_FULL, the
|
* When TRC_CFG_SNAPSHOT_MODE is TRC_SNAPSHOT_MODE_STOP_WHEN_FULL, the
|
||||||
* recording is stopped when the buffer becomes full. This is useful for
|
* recording is stopped when the buffer becomes full. This is useful for
|
||||||
* recording events following a specific state, e.g., the startup sequence.
|
* recording events following a specific state, e.g., the startup sequence.
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_SNAPSHOT_MODE TRC_SNAPSHOT_MODE_RING_BUFFER
|
#define TRC_CFG_SNAPSHOT_MODE TRC_SNAPSHOT_MODE_RING_BUFFER
|
||||||
|
|
||||||
/*******************************************************************************
|
/**
|
||||||
* TRC_CFG_EVENT_BUFFER_SIZE
|
* @def TRC_CFG_EVENT_BUFFER_SIZE
|
||||||
*
|
* @brief Macro which should be defined as an integer value.
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
*
|
*
|
||||||
* This defines the capacity of the event buffer, i.e., the number of records
|
* This defines the capacity of the event buffer, i.e., the number of records
|
||||||
* it may store. Most events use one record (4 byte), although some events
|
* it may store. Most events use one record (4 byte), although some events
|
||||||
|
@ -81,46 +46,12 @@
|
||||||
*
|
*
|
||||||
* Default value is 1000, which means that 4000 bytes is allocated for the
|
* Default value is 1000, which means that 4000 bytes is allocated for the
|
||||||
* event buffer.
|
* event buffer.
|
||||||
******************************************************************************/
|
*/
|
||||||
#define TRC_CFG_EVENT_BUFFER_SIZE 15000
|
#define TRC_CFG_EVENT_BUFFER_SIZE 250000
|
||||||
|
|
||||||
/*******************************************************************************
|
/**
|
||||||
* TRC_CFG_NTASK, TRC_CFG_NISR, TRC_CFG_NQUEUE, TRC_CFG_NSEMAPHORE...
|
* @def TRC_CFG_INCLUDE_FLOAT_SUPPORT
|
||||||
*
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
* A group of macros which should be defined as integer values, zero or larger.
|
|
||||||
*
|
|
||||||
* These define the capacity of the Object Property Table, i.e., the maximum
|
|
||||||
* number of objects active at any given point, within each object class (e.g.,
|
|
||||||
* task, queue, semaphore, ...).
|
|
||||||
*
|
|
||||||
* If tasks or other objects are deleted in your system, this
|
|
||||||
* setting does not limit the total amount of objects created, only the number
|
|
||||||
* of objects that have been successfully created but not yet deleted.
|
|
||||||
*
|
|
||||||
* Using too small values will cause vTraceError to be called, which stores an
|
|
||||||
* error message in the trace that is shown when opening the trace file. The
|
|
||||||
* error message can also be retrieved using xTraceGetLastError.
|
|
||||||
*
|
|
||||||
* It can be wise to start with large values for these constants,
|
|
||||||
* unless you are very confident on these numbers. Then do a recording and
|
|
||||||
* check the actual usage by selecting View menu -> Trace Details ->
|
|
||||||
* Resource Usage -> Object Table.
|
|
||||||
******************************************************************************/
|
|
||||||
#define TRC_CFG_NTASK 150
|
|
||||||
#define TRC_CFG_NISR 90
|
|
||||||
#define TRC_CFG_NQUEUE 90
|
|
||||||
#define TRC_CFG_NSEMAPHORE 90
|
|
||||||
#define TRC_CFG_NMUTEX 90
|
|
||||||
#define TRC_CFG_NTIMER 250
|
|
||||||
#define TRC_CFG_NEVENTGROUP 90
|
|
||||||
#define TRC_CFG_NSTREAMBUFFER 5
|
|
||||||
#define TRC_CFG_NMESSAGEBUFFER 5
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* TRC_CFG_INCLUDE_FLOAT_SUPPORT
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
*
|
||||||
* If this is zero (0), the support for logging floating point values in
|
* If this is zero (0), the support for logging floating point values in
|
||||||
* vTracePrintF is stripped out, in case floating point values are not used or
|
* vTracePrintF is stripped out, in case floating point values are not used or
|
||||||
|
@ -132,13 +63,12 @@
|
||||||
* vTracePrintF can be used with integer and string arguments in either case.
|
* vTracePrintF can be used with integer and string arguments in either case.
|
||||||
*
|
*
|
||||||
* Default value is 0.
|
* Default value is 0.
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_INCLUDE_FLOAT_SUPPORT 0
|
#define TRC_CFG_INCLUDE_FLOAT_SUPPORT 0
|
||||||
|
|
||||||
/*******************************************************************************
|
/**
|
||||||
* TRC_CFG_SYMBOL_TABLE_SIZE
|
* @def TRC_CFG_SYMBOL_TABLE_SIZE
|
||||||
*
|
* @brief Macro which should be defined as an integer value.
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
*
|
*
|
||||||
* This defines the capacity of the symbol table, in bytes. This symbol table
|
* This defines the capacity of the symbol table, in bytes. This symbol table
|
||||||
* stores User Events labels and names of deleted tasks, queues, or other kernel
|
* stores User Events labels and names of deleted tasks, queues, or other kernel
|
||||||
|
@ -148,30 +78,13 @@
|
||||||
* 32-bit pointer, i.e., using 4 bytes rather than 0.
|
* 32-bit pointer, i.e., using 4 bytes rather than 0.
|
||||||
*
|
*
|
||||||
* Default value is 800.
|
* Default value is 800.
|
||||||
******************************************************************************/
|
*/
|
||||||
#define TRC_CFG_SYMBOL_TABLE_SIZE 5000
|
#define TRC_CFG_SYMBOL_TABLE_SIZE 8000
|
||||||
|
|
||||||
#if (TRC_CFG_SYMBOL_TABLE_SIZE == 0)
|
#if ( TRC_CFG_SYMBOL_TABLE_SIZE == 0 )
|
||||||
#error "TRC_CFG_SYMBOL_TABLE_SIZE may not be zero!"
|
#error "TRC_CFG_SYMBOL_TABLE_SIZE may not be zero!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* TRC_CFG_NAME_LEN_TASK, TRC_CFG_NAME_LEN_QUEUE, ...
|
|
||||||
*
|
|
||||||
* Macros that specify the maximum lengths (number of characters) for names of
|
|
||||||
* kernel objects, such as tasks and queues. If longer names are used, they will
|
|
||||||
* be truncated when stored in the recorder.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define TRC_CFG_NAME_LEN_TASK 15
|
|
||||||
#define TRC_CFG_NAME_LEN_ISR 15
|
|
||||||
#define TRC_CFG_NAME_LEN_QUEUE 15
|
|
||||||
#define TRC_CFG_NAME_LEN_SEMAPHORE 15
|
|
||||||
#define TRC_CFG_NAME_LEN_MUTEX 15
|
|
||||||
#define TRC_CFG_NAME_LEN_TIMER 15
|
|
||||||
#define TRC_CFG_NAME_LEN_EVENTGROUP 15
|
|
||||||
#define TRC_CFG_NAME_LEN_STREAMBUFFER 15
|
|
||||||
#define TRC_CFG_NAME_LEN_MESSAGEBUFFER 15
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*** ADVANCED SETTINGS ********************************************************
|
*** ADVANCED SETTINGS ********************************************************
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
|
@ -180,37 +93,35 @@
|
||||||
* are not interested in, in order to get longer traces.
|
* are not interested in, in order to get longer traces.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/******************************************************************************
|
/**
|
||||||
* TRC_CFG_HEAP_SIZE_BELOW_16M
|
* @def TRC_CFG_HEAP_SIZE_BELOW_16M
|
||||||
*
|
* @brief An integer constant that can be used to reduce the buffer usage of memory
|
||||||
* An integer constant that can be used to reduce the buffer usage of memory
|
* allocation events (malloc/free). This value should be 1 if the heap size is
|
||||||
* allocation events (malloc/free). This value should be 1 if the heap size is
|
* below 16 MB (2^24 byte), and you can live with reported addresses showing the
|
||||||
* below 16 MB (2^24 byte), and you can live with reported addresses showing the
|
* lower 24 bits only. If 0, you get the full 32-bit addresses.
|
||||||
* lower 24 bits only. If 0, you get the full 32-bit addresses.
|
*
|
||||||
*
|
* Default value is 0.
|
||||||
* Default value is 0.
|
*/
|
||||||
******************************************************************************/
|
|
||||||
#define TRC_CFG_HEAP_SIZE_BELOW_16M 0
|
#define TRC_CFG_HEAP_SIZE_BELOW_16M 0
|
||||||
|
|
||||||
/******************************************************************************
|
/**
|
||||||
* TRC_CFG_USE_IMPLICIT_IFE_RULES
|
* @def TRC_CFG_USE_IMPLICIT_IFE_RULES
|
||||||
*
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 1.
|
* Default is 1.
|
||||||
*
|
*
|
||||||
* Tracealyzer groups the events into "instances" based on Instance Finish
|
* Tracealyzer groups the events into "instances" based on Instance Finish
|
||||||
* Events (IFEs), produced either by default rules or calls to the recorder
|
* Events (IFEs), produced either by default rules or calls to the recorder
|
||||||
* functions vTraceInstanceFinishedNow and vTraceInstanceFinishedNext.
|
* functions xTraceTaskInstanceFinishedNow and xTraceTaskInstanceFinishedNext.
|
||||||
*
|
*
|
||||||
* If TRC_CFG_USE_IMPLICIT_IFE_RULES is one (1), the default IFE rules is
|
* If TRC_CFG_USE_IMPLICIT_IFE_RULES is one (1), the default IFE rules is
|
||||||
* used, resulting in a "typical" grouping of events into instances.
|
* used, resulting in a "typical" grouping of events into instances.
|
||||||
* If these rules don't give appropriate instances in your case, you can
|
* If these rules don't give appropriate instances in your case, you can
|
||||||
* override the default rules using vTraceInstanceFinishedNow/Next for one
|
* override the default rules using xTraceTaskInstanceFinishedNow/Next for one
|
||||||
* or several tasks. The default IFE rules are then disabled for those tasks.
|
* or several tasks. The default IFE rules are then disabled for those tasks.
|
||||||
*
|
*
|
||||||
* If TRC_CFG_USE_IMPLICIT_IFE_RULES is zero (0), the implicit IFE rules are
|
* If TRC_CFG_USE_IMPLICIT_IFE_RULES is zero (0), the implicit IFE rules are
|
||||||
* disabled globally. You must then call vTraceInstanceFinishedNow or
|
* disabled globally. You must then call xTraceTaskInstanceFinishedNow or
|
||||||
* vTraceInstanceFinishedNext to manually group the events into instances,
|
* xTraceTaskInstanceFinishedNext to manually group the events into instances,
|
||||||
* otherwise the tasks will appear a single long instance.
|
* otherwise the tasks will appear a single long instance.
|
||||||
*
|
*
|
||||||
* The default IFE rules count the following events as "instance finished":
|
* The default IFE rules count the following events as "instance finished":
|
||||||
|
@ -218,16 +129,12 @@
|
||||||
* - Task suspend
|
* - Task suspend
|
||||||
* - Blocking on "input" operations, i.e., when the task is waiting for the
|
* - Blocking on "input" operations, i.e., when the task is waiting for the
|
||||||
* next a message/signal/event. But only if this event is blocking.
|
* next a message/signal/event. But only if this event is blocking.
|
||||||
*
|
*/
|
||||||
* For details, see trcSnapshotKernelPort.h and look for references to the
|
|
||||||
* macro trcKERNEL_HOOKS_SET_TASK_INSTANCE_FINISHED.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define TRC_CFG_USE_IMPLICIT_IFE_RULES 1
|
#define TRC_CFG_USE_IMPLICIT_IFE_RULES 1
|
||||||
|
|
||||||
/******************************************************************************
|
/**
|
||||||
* TRC_CFG_USE_16BIT_OBJECT_HANDLES
|
* @def TRC_CFG_USE_16BIT_OBJECT_HANDLES
|
||||||
*
|
* @brief Macro which should be defined as either zero (0) or one (1).
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
*
|
||||||
* If set to 0 (zero), the recorder uses 8-bit handles to identify kernel
|
* If set to 0 (zero), the recorder uses 8-bit handles to identify kernel
|
||||||
* objects such as tasks and queues. This limits the supported number of
|
* objects such as tasks and queues. This limits the supported number of
|
||||||
|
@ -245,31 +152,12 @@
|
||||||
* NOTE: An object with handle above 255 will use an extra 4-byte record in
|
* NOTE: An object with handle above 255 will use an extra 4-byte record in
|
||||||
* the event buffer whenever the object is referenced. Moreover, some internal
|
* the event buffer whenever the object is referenced. Moreover, some internal
|
||||||
* tables in the recorder gets slightly larger when using 16-bit handles.
|
* tables in the recorder gets slightly larger when using 16-bit handles.
|
||||||
*****************************************************************************/
|
*/
|
||||||
#define TRC_CFG_USE_16BIT_OBJECT_HANDLES 0
|
#define TRC_CFG_USE_16BIT_OBJECT_HANDLES 0
|
||||||
|
|
||||||
/******************************************************************************
|
/**
|
||||||
* TRC_CFG_USE_TRACE_ASSERT
|
* @def TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER
|
||||||
*
|
* @brief Macro which should be defined as an integer value.
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 1.
|
|
||||||
*
|
|
||||||
* If this is one (1), the TRACE_ASSERT macro (used at various locations in the
|
|
||||||
* trace recorder) will verify that a relevant condition is true.
|
|
||||||
* If the condition is false, prvTraceError() will be called, which stops the
|
|
||||||
* recording and stores an error message that is displayed when opening the
|
|
||||||
* trace in Tracealyzer.
|
|
||||||
*
|
|
||||||
* This is used on several places in the recorder code for sanity checks on
|
|
||||||
* parameters. Can be switched off to reduce the footprint of the tracing, but
|
|
||||||
* we recommend to have it enabled initially.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define TRC_CFG_USE_TRACE_ASSERT 1
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER
|
|
||||||
*
|
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
*
|
*
|
||||||
* Set TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER to 1 to enable the
|
* Set TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER to 1 to enable the
|
||||||
* separate user event buffer (UB).
|
* separate user event buffer (UB).
|
||||||
|
@ -292,13 +180,16 @@
|
||||||
* repeating events, using the same format string within each channel.
|
* repeating events, using the same format string within each channel.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
*
|
* TraceStringHandle_t chn1;
|
||||||
* traceString chn1 = xTraceRegisterString("Channel 1");
|
* TraceStringHandle_t fmt1;
|
||||||
* traceString fmt1 = xTraceRegisterString("Event!");
|
* xTraceStringRegister("Channel 1", &chn1);
|
||||||
|
* xTraceStringRegister("Event!", &fmt1);
|
||||||
* traceUBChannel UBCh1 = xTraceRegisterUBChannel(chn1, fmt1);
|
* traceUBChannel UBCh1 = xTraceRegisterUBChannel(chn1, fmt1);
|
||||||
*
|
*
|
||||||
* traceString chn2 = xTraceRegisterString("Channel 2");
|
* TraceStringHandle_t chn2;
|
||||||
* traceString fmt2 = xTraceRegisterString("X: %d, Y: %d");
|
* TraceStringHandle_t fmt2;
|
||||||
|
* xTraceStringRegister("Channel 2", &chn2);
|
||||||
|
* xTraceStringRegister("X: %d, Y: %d", &fmt2);
|
||||||
* traceUBChannel UBCh2 = xTraceRegisterUBChannel(chn2, fmt2);
|
* traceUBChannel UBCh2 = xTraceRegisterUBChannel(chn2, fmt2);
|
||||||
*
|
*
|
||||||
* // Result in "[Channel 1] Event!"
|
* // Result in "[Channel 1] Event!"
|
||||||
|
@ -307,7 +198,7 @@
|
||||||
* // Result in "[Channel 2] X: 23, Y: 19"
|
* // Result in "[Channel 2] X: 23, Y: 19"
|
||||||
* vTraceUBData(UBCh2, 23, 19);
|
* vTraceUBData(UBCh2, 23, 19);
|
||||||
*
|
*
|
||||||
* You can also use the other user event functions, like vTracePrintF.
|
* You can also use the other user event functions, like xTracePrintF.
|
||||||
* as they are then rerouted to the UB instead of the main event buffer.
|
* as they are then rerouted to the UB instead of the main event buffer.
|
||||||
* vTracePrintF then looks up the correct UB channel based on the
|
* vTracePrintF then looks up the correct UB channel based on the
|
||||||
* provided channel name and format string, or creates a new UB channel
|
* provided channel name and format string, or creates a new UB channel
|
||||||
|
@ -316,30 +207,27 @@
|
||||||
* be stored using %s and with the string as an argument.
|
* be stored using %s and with the string as an argument.
|
||||||
*
|
*
|
||||||
* // Creates a new UB channel ("Channel 2", "%Z: %d")
|
* // Creates a new UB channel ("Channel 2", "%Z: %d")
|
||||||
* vTracePrintF(chn2, "%Z: %d", value1);
|
* xTracePrintF(chn2, "%Z: %d", value1);
|
||||||
*
|
*
|
||||||
* // Finds the existing UB channel
|
* // Finds the existing UB channel
|
||||||
* vTracePrintF(chn2, "%Z: %d", value2);
|
* xTracePrintF(chn2, "%Z: %d", value2);
|
||||||
|
*/
|
||||||
******************************************************************************/
|
|
||||||
#define TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER 0
|
#define TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER 0
|
||||||
|
|
||||||
/*******************************************************************************
|
/**
|
||||||
* TRC_CFG_SEPARATE_USER_EVENT_BUFFER_SIZE
|
* @def TRC_CFG_SEPARATE_USER_EVENT_BUFFER_SIZE
|
||||||
*
|
* @brief Macro which should be defined as an integer value.
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
*
|
*
|
||||||
* This defines the capacity of the user event buffer (UB), in number of slots.
|
* This defines the capacity of the user event buffer (UB), in number of slots.
|
||||||
* A single user event can use multiple slots, depending on the arguments.
|
* A single user event can use multiple slots, depending on the arguments.
|
||||||
*
|
*
|
||||||
* Only applicable if TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER is 1.
|
* Only applicable if TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER is 1.
|
||||||
******************************************************************************/
|
*/
|
||||||
#define TRC_CFG_SEPARATE_USER_EVENT_BUFFER_SIZE 200
|
#define TRC_CFG_SEPARATE_USER_EVENT_BUFFER_SIZE 200
|
||||||
|
|
||||||
/*******************************************************************************
|
/**
|
||||||
* TRC_CFG_UB_CHANNELS
|
* @def TRC_CFG_UB_CHANNELS
|
||||||
*
|
* @brief Macro which should be defined as an integer value.
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
*
|
*
|
||||||
* This defines the number of User Event Buffer Channels (UB channels).
|
* This defines the number of User Event Buffer Channels (UB channels).
|
||||||
* These are used to structure the events when using the separate user
|
* These are used to structure the events when using the separate user
|
||||||
|
@ -347,32 +235,11 @@
|
||||||
* a default format string for the channel.
|
* a default format string for the channel.
|
||||||
*
|
*
|
||||||
* Only applicable if TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER is 1.
|
* Only applicable if TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER is 1.
|
||||||
******************************************************************************/
|
*/
|
||||||
#define TRC_CFG_UB_CHANNELS 32
|
#define TRC_CFG_UB_CHANNELS 32
|
||||||
|
|
||||||
/*******************************************************************************
|
#ifdef __cplusplus
|
||||||
* TRC_CFG_ISR_TAILCHAINING_THRESHOLD
|
}
|
||||||
*
|
#endif
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
*
|
|
||||||
* If tracing multiple ISRs, this setting allows for accurate display of the
|
|
||||||
* context-switching also in cases when the ISRs execute in direct sequence.
|
|
||||||
*
|
|
||||||
* vTraceStoreISREnd normally assumes that the ISR returns to the previous
|
|
||||||
* context, i.e., a task or a preempted ISR. But if another traced ISR
|
|
||||||
* executes in direct sequence, Tracealyzer may incorrectly display a minimal
|
|
||||||
* fragment of the previous context in between the ISRs.
|
|
||||||
*
|
|
||||||
* By using TRC_CFG_ISR_TAILCHAINING_THRESHOLD you can avoid this. This is
|
|
||||||
* however a threshold value that must be measured for your specific setup.
|
|
||||||
* See http://percepio.com/2014/03/21/isr_tailchaining_threshold/
|
|
||||||
*
|
|
||||||
* The default setting is 0, meaning "disabled" and that you may get an
|
|
||||||
* extra fragments of the previous context in between tail-chained ISRs.
|
|
||||||
*
|
|
||||||
* Note: This setting has separate definitions in trcSnapshotConfig.h and
|
|
||||||
* trcStreamingConfig.h, since it is affected by the recorder mode.
|
|
||||||
******************************************************************************/
|
|
||||||
#define TRC_CFG_ISR_TAILCHAINING_THRESHOLD 0
|
|
||||||
|
|
||||||
#endif /*TRC_SNAPSHOT_CONFIG_H*/
|
#endif /*TRC_SNAPSHOT_CONFIG_H*/
|
||||||
|
|
|
@ -74,9 +74,17 @@ that make up the total heap. heap_5 is only used for test and example purposes
|
||||||
as this demo could easily create one large heap region instead of multiple
|
as this demo could easily create one large heap region instead of multiple
|
||||||
smaller heap regions - in which case heap_4.c would be the more appropriate
|
smaller heap regions - in which case heap_4.c would be the more appropriate
|
||||||
choice. See http://www.freertos.org/a00111.html for an explanation. */
|
choice. See http://www.freertos.org/a00111.html for an explanation. */
|
||||||
#define mainREGION_1_SIZE 10801
|
#define mainREGION_1_SIZE 8201
|
||||||
#define mainREGION_2_SIZE 29905
|
#define mainREGION_2_SIZE 40905
|
||||||
#define mainREGION_3_SIZE 6007
|
#define mainREGION_3_SIZE 50007
|
||||||
|
|
||||||
|
/* This demo allows for users to perform actions with the keyboard. */
|
||||||
|
#define mainNO_KEY_PRESS_VALUE -1
|
||||||
|
#define mainOUTPUT_TRACE_KEY 't'
|
||||||
|
#define mainINTERRUPT_NUMBER_KEYBOARD 3
|
||||||
|
|
||||||
|
/* This demo allows to save a trace file. */
|
||||||
|
#define mainTRACE_FILE_NAME "Trace.dump"
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -125,6 +133,23 @@ void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, Stack
|
||||||
*/
|
*/
|
||||||
static void prvSaveTraceFile( void );
|
static void prvSaveTraceFile( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Windows thread function to capture keyboard input from outside of the
|
||||||
|
* FreeRTOS simulator. This thread passes data safely into the FreeRTOS
|
||||||
|
* simulator using a stream buffer.
|
||||||
|
*/
|
||||||
|
static DWORD WINAPI prvWindowsKeyboardInputThread( void * pvParam );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Interrupt handler for when keyboard input is received.
|
||||||
|
*/
|
||||||
|
static uint32_t prvKeyboardInterruptHandler( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard interrupt handler for the blinky demo.
|
||||||
|
*/
|
||||||
|
extern void vBlinkyKeyboardInterruptHandler( int xKeyPressed );
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* When configSUPPORT_STATIC_ALLOCATION is set to 1 the application writer can
|
/* When configSUPPORT_STATIC_ALLOCATION is set to 1 the application writer can
|
||||||
|
@ -134,13 +159,36 @@ declared here, as a global, so it can be checked by a test that is implemented
|
||||||
in a different file. */
|
in a different file. */
|
||||||
StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ];
|
StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ];
|
||||||
|
|
||||||
/* Notes if the trace is running or not. */
|
/* Thread handle for the keyboard input Windows thread. */
|
||||||
static BaseType_t xTraceRunning = pdTRUE;
|
static HANDLE xWindowsKeyboardInputThreadHandle = NULL;
|
||||||
|
|
||||||
|
/* This stores the last key pressed that has not been handled.
|
||||||
|
* Keyboard input is retrieved by the prvWindowsKeyboardInputThread
|
||||||
|
* Windows thread and stored here. This is then read by the idle
|
||||||
|
* task and handled appropriately. */
|
||||||
|
static int xKeyPressed = mainNO_KEY_PRESS_VALUE;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
int main( void )
|
int main( void )
|
||||||
{
|
{
|
||||||
|
/* Set interrupt handler for keyboard input. */
|
||||||
|
vPortSetInterruptHandler( mainINTERRUPT_NUMBER_KEYBOARD, prvKeyboardInterruptHandler );
|
||||||
|
|
||||||
|
/* Start keyboard input handling thread. */
|
||||||
|
xWindowsKeyboardInputThreadHandle = CreateThread(
|
||||||
|
NULL, /* Pointer to thread security attributes. */
|
||||||
|
0, /* Initial thread stack size, in bytes. */
|
||||||
|
prvWindowsKeyboardInputThread, /* Pointer to thread function. */
|
||||||
|
NULL, /* Argument for new thread. */
|
||||||
|
0, /* Creation flags. */
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
fflush( stdout );
|
||||||
|
|
||||||
|
/* Use the cores that are not used by the FreeRTOS tasks. */
|
||||||
|
SetThreadAffinityMask( xWindowsKeyboardInputThreadHandle, ~0x01u );
|
||||||
|
|
||||||
/* This demo uses heap_5.c, so start by defining some heap regions. heap_5
|
/* This demo uses heap_5.c, so start by defining some heap regions. heap_5
|
||||||
is only used for test and example reasons. Heap_4 is more appropriate. See
|
is only used for test and example reasons. Heap_4 is more appropriate. See
|
||||||
http://www.freertos.org/a00111.html for an explanation. */
|
http://www.freertos.org/a00111.html for an explanation. */
|
||||||
|
@ -151,13 +199,21 @@ int main( void )
|
||||||
{
|
{
|
||||||
/* Initialise the trace recorder. Use of the trace recorder is optional.
|
/* Initialise the trace recorder. Use of the trace recorder is optional.
|
||||||
See http://www.FreeRTOS.org/trace for more information. */
|
See http://www.FreeRTOS.org/trace for more information. */
|
||||||
vTraceEnable( TRC_START );
|
configASSERT( xTraceInitialize() == TRC_SUCCESS );
|
||||||
|
|
||||||
/* Start the trace recording - the recording is written to a file if
|
/* Start the trace recording - the recording is written to a file if
|
||||||
configASSERT() is called. */
|
configASSERT() is called. */
|
||||||
printf( "\r\nTrace started.\r\nThe trace will be dumped to disk if a call to configASSERT() fails.\r\n" );
|
printf(
|
||||||
printf( "Uncomment the call to kbhit() in this file to also dump trace with a key press.\r\n" );
|
"Trace started.\r\n"
|
||||||
uiTraceStart();
|
"Note that the trace output uses the ring buffer mode, meaning that the output trace\r\n"
|
||||||
|
"will only be the most recent data able to fit within the trace recorder buffer.\r\n\r\n"
|
||||||
|
"The trace will be dumped to the file \"%s\" whenever a call to configASSERT()\r\n"
|
||||||
|
"fails or the \'%c\' key is pressed.\r\n"
|
||||||
|
"Note that key presses cannot be captured in the Eclipse console, so for key presses to work\r\n"
|
||||||
|
"you will have to run this demo in a Windows console.\r\n\r\n",
|
||||||
|
mainTRACE_FILE_NAME, mainOUTPUT_TRACE_KEY );
|
||||||
|
fflush( stdout );
|
||||||
|
configASSERT( xTraceEnable( TRC_START ) == TRC_SUCCESS );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -207,21 +263,6 @@ void vApplicationIdleHook( void )
|
||||||
because it is the responsibility of the idle task to clean up memory
|
because it is the responsibility of the idle task to clean up memory
|
||||||
allocated by the kernel to any task that has since deleted itself. */
|
allocated by the kernel to any task that has since deleted itself. */
|
||||||
|
|
||||||
/* Uncomment the following code to allow the trace to be stopped with any
|
|
||||||
key press. The code is commented out by default as the kbhit() function
|
|
||||||
interferes with the run time behaviour. */
|
|
||||||
/*
|
|
||||||
if( _kbhit() != pdFALSE )
|
|
||||||
{
|
|
||||||
if( xTraceRunning == pdTRUE )
|
|
||||||
{
|
|
||||||
vTraceStop();
|
|
||||||
prvSaveTraceFile();
|
|
||||||
xTraceRunning = pdFALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY != 1 )
|
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY != 1 )
|
||||||
{
|
{
|
||||||
/* Call the idle task processing used by the full demo. The simple
|
/* Call the idle task processing used by the full demo. The simple
|
||||||
|
@ -273,7 +314,6 @@ void vApplicationDaemonTaskStartupHook( void )
|
||||||
|
|
||||||
void vAssertCalled( unsigned long ulLine, const char * const pcFileName )
|
void vAssertCalled( unsigned long ulLine, const char * const pcFileName )
|
||||||
{
|
{
|
||||||
static BaseType_t xPrinted = pdFALSE;
|
|
||||||
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
|
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
|
||||||
|
|
||||||
/* Called if an assertion passed to configASSERT() fails. See
|
/* Called if an assertion passed to configASSERT() fails. See
|
||||||
|
@ -285,16 +325,17 @@ volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
|
||||||
|
|
||||||
|
|
||||||
taskENTER_CRITICAL();
|
taskENTER_CRITICAL();
|
||||||
|
{
|
||||||
|
printf("ASSERT! Line %ld, file %s, GetLastError() %ld\r\n", ulLine, pcFileName, GetLastError());
|
||||||
|
fflush( stdout );
|
||||||
|
|
||||||
|
#if( projCOVERAGE_TEST != 1 )
|
||||||
{
|
{
|
||||||
/* Stop the trace recording. */
|
/* Stop the trace recording. */
|
||||||
if( xPrinted == pdFALSE )
|
( void ) xTraceDisable();
|
||||||
{
|
|
||||||
xPrinted = pdTRUE;
|
|
||||||
if( xTraceRunning == pdTRUE )
|
|
||||||
{
|
|
||||||
prvSaveTraceFile();
|
prvSaveTraceFile();
|
||||||
}
|
}
|
||||||
}
|
#endif
|
||||||
|
|
||||||
/* You can step out of this function to debug the assertion by using
|
/* You can step out of this function to debug the assertion by using
|
||||||
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
|
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
|
||||||
|
@ -304,6 +345,13 @@ volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
|
||||||
__asm volatile( "NOP" );
|
__asm volatile( "NOP" );
|
||||||
__asm volatile( "NOP" );
|
__asm volatile( "NOP" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if( projCOVERAGE_TEST != 1 )
|
||||||
|
{
|
||||||
|
/* Re-enable recording */
|
||||||
|
( void ) xTraceEnable( TRC_START );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
taskEXIT_CRITICAL();
|
taskEXIT_CRITICAL();
|
||||||
}
|
}
|
||||||
|
@ -316,19 +364,19 @@ static void prvSaveTraceFile( void )
|
||||||
{
|
{
|
||||||
FILE* pxOutputFile;
|
FILE* pxOutputFile;
|
||||||
|
|
||||||
vTraceStop();
|
pxOutputFile = fopen( mainTRACE_FILE_NAME, "wb");
|
||||||
|
|
||||||
pxOutputFile = fopen( "Trace.dump", "wb");
|
|
||||||
|
|
||||||
if( pxOutputFile != NULL )
|
if( pxOutputFile != NULL )
|
||||||
{
|
{
|
||||||
fwrite( RecorderDataPtr, sizeof( RecorderDataType ), 1, pxOutputFile );
|
fwrite( RecorderDataPtr, sizeof( RecorderDataType ), 1, pxOutputFile );
|
||||||
fclose( pxOutputFile );
|
fclose( pxOutputFile );
|
||||||
printf( "\r\nTrace output saved to Trace.dump\r\n" );
|
printf( "\r\nTrace output saved to %s\r\n", mainTRACE_FILE_NAME );
|
||||||
|
fflush( stdout );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf( "\r\nFailed to create trace dump file\r\n" );
|
printf( "\r\nFailed to create trace dump file\r\n" );
|
||||||
|
fflush( stdout );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -465,6 +513,7 @@ static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ];
|
||||||
configMINIMAL_STACK_SIZE is specified in words, not bytes. */
|
configMINIMAL_STACK_SIZE is specified in words, not bytes. */
|
||||||
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
|
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* configUSE_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the
|
/* configUSE_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the
|
||||||
|
@ -490,3 +539,90 @@ static StaticTask_t xTimerTaskTCB;
|
||||||
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
|
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Interrupt handler for when keyboard input is received.
|
||||||
|
*/
|
||||||
|
static uint32_t prvKeyboardInterruptHandler( void )
|
||||||
|
{
|
||||||
|
/* Handle keyboard input. */
|
||||||
|
switch ( xKeyPressed )
|
||||||
|
{
|
||||||
|
case mainNO_KEY_PRESS_VALUE:
|
||||||
|
break;
|
||||||
|
case mainOUTPUT_TRACE_KEY:
|
||||||
|
#if( projCOVERAGE_TEST != 1 )
|
||||||
|
{
|
||||||
|
/* Saving the trace file requires Windows system calls, so enter a critical
|
||||||
|
* section to prevent deadlock or errors resulting from calling a Windows
|
||||||
|
* system call from within the FreeRTOS simulator. */
|
||||||
|
portENTER_CRITICAL();
|
||||||
|
{
|
||||||
|
( void ) xTraceDisable();
|
||||||
|
prvSaveTraceFile();
|
||||||
|
( void ) xTraceEnable( TRC_START );
|
||||||
|
}
|
||||||
|
portEXIT_CRITICAL();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )
|
||||||
|
{
|
||||||
|
/* Call the keyboard interrupt handler for the blinky demo. */
|
||||||
|
vBlinkyKeyboardInterruptHandler( xKeyPressed );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This interrupt does not require a context switch so return pdFALSE */
|
||||||
|
return pdFALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Windows thread function to capture keyboard input from outside of the
|
||||||
|
* FreeRTOS simulator. This thread passes data into the simulator using
|
||||||
|
* an integer.
|
||||||
|
*/
|
||||||
|
static DWORD WINAPI prvWindowsKeyboardInputThread( void * pvParam )
|
||||||
|
{
|
||||||
|
( void ) pvParam;
|
||||||
|
|
||||||
|
for ( ; ; )
|
||||||
|
{
|
||||||
|
/* Block on acquiring a key press */
|
||||||
|
xKeyPressed = _getch();
|
||||||
|
|
||||||
|
/* Notify FreeRTOS simulator that there is a keyboard interrupt.
|
||||||
|
* This will trigger prvKeyboardInterruptHandler.
|
||||||
|
*/
|
||||||
|
vPortGenerateSimulatedInterrupt( mainINTERRUPT_NUMBER_KEYBOARD );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Should not get here, report negative exit status. */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* The below code is used by the trace recorder for timing. */
|
||||||
|
static uint32_t ulEntryTime = 0;
|
||||||
|
|
||||||
|
void vTraceTimerReset( void )
|
||||||
|
{
|
||||||
|
ulEntryTime = xTaskGetTickCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t uiTraceTimerGetFrequency( void )
|
||||||
|
{
|
||||||
|
return configTICK_RATE_HZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t uiTraceTimerGetValue( void )
|
||||||
|
{
|
||||||
|
return( xTaskGetTickCount() - ulEntryTime );
|
||||||
|
}
|
||||||
|
|
|
@ -107,6 +107,9 @@ queue send software timer respectively. */
|
||||||
#define mainVALUE_SENT_FROM_TASK ( 100UL )
|
#define mainVALUE_SENT_FROM_TASK ( 100UL )
|
||||||
#define mainVALUE_SENT_FROM_TIMER ( 200UL )
|
#define mainVALUE_SENT_FROM_TIMER ( 200UL )
|
||||||
|
|
||||||
|
/* This demo allows for users to perform actions with the keyboard. */
|
||||||
|
#define mainRESET_TIMER_KEY ( 'r' )
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -135,6 +138,7 @@ void main_blinky( void )
|
||||||
{
|
{
|
||||||
const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS;
|
const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS;
|
||||||
|
|
||||||
|
printf( "\r\nStarting the blinky demo. Press \'%c\' to reset the software timer used in this demo.\r\n\r\n", mainRESET_TIMER_KEY );
|
||||||
/* Create the queue. */
|
/* Create the queue. */
|
||||||
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
||||||
|
|
||||||
|
@ -146,7 +150,7 @@ const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS;
|
||||||
"Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */
|
"Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */
|
||||||
configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */
|
configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */
|
||||||
NULL, /* The parameter passed to the task - not used in this simple case. */
|
NULL, /* The parameter passed to the task - not used in this simple case. */
|
||||||
mainQUEUE_RECEIVE_TASK_PRIORITY,/* The priority assigned to the task. */
|
mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */
|
||||||
NULL ); /* The task handle is not required, so NULL is passed. */
|
NULL ); /* The task handle is not required, so NULL is passed. */
|
||||||
|
|
||||||
xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );
|
xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );
|
||||||
|
@ -156,7 +160,7 @@ const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS;
|
||||||
xTimerPeriod, /* The period of the software timer in ticks. */
|
xTimerPeriod, /* The period of the software timer in ticks. */
|
||||||
pdTRUE, /* xAutoReload is set to pdTRUE. */
|
pdTRUE, /* xAutoReload is set to pdTRUE. */
|
||||||
NULL, /* The timer's ID is not used. */
|
NULL, /* The timer's ID is not used. */
|
||||||
prvQueueSendTimerCallback );/* The function executed when the timer expires. */
|
prvQueueSendTimerCallback ); /* The function executed when the timer expires. */
|
||||||
|
|
||||||
if( xTimer != NULL )
|
if( xTimer != NULL )
|
||||||
{
|
{
|
||||||
|
@ -239,6 +243,12 @@ uint32_t ulReceivedValue;
|
||||||
Blocked state. */
|
Blocked state. */
|
||||||
xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );
|
xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );
|
||||||
|
|
||||||
|
/* Enter critical section to use printf. Not doing this could potentially cause
|
||||||
|
a deadlock if the FreeRTOS simulator switches contexts and another task
|
||||||
|
tries to call printf - it should be noted that use of printf within
|
||||||
|
the FreeRTOS simulator is unsafe, but used here for simplicity. */
|
||||||
|
taskENTER_CRITICAL();
|
||||||
|
{
|
||||||
/* To get here something must have been received from the queue, but
|
/* To get here something must have been received from the queue, but
|
||||||
is it an expected value? Normally calling printf() from a task is not
|
is it an expected value? Normally calling printf() from a task is not
|
||||||
a good idea. Here there is lots of stack space and only one task is
|
a good idea. Here there is lots of stack space and only one task is
|
||||||
|
@ -260,6 +270,40 @@ uint32_t ulReceivedValue;
|
||||||
|
|
||||||
fflush( stdout );
|
fflush( stdout );
|
||||||
}
|
}
|
||||||
|
taskEXIT_CRITICAL();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Called from prvKeyboardInterruptHandler(), which is defined in main.c. */
|
||||||
|
void vBlinkyKeyboardInterruptHandler( int xKeyPressed )
|
||||||
|
{
|
||||||
|
/* Handle keyboard input. */
|
||||||
|
switch ( xKeyPressed )
|
||||||
|
{
|
||||||
|
|
||||||
|
case mainRESET_TIMER_KEY:
|
||||||
|
|
||||||
|
if ( xTimer != NULL )
|
||||||
|
{
|
||||||
|
/* Critical section around printf to prevent a deadlock
|
||||||
|
on context switch. */
|
||||||
|
portENTER_CRITICAL();
|
||||||
|
{
|
||||||
|
printf("\r\nResetting software timer.\r\n\r\n");
|
||||||
|
}
|
||||||
|
portEXIT_CRITICAL();
|
||||||
|
|
||||||
|
/* Reset the software timer. */
|
||||||
|
xTimerReset( xTimer, portMAX_DELAY );
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* NOTE 1: The Win32 port is a simulation (or is that emulation?) only! Do not
|
* NOTE 1: The Win32 port is a simulation (or is that emulation?) only! Do not
|
||||||
|
@ -258,7 +259,7 @@ int main_full( void )
|
||||||
static void prvCheckTask( void *pvParameters )
|
static void prvCheckTask( void *pvParameters )
|
||||||
{
|
{
|
||||||
TickType_t xNextWakeTime;
|
TickType_t xNextWakeTime;
|
||||||
const TickType_t xCycleFrequency = pdMS_TO_TICKS( 2500UL );
|
const TickType_t xCyclePeriod = pdMS_TO_TICKS( 5000UL );
|
||||||
HeapStats_t xHeapStats;
|
HeapStats_t xHeapStats;
|
||||||
|
|
||||||
/* Just to remove compiler warning. */
|
/* Just to remove compiler warning. */
|
||||||
|
@ -270,13 +271,13 @@ HeapStats_t xHeapStats;
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
/* Place this task in the blocked state until it is time to run again. */
|
/* Place this task in the blocked state until it is time to run again. */
|
||||||
vTaskDelayUntil( &xNextWakeTime, xCycleFrequency );
|
vTaskDelayUntil( &xNextWakeTime, xCyclePeriod );
|
||||||
|
|
||||||
/* Check the standard demo tasks are running without error. */
|
/* Check the standard demo tasks are running without error. */
|
||||||
#if( configUSE_PREEMPTION != 0 )
|
#if( configUSE_PREEMPTION != 0 )
|
||||||
{
|
{
|
||||||
/* These tasks are only created when preemption is used. */
|
/* These tasks are only created when preemption is used. */
|
||||||
if( xAreTimerDemoTasksStillRunning( xCycleFrequency ) != pdTRUE )
|
if( xAreTimerDemoTasksStillRunning( xCyclePeriod ) != pdTRUE )
|
||||||
{
|
{
|
||||||
pcStatusMessage = "Error: TimerDemo";
|
pcStatusMessage = "Error: TimerDemo";
|
||||||
}
|
}
|
||||||
|
@ -863,11 +864,13 @@ const TickType_t x100ms = pdMS_TO_TICKS( 100UL );
|
||||||
/* Avoid compiler warnings about unused parameter. */
|
/* Avoid compiler warnings about unused parameter. */
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
|
||||||
xTimer = xTimerCreate( pcTimerName,
|
xTimer = xTimerCreate(
|
||||||
|
pcTimerName,
|
||||||
x100ms,
|
x100ms,
|
||||||
pdFALSE, /* Created as a one-shot timer. */
|
pdFALSE, /* Created as a one-shot timer. */
|
||||||
0,
|
0,
|
||||||
prvReloadModeTestTimerCallback );
|
prvReloadModeTestTimerCallback );
|
||||||
|
|
||||||
configASSERT( xTimer );
|
configASSERT( xTimer );
|
||||||
configASSERT( xTimerIsTimerActive( xTimer ) == pdFALSE );
|
configASSERT( xTimerIsTimerActive( xTimer ) == pdFALSE );
|
||||||
configASSERT( xTimerGetTimerDaemonTaskHandle() != NULL );
|
configASSERT( xTimerGetTimerDaemonTaskHandle() != NULL );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue