mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-21 22:11:57 -04:00
Update the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator demo to use the latest FreeRTOS+Trace recorder code.
This commit is contained in:
parent
35f5990e7a
commit
504d9c8bab
|
@ -74,9 +74,6 @@
|
||||||
/* FreeRTOS+CLI includes. */
|
/* FreeRTOS+CLI includes. */
|
||||||
#include "FreeRTOS_CLI.h"
|
#include "FreeRTOS_CLI.h"
|
||||||
|
|
||||||
/* FreeRTOS+Trace includes. */
|
|
||||||
#include "trcUser.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Writes trace data to a disk file when the trace recording is stopped.
|
* Writes trace data to a disk file when the trace recording is stopped.
|
||||||
* This function will simply overwrite any trace files that already exist.
|
* This function will simply overwrite any trace files that already exist.
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
|
|
||||||
#define configUSE_PREEMPTION 1
|
#define configUSE_PREEMPTION 1
|
||||||
#define configUSE_IDLE_HOOK 1
|
#define configUSE_IDLE_HOOK 1
|
||||||
#define configUSE_TICK_HOOK 1
|
#define configUSE_TICK_HOOK 0
|
||||||
#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 ) 60 ) /* 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 ) 60 ) /* 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 ) 0 ) /* This parameter has no effect when heap_3.c is included in the project. */
|
#define configTOTAL_HEAP_SIZE ( ( size_t ) 0 ) /* This parameter has no effect when heap_3.c is included in the project. */
|
||||||
|
@ -161,8 +161,6 @@ take up unnecessary RAM. */
|
||||||
|
|
||||||
|
|
||||||
/* Include the FreeRTOS+Trace FreeRTOS trace macro definitions. */
|
/* Include the FreeRTOS+Trace FreeRTOS trace macro definitions. */
|
||||||
#define TRACE_ENTER_CRITICAL_SECTION() portENTER_CRITICAL()
|
#include "trcRecorder.h"
|
||||||
#define TRACE_EXIT_CRITICAL_SECTION() portEXIT_CRITICAL()
|
|
||||||
#include "trcKernelPort.h"
|
|
||||||
|
|
||||||
#endif /* FREERTOS_CONFIG_H */
|
#endif /* FREERTOS_CONFIG_H */
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual C++ Express 2010
|
# Visual Studio 14
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WIN32", "WIN32.vcxproj", "{C686325E-3261-42F7-AEB1-DDE5280E1CEB}"
|
VisualStudioVersion = 14.0.25420.1
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RTOSDemo", "WIN32.vcxproj", "{C686325E-3261-42F7-AEB1-DDE5280E1CEB}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
|
@ -82,9 +82,6 @@
|
||||||
/* FreeRTOS includes. */
|
/* FreeRTOS includes. */
|
||||||
#include <FreeRTOS.h>
|
#include <FreeRTOS.h>
|
||||||
|
|
||||||
/* FreeRTOS+Trace includes. */
|
|
||||||
#include "trcUser.h"
|
|
||||||
|
|
||||||
/* Variables used in the creation of the run time stats time base. Run time
|
/* Variables used in the creation of the run time stats time base. Run time
|
||||||
stats record how much time each task spends in the Running state. */
|
stats record how much time each task spends in the Running state. */
|
||||||
static long long llInitialRunTimeCounterValue = 0LL, llTicksPerHundedthMillisecond = 0LL;
|
static long long llInitialRunTimeCounterValue = 0LL, llTicksPerHundedthMillisecond = 0LL;
|
||||||
|
|
|
@ -1,475 +1,159 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Tracealyzer v2.7.0 Recorder Library
|
* Trace Recorder Library for Tracealyzer v3.1.2
|
||||||
* Percepio AB, www.percepio.com
|
* Percepio AB, www.percepio.com
|
||||||
*
|
*
|
||||||
* trcConfig.h
|
* trcConfig.h
|
||||||
*
|
*
|
||||||
* Configuration parameters for the trace recorder library. Before using the
|
* Main configuration parameters for the trace recorder library.
|
||||||
* trace recorder library, please check that the default settings are
|
* More settings can be found in trcStreamingConfig.h and trcSnapshotConfig.h.
|
||||||
* appropriate for your system, and if necessary adjust these. Most likely, you
|
*
|
||||||
* will need to adjust the NTask, NISR, NQueue, NMutex and NSemaphore values to
|
* Read more at http://percepio.com/2016/10/05/rtos-tracing/
|
||||||
* reflect the number of such objects in your system. These may be
|
|
||||||
* over-approximated, although larger values values implies more RAM usage.
|
|
||||||
*
|
*
|
||||||
* Terms of Use
|
* Terms of Use
|
||||||
* This software is copyright Percepio AB. The recorder library is free for
|
* This file is part of the trace recorder library (RECORDER), which is the
|
||||||
* use together with Percepio products. You may distribute the recorder library
|
* intellectual property of Percepio AB (PERCEPIO) and provided under a
|
||||||
* in its original form, including modifications in trcHardwarePort.c/.h
|
* license as follows.
|
||||||
* given that these modification are clearly marked as your own modifications
|
* The RECORDER may be used free of charge for the purpose of recording data
|
||||||
* and documented in the initial comment section of these source files.
|
* intended for analysis in PERCEPIO products. It may not be used or modified
|
||||||
* This software is the intellectual property of Percepio AB and may not be
|
* for other purposes without explicit permission from PERCEPIO.
|
||||||
* sold or in other ways commercially redistributed without explicit written
|
* You may distribute the RECORDER in its original source code form, assuming
|
||||||
* permission by Percepio AB.
|
* 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
|
* Disclaimer
|
||||||
* The trace tool and recorder library is being delivered to you AS IS and
|
* The RECORDER is being delivered to you AS IS and PERCEPIO makes no warranty
|
||||||
* Percepio AB makes no warranty as to its use or performance. Percepio AB does
|
* as to its use or performance. PERCEPIO does not and cannot warrant the
|
||||||
* not and cannot warrant the performance or results you may obtain by using the
|
* performance or results you may obtain by using the RECORDER or documentation.
|
||||||
* software or documentation. Percepio AB make no warranties, express or
|
* PERCEPIO make no warranties, express or implied, as to noninfringement of
|
||||||
* implied, as to noninfringement of third party rights, merchantability, or
|
* third party rights, merchantability, or fitness for any particular purpose.
|
||||||
* fitness for any particular purpose. In no event will Percepio AB, its
|
* In no event will PERCEPIO, its technology partners, or distributors be liable
|
||||||
* technology partners, or distributors be liable to you for any consequential,
|
* to you for any consequential, incidental or special damages, including any
|
||||||
* incidental or special damages, including any lost profits or lost savings,
|
* lost profits or lost savings, even if a representative of PERCEPIO has been
|
||||||
* even if a representative of Percepio AB has been advised of the possibility
|
* advised of the possibility of such damages, or for any claim by any third
|
||||||
* of such damages, or for any claim by any third party. Some jurisdictions do
|
* party. Some jurisdictions do not allow the exclusion or limitation of
|
||||||
* not allow the exclusion or limitation of incidental, consequential or special
|
* incidental, consequential or special damages, or the exclusion of implied
|
||||||
* damages, or the exclusion of implied warranties or limitations on how long an
|
* warranties or limitations on how long an implied warranty may last, so the
|
||||||
* implied warranty may last, so the above limitations may not apply to you.
|
* above limitations may not apply to you.
|
||||||
*
|
*
|
||||||
* Tabs are used for indent in this file (1 tab = 4 spaces)
|
* Tabs are used for indent in this file (1 tab = 4 spaces)
|
||||||
*
|
*
|
||||||
* Copyright Percepio AB, 2014.
|
* Copyright Percepio AB, 2016.
|
||||||
* www.percepio.com
|
* www.percepio.com
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#ifndef TRCCONFIG_H
|
#ifndef TRC_CONFIG_H
|
||||||
#define TRCCONFIG_H
|
#define TRC_CONFIG_H
|
||||||
|
|
||||||
/******************************************************************************
|
#ifdef __cplusplus
|
||||||
* SELECTED_PORT
|
extern "C" {
|
||||||
*
|
|
||||||
* Macro that specifies what hardware port that should be used.
|
|
||||||
* Available ports are:
|
|
||||||
*
|
|
||||||
* Port Name Code Official OS supported
|
|
||||||
* PORT_APPLICATION_DEFINED -2 - -
|
|
||||||
* PORT_NOT_SET -1 - -
|
|
||||||
* PORT_HWIndependent 0 Yes Any
|
|
||||||
* PORT_Win32 1 Yes FreeRTOS on Win32
|
|
||||||
* PORT_Atmel_AT91SAM7 2 No Any
|
|
||||||
* PORT_Atmel_UC3A0 3 No Any
|
|
||||||
* PORT_ARM_CortexM 4 Yes Any
|
|
||||||
* PORT_Renesas_RX600 5 Yes Any
|
|
||||||
* PORT_Microchip_dsPIC_AND_PIC24 6 Yes Any
|
|
||||||
* PORT_TEXAS_INSTRUMENTS_TMS570 7 No Any
|
|
||||||
* PORT_TEXAS_INSTRUMENTS_MSP430 8 No Any
|
|
||||||
* PORT_MICROCHIP_PIC32MX 9 Yes Any
|
|
||||||
* PORT_XILINX_PPC405 10 No FreeRTOS
|
|
||||||
* PORT_XILINX_PPC440 11 No FreeRTOS
|
|
||||||
* PORT_XILINX_MICROBLAZE 12 No Any
|
|
||||||
* PORT_NXP_LPC210X 13 No Any
|
|
||||||
* PORT_MICROCHIP_PIC32MZ 14 Yes Any
|
|
||||||
* PORT_ARM_CORTEX_A9 15 No Any
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
// Set the port setting here!
|
|
||||||
#define SELECTED_PORT PORT_NOT_SET
|
|
||||||
|
|
||||||
#if (SELECTED_PORT == PORT_NOT_SET)
|
|
||||||
#error "You need to define SELECTED_PORT here!"
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
// For Win32 demo projects this is set automatically
|
|
||||||
#define SELECTED_PORT PORT_Win32
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/******************************************************************************
|
#include "trcPortDefines.h"
|
||||||
* FREERTOS_VERSION
|
|
||||||
*
|
|
||||||
* Specify what version of FreeRTOS that is used. This is necessary compensate
|
|
||||||
* for renamed symbols in the FreeRTOS kernel (does not build if incorrect).
|
|
||||||
*
|
|
||||||
* FREERTOS_VERSION_7_3_OR_7_4 (= 1) If using FreeRTOS v7.3.0 - v7.4.2
|
|
||||||
* FREERTOS_VERSION_7_5_OR_7_6 (= 2) If using FreeRTOS v7.5.0 - v7.6.0
|
|
||||||
* FREERTOS_VERSION_8_0_OR_LATER (= 3) If using FreeRTOS v8.0.0 or later
|
|
||||||
*****************************************************************************/
|
|
||||||
#define FREERTOS_VERSION FREERTOS_VERSION_8_0_OR_LATER
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* TRACE_RECORDER_STORE_MODE
|
* Include of processor header file
|
||||||
*
|
*
|
||||||
* Macro which should be defined as one of:
|
* Here you may need to include the header file for your processor. This is
|
||||||
* - TRACE_STORE_MODE_RING_BUFFER
|
* required at least for the ARM Cortex-M port, that uses the ARM CMSIS API.
|
||||||
* - TRACE_STORE_MODE_STOP_WHEN_FULL
|
* Try that in case of build problems. Otherwise, remove the #error line below.
|
||||||
* Default is TRACE_STORE_MODE_RING_BUFFER.
|
|
||||||
*
|
|
||||||
* With TRACE_RECORDER_STORE_MODE set to TRACE_STORE_MODE_RING_BUFFER, the
|
|
||||||
* events are stored in a ring buffer, i.e., where the oldest events are
|
|
||||||
* overwritten when the buffer becomes full. This allows you to get the last
|
|
||||||
* events leading up to an interesting state, e.g., an error, without having
|
|
||||||
* to store the whole run since startup.
|
|
||||||
*
|
|
||||||
* When TRACE_RECORDER_STORE_MODE is TRACE_STORE_MODE_STOP_WHEN_FULL, the
|
|
||||||
* recording is stopped when the buffer becomes full. This is useful for
|
|
||||||
* recording events following a specific state, e.g., the startup sequence.
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define TRACE_RECORDER_STORE_MODE TRACE_STORE_MODE_RING_BUFFER
|
//#error "Trace Recorder: Please include your processor's header file here and remove this line."
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* TRACE_SCHEDULING_ONLY
|
* Configuration Macro: TRC_CFG_HARDWARE_PORT
|
||||||
*
|
*
|
||||||
* Macro which should be defined as an integer value.
|
* Specify what hardware port to use (i.e., the "timestamping driver").
|
||||||
*
|
*
|
||||||
* If this setting is enabled (= 1), only scheduling events are recorded.
|
* All ARM Cortex-M MCUs are supported by "TRC_HARDWARE_PORT_ARM_Cortex_M".
|
||||||
* If disabled (= 0), all events are recorded.
|
* This port uses the DWT cycle counter for Cortex-M3/M4/M7 devices, which is
|
||||||
|
* available on most such devices. In case your device don't have DWT support,
|
||||||
|
* you will get an error message opening the trace. In that case, you may
|
||||||
|
* force the recorder to use SysTick timestamping instead, using this define:
|
||||||
*
|
*
|
||||||
* Users of FreeRTOS+Trace Free Edition only displays scheduling events, so this
|
* #define TRC_CFG_ARM_CM_USE_SYSTICK
|
||||||
* option can be used to avoid storing unsupported events.
|
|
||||||
*
|
*
|
||||||
* Default value is 0 (store all enabled events).
|
* For ARM Cortex-M0/M0+ devices, SysTick mode is used automatically.
|
||||||
*
|
*
|
||||||
|
* See trcHardwarePort.h for available ports and information on how to
|
||||||
|
* define your own port, if not already present.
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define TRACE_SCHEDULING_ONLY 0
|
#define TRC_CFG_HARDWARE_PORT TRC_HARDWARE_PORT_Win32
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* EVENT_BUFFER_SIZE
|
* Configuration Macro: TRC_CFG_RECORDER_MODE
|
||||||
*
|
*
|
||||||
* 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.
|
||||||
*
|
*
|
||||||
* This defines the capacity of the event buffer, i.e., the number of records
|
* For more information, see http://percepio.com/2016/10/05/rtos-tracing/
|
||||||
* it may store. Most events use one record (4 byte), although some events
|
* and the Tracealyzer User Manual.
|
||||||
* require multiple 4-byte records. You should adjust this to the amount of RAM
|
|
||||||
* available in the target system.
|
|
||||||
*
|
*
|
||||||
* Default value is 1000, which means that 4000 bytes is allocated for the
|
* Values:
|
||||||
* event buffer.
|
* TRC_RECORDER_MODE_SNAPSHOT
|
||||||
|
* TRC_RECORDER_MODE_STREAMING
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define EVENT_BUFFER_SIZE 15000
|
#define TRC_CFG_RECORDER_MODE TRC_RECORDER_MODE_SNAPSHOT
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* NTask, NISR, NQueue, NSemaphore, NMutex
|
* Configuration Macro: TRC_CFG_RECORDER_BUFFER_ALLOCATION
|
||||||
*
|
*
|
||||||
* A group of macros which should be defined as integer values, zero or larger.
|
* Specifies how the recorder buffer is allocated (also in case of streaming, in
|
||||||
|
* port using the recorder's internal temporary buffer)
|
||||||
*
|
*
|
||||||
* These define the capacity of the Object Property Table, i.e., the maximum
|
* Values:
|
||||||
* number of objects active at any given point, within each object class (e.g.,
|
* TRC_RECORDER_BUFFER_ALLOCATION_STATIC - Static allocation (internal)
|
||||||
* task, queue, semaphore, ...).
|
* TRC_RECORDER_BUFFER_ALLOCATION_DYNAMIC - Malloc in vTraceEnable
|
||||||
|
* TRC_RECORDER_BUFFER_ALLOCATION_CUSTOM - Use vTraceSetRecorderDataBuffer
|
||||||
*
|
*
|
||||||
* If tasks or other other objects are deleted in your system, this
|
* Static and dynamic mode does the allocation for you, either in compile time
|
||||||
* setting does not limit the total amount of objects created, only the number
|
* (static) or in runtime (malloc).
|
||||||
* of objects that have been successfully created but not yet deleted.
|
* The custom mode allows you to control how and where the allocation is made,
|
||||||
*
|
* for details see TRC_ALLOC_CUSTOM_BUFFER and vTraceSetRecorderDataBuffer().
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* 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 NTask 100
|
#define TRC_CFG_RECORDER_BUFFER_ALLOCATION TRC_RECORDER_BUFFER_ALLOCATION_STATIC
|
||||||
#define NISR 60
|
|
||||||
#define NQueue 60
|
|
||||||
#define NSemaphore 60
|
|
||||||
#define NMutex 60
|
|
||||||
#define NTimer 200
|
|
||||||
#define NEventGroup 60
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* INCLUDE_MEMMANG_EVENTS
|
* TRC_CFG_FREERTOS_VERSION
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* Specify what version of FreeRTOS that is used (don't change unless using the
|
||||||
|
* trace recorder library with an older version of FreeRTOS).
|
||||||
*
|
*
|
||||||
* This controls if malloc and free calls should be traced. Set this to zero to
|
* TRC_FREERTOS_VERSION_7_3_OR_7_4 If using FreeRTOS v7.3.0 - v7.4.2
|
||||||
* exclude malloc/free calls, or one (1) to include such events in the trace.
|
* TRC_FREERTOS_VERSION_7_5_OR_7_6 If using FreeRTOS v7.5.0 - v7.6.0
|
||||||
*
|
* TRC_FREERTOS_VERSION_8_X If using FreeRTOS v8.X.X
|
||||||
* Default value is 1.
|
* TRC_FREERTOS_VERSION_9_X If using FreeRTOS v9.X.X
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define INCLUDE_MEMMANG_EVENTS 1
|
#define TRC_CFG_FREERTOS_VERSION TRC_FREERTOS_VERSION_9_X
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* INCLUDE_USER_EVENTS
|
* TRC_CFG_MAX_ISR_NESTING
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* Defines how many levels of interrupt nesting the recorder can handle, in
|
||||||
|
* 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
|
||||||
|
* logs an error message. This setting is used to allocate an internal stack
|
||||||
|
* for keeping track of the previous execution context (4 byte per entry).
|
||||||
*
|
*
|
||||||
* If this is zero (0) the code for creating User Events is excluded to
|
* This value must be a non-zero positive constant, at least 1.
|
||||||
* reduce code size. User Events are application-generated events, like
|
|
||||||
* "printf" but for the trace log instead of console output. User Events are
|
|
||||||
* much faster than a printf and can therefore be used in timing critical code.
|
|
||||||
* See vTraceUserEvent() and vTracePrintF() in trcUser.h
|
|
||||||
*
|
*
|
||||||
* Default value is 1.
|
* Default value: 8
|
||||||
*
|
|
||||||
* Note that User Events are only displayed in Professional Edition.
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define INCLUDE_USER_EVENTS 1
|
#define TRC_CFG_MAX_ISR_NESTING 8
|
||||||
|
|
||||||
/*****************************************************************************
|
/* Specific configuration, depending on Streaming/Snapshot mode */
|
||||||
* INCLUDE_ISR_TRACING
|
#if (TRC_CFG_RECORDER_MODE == TRC_RECORDER_MODE_SNAPSHOT)
|
||||||
*
|
#include "trcSnapshotConfig.h"
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
#elif (TRC_CFG_RECORDER_MODE == TRC_RECORDER_MODE_STREAMING)
|
||||||
*
|
#include "trcStreamingConfig.h"
|
||||||
* If this is zero (0), the code for recording Interrupt Service Routines is
|
|
||||||
* excluded to reduce code size.
|
|
||||||
*
|
|
||||||
* Default value is 1.
|
|
||||||
*
|
|
||||||
* Note, if the kernel has no central interrupt dispatcher, recording ISRs
|
|
||||||
* require that you insert calls to vTraceStoreISRBegin and vTraceStoreISREnd
|
|
||||||
* in your interrupt handlers.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_ISR_TRACING 1
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* INCLUDE_READY_EVENTS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
|
||||||
* If one (1), events are recorded when tasks enter scheduling state "ready".
|
|
||||||
* This uses a lot of space in the event buffer, so excluding "ready events"
|
|
||||||
* will allow for longer traces. Including ready events however allows for
|
|
||||||
* showing the initial pending time before tasks enter the execution state, and
|
|
||||||
* for presenting accurate response times.
|
|
||||||
*
|
|
||||||
* Default value is 1.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_READY_EVENTS 1
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* INCLUDE_NEW_TIME_EVENTS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
|
||||||
* If this is zero (1), events will be generated whenever the OS clock is
|
|
||||||
* increased.
|
|
||||||
*
|
|
||||||
* Default value is 0.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_NEW_TIME_EVENTS 1
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* INCLUDE_FLOAT_SUPPORT
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
|
||||||
* If this is zero (0), all references to floating point values are removed,
|
|
||||||
* in case floating point values are not supported by the platform used.
|
|
||||||
* Floating point values are only used in vTracePrintF and its subroutines, to
|
|
||||||
* store float (%f) or double (%lf) arguments.
|
|
||||||
*
|
|
||||||
* vTracePrintF can be used with integer and string arguments in either case.
|
|
||||||
*
|
|
||||||
* Default value is 1.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_FLOAT_SUPPORT 0
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* INCLUDE_OBJECT_DELETE
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
*
|
|
||||||
* This must be enabled (1) if tasks, queues or other
|
|
||||||
* traced kernel objects are deleted at runtime. If no deletes are made, this
|
|
||||||
* can be set to 0 in order to exclude the delete-handling code.
|
|
||||||
*
|
|
||||||
* Default value is 1.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_OBJECT_DELETE 1
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* SYMBOL_TABLE_SIZE
|
|
||||||
*
|
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
* objects. If you don't use User Events or delete any kernel
|
|
||||||
* objects you set this to a very low value. The minimum recommended value is 4.
|
|
||||||
* A size of zero (0) is not allowed since a zero-sized array may result in a
|
|
||||||
* 32-bit pointer, i.e., using 4 bytes rather than 0.
|
|
||||||
*
|
|
||||||
* Default value is 800.
|
|
||||||
******************************************************************************/
|
|
||||||
#define SYMBOL_TABLE_SIZE 5000
|
|
||||||
|
|
||||||
#if (SYMBOL_TABLE_SIZE == 0)
|
|
||||||
#error "SYMBOL_TABLE_SIZE may not be zero!"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/******************************************************************************
|
#ifdef __cplusplus
|
||||||
* NameLenTask, NameLenQueue, ...
|
}
|
||||||
*
|
|
||||||
* 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 NameLenTask 15
|
|
||||||
#define NameLenISR 15
|
|
||||||
#define NameLenQueue 15
|
|
||||||
#define NameLenSemaphore 15
|
|
||||||
#define NameLenMutex 15
|
|
||||||
#define NameLenTimer 15
|
|
||||||
#define NameLenEventGroup 15
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* TRACE_DATA_ALLOCATION
|
|
||||||
*
|
|
||||||
* This defines how to allocate the recorder data structure, i.e., using a
|
|
||||||
* static declaration or using a dynamic allocation in runtime (malloc).
|
|
||||||
*
|
|
||||||
* Should be one of these two options:
|
|
||||||
* - TRACE_DATA_ALLOCATION_STATIC (default)
|
|
||||||
* - TRACE_DATA_ALLOCATION_DYNAMIC
|
|
||||||
*
|
|
||||||
* Using static allocation has the benefits of compile-time errors if the buffer
|
|
||||||
* is too large (too large constants in trcConfig.h) and no need to call the
|
|
||||||
* initialization routine (xTraceInitTraceData).
|
|
||||||
*
|
|
||||||
* Using dynamic allocation may give more flexibility in some cases.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define TRACE_DATA_ALLOCATION TRACE_DATA_ALLOCATION_STATIC
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
*** ADVANCED SETTINGS ********************************************************
|
|
||||||
******************************************************************************
|
|
||||||
* The remaining settings are not necessary to modify but allows for optimizing
|
|
||||||
* the recorder setup for your specific needs, e.g., to exclude events that you
|
|
||||||
* are not interested in, in order to get longer traces.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* HEAP_SIZE_BELOW_16M
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* Default value is 0.
|
|
||||||
******************************************************************************/
|
|
||||||
#define HEAP_SIZE_BELOW_16M 0
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* USE_LINKER_PRAGMA
|
|
||||||
*
|
|
||||||
* Macro which should be defined as an integer value, default is 0.
|
|
||||||
*
|
|
||||||
* If this is 1, the header file "recorderdata_linker_pragma.h" is included just
|
|
||||||
* before the declaration of RecorderData (in trcBase.c), i.e., the trace data
|
|
||||||
* structure. This allows the user to specify a pragma with linker options.
|
|
||||||
*
|
|
||||||
* Example (for IAR Embedded Workbench and NXP LPC17xx):
|
|
||||||
* #pragma location="AHB_RAM_MEMORY"
|
|
||||||
*
|
|
||||||
* This example instructs the IAR linker to place RecorderData in another RAM
|
|
||||||
* bank, the AHB RAM. This can also be used for other compilers with a similar
|
|
||||||
* pragmas for linker options.
|
|
||||||
*
|
|
||||||
* Note that this only applies if using static allocation, see below.
|
|
||||||
******************************************************************************/
|
|
||||||
#define USE_LINKER_PRAGMA 0
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* USE_IMPLICIT_IFE_RULES
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 1.
|
|
||||||
*
|
|
||||||
* Tracealyzer groups the events into actor instances, based on context-switches
|
|
||||||
* and a definition of "Instance Finish Events", or IFEs. These are kernel calls
|
|
||||||
* considered to be the last event in a task instance. Some kernel calls are
|
|
||||||
* considered IFEs by default (e.g., delay functions), but it is also possible
|
|
||||||
* to specify this individually for each task (see vTraceTaskInstanceFinish).
|
|
||||||
*
|
|
||||||
* If USE_IMPLICIT_IFE_RULES is one (1), the default IFEs will be enabled, which
|
|
||||||
* gives a "typical" grouping of events into instances. You can combine this
|
|
||||||
* with calls to vTraceTaskInstanceFinish for specific tasks.
|
|
||||||
*
|
|
||||||
* If USE_IMPLICIT_IFE_RULES is zero (0), the implicit IFEs are disabled and all
|
|
||||||
* events withing each task is then shown as a single instance, unless you call
|
|
||||||
* vTraceTaskInstanceFinish() at suitable locations to mark the IFEs.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define USE_IMPLICIT_IFE_RULES 1
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* USE_16BIT_OBJECT_HANDLES
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
* objects such as tasks and queues. This limits the supported number of
|
|
||||||
* concurrently active objects to 255 of each type (object class).
|
|
||||||
*
|
|
||||||
* If set to 1 (one), the recorder uses 16-bit handles to identify kernel
|
|
||||||
* objects such as tasks and queues. This limits the supported number of
|
|
||||||
* concurrent objects to 65535 of each type (object class). However, since the
|
|
||||||
* object property table is limited to 64 KB, the practical limit is about
|
|
||||||
* 3000 objects in total.
|
|
||||||
*
|
|
||||||
* Default is 0.
|
|
||||||
*
|
|
||||||
* NOTE: An object with handle above 255 will use an extra 4-byte record in
|
|
||||||
* the event buffer whenever referenced. Moreover, some internal tables in the
|
|
||||||
* recorder gets larger when using 16-bit handles. The additional RAM usage is
|
|
||||||
* 5-10 byte plus 1 byte per kernel object i.e., task, queue, mutex, etc.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define USE_16BIT_OBJECT_HANDLES 0
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* USE_TRACE_ASSERT
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 1.
|
|
||||||
*
|
|
||||||
* If this is one (1), the TRACE_ASSERT macro will verify that a condition is
|
|
||||||
* true. If the condition is false, vTraceError() will be called.
|
|
||||||
* This is used on several places in the recorder code for sanity checks on
|
|
||||||
* parameters. Can be switched off to reduce CPU usage of the tracing.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define USE_TRACE_ASSERT 1
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* USE_SEPARATE_USER_EVENT_BUFFER
|
|
||||||
*
|
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
* Default is zero (0).
|
|
||||||
*
|
|
||||||
* This enables and disables the use of the separate user event buffer. Using
|
|
||||||
* this separate buffer has the benefit of not overwriting the user events with
|
|
||||||
* kernel events (usually generated at a much higher rate), i.e., when using
|
|
||||||
* ring-buffer mode.
|
|
||||||
*
|
|
||||||
* Note: When using the separate user event buffer, you may get an artificial
|
|
||||||
* task instance named "Unknown actor". This is added as a placeholder when the
|
|
||||||
* user event history is longer than the task scheduling history.
|
|
||||||
******************************************************************************/
|
|
||||||
#define USE_SEPARATE_USER_EVENT_BUFFER 0
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* USER_EVENT_BUFFER_SIZE
|
|
||||||
*
|
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
*
|
|
||||||
* This defines the capacity of the user event buffer, in number of slots.
|
|
||||||
* A single user event can use between 1 and X slots, depending on the data.
|
|
||||||
*
|
|
||||||
* Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.
|
|
||||||
******************************************************************************/
|
|
||||||
#define USER_EVENT_BUFFER_SIZE 10
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* USER_EVENT_CHANNELS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as an integer value.
|
|
||||||
*
|
|
||||||
* This defines the number of allowed user event channels.
|
|
||||||
*
|
|
||||||
* Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.
|
|
||||||
******************************************************************************/
|
|
||||||
#define CHANNEL_FORMAT_PAIRS 32
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* _TRC_CONFIG_H */
|
||||||
|
|
|
@ -0,0 +1,472 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Trace Recorder Library for Tracealyzer v3.1.2
|
||||||
|
* Percepio AB, www.percepio.com
|
||||||
|
*
|
||||||
|
* trcSnapshotConfig.h
|
||||||
|
*
|
||||||
|
* Configuration parameters for trace recorder library in snapshot mode.
|
||||||
|
* 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
|
||||||
|
#define TRC_SNAPSHOT_CONFIG_H
|
||||||
|
|
||||||
|
#define TRC_SNAPSHOT_MODE_RING_BUFFER (0x01)
|
||||||
|
#define TRC_SNAPSHOT_MODE_STOP_WHEN_FULL (0x02)
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* TRC_CFG_SNAPSHOT_MODE
|
||||||
|
*
|
||||||
|
* Macro which should be defined as one of:
|
||||||
|
* - TRC_SNAPSHOT_MODE_RING_BUFFER
|
||||||
|
* - TRC_SNAPSHOT_MODE_STOP_WHEN_FULL
|
||||||
|
* Default is TRC_SNAPSHOT_MODE_RING_BUFFER.
|
||||||
|
*
|
||||||
|
* With TRC_CFG_SNAPSHOT_MODE set to TRC_SNAPSHOT_MODE_RING_BUFFER, the
|
||||||
|
* events are stored in a ring buffer, i.e., where the oldest events are
|
||||||
|
* overwritten when the buffer becomes full. This allows you to get the last
|
||||||
|
* events leading up to an interesting state, e.g., an error, without having
|
||||||
|
* to store the whole run since startup.
|
||||||
|
*
|
||||||
|
* 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 events following a specific state, e.g., the startup sequence.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define TRC_CFG_SNAPSHOT_MODE TRC_SNAPSHOT_MODE_RING_BUFFER
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* 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 disabled (= 0), all events are recorded.
|
||||||
|
*
|
||||||
|
* For users of Tracealyzer Free Edition, that only displays scheduling events, this
|
||||||
|
* option can be used to avoid storing other events.
|
||||||
|
*
|
||||||
|
* Default value is 0 (store all enabled events).
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
#define TRC_CFG_SCHEDULING_ONLY 0
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* TRC_CFG_EVENT_BUFFER_SIZE
|
||||||
|
*
|
||||||
|
* Macro which should be defined as an integer value.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* require multiple 4-byte records. You should adjust this to the amount of RAM
|
||||||
|
* available in the target system.
|
||||||
|
*
|
||||||
|
* Default value is 1000, which means that 4000 bytes is allocated for the
|
||||||
|
* event buffer.
|
||||||
|
******************************************************************************/
|
||||||
|
#define TRC_CFG_EVENT_BUFFER_SIZE 15000
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* TRC_CFG_NTASK, TRC_CFG_NISR, TRC_CFG_NQUEUE, TRC_CFG_NSEMAPHORE...
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* TRC_CFG_INCLUDE_MEMMANG_EVENTS
|
||||||
|
*
|
||||||
|
* 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)
|
||||||
|
* to exclude malloc/free calls, or one (1) to include such events in the trace.
|
||||||
|
*
|
||||||
|
* Default value is 1.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define TRC_CFG_INCLUDE_MEMMANG_EVENTS 1
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* TRC_CFG_INCLUDE_USER_EVENTS
|
||||||
|
*
|
||||||
|
* Macro which should be defined as either zero (0) or one (1).
|
||||||
|
*
|
||||||
|
* If this is zero (0) the code for creating User Events is excluded to
|
||||||
|
* reduce code size. User Events are application-generated events, like
|
||||||
|
* "printf" but for the trace log and the formatting is done offline, by the
|
||||||
|
* Tracealyzer visualization tool. User Events are much faster than a printf
|
||||||
|
* and can therefore be used in timing critical code.
|
||||||
|
*
|
||||||
|
* Default value is 1.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define TRC_CFG_INCLUDE_USER_EVENTS 1
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* TRC_CFG_INCLUDE_ISR_TRACING
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* excluded, in order to reduce code size.
|
||||||
|
*
|
||||||
|
* Default value is 1.
|
||||||
|
*
|
||||||
|
* Note: tracing ISRs requires that you insert calls to vTraceStoreISRBegin
|
||||||
|
* and vTraceStoreISREnd in your interrupt handlers.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define TRC_CFG_INCLUDE_ISR_TRACING 1
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* TRC_CFG_INCLUDE_READY_EVENTS
|
||||||
|
*
|
||||||
|
* Macro which should be defined as either zero (0) or one (1).
|
||||||
|
*
|
||||||
|
* If one (1), events are recorded when tasks enter scheduling state "ready".
|
||||||
|
* This allows Tracealyzer to show the initial pending time before tasks enter
|
||||||
|
* the execution state, and present accurate response times.
|
||||||
|
* If zero (0), "ready events" are not created, which allows for recording
|
||||||
|
* longer traces in the same amount of RAM.
|
||||||
|
*
|
||||||
|
* Default value is 1.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define TRC_CFG_INCLUDE_READY_EVENTS 1
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* TRC_CFG_INCLUDE_OSTICK_EVENTS
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* increased. If zero (0), OS tick events are not generated, which allows for
|
||||||
|
* recording longer traces in the same amount of RAM.
|
||||||
|
*
|
||||||
|
* Default value is 0.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define TRC_CFG_INCLUDE_OSTICK_EVENTS 1
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* 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
|
||||||
|
* vTracePrintF is stripped out, in case floating point values are not used or
|
||||||
|
* supported by the platform used.
|
||||||
|
*
|
||||||
|
* Floating point values are only used in vTracePrintF and its subroutines, to
|
||||||
|
* allow for storing float (%f) or double (%lf) arguments.
|
||||||
|
*
|
||||||
|
* vTracePrintF can be used with integer and string arguments in either case.
|
||||||
|
*
|
||||||
|
* Default value is 0.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define TRC_CFG_INCLUDE_FLOAT_SUPPORT 0
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* TRC_CFG_INCLUDE_OBJECT_DELETE
|
||||||
|
*
|
||||||
|
* Macro which should be defined as either zero (0) or one (1).
|
||||||
|
*
|
||||||
|
* This must be enabled (1) if tasks, queues or other
|
||||||
|
* traced kernel objects are deleted at runtime. If no deletes are made, this
|
||||||
|
* can be set to 0 in order to exclude the delete-handling code.
|
||||||
|
*
|
||||||
|
* Default value is 1.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define TRC_CFG_INCLUDE_OBJECT_DELETE 1
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* TRC_CFG_SYMBOL_TABLE_SIZE
|
||||||
|
*
|
||||||
|
* Macro which should be defined as an integer value.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* objects. If you don't use User Events or delete any kernel
|
||||||
|
* objects you set this to a very low value. The minimum recommended value is 4.
|
||||||
|
* A size of zero (0) is not allowed since a zero-sized array may result in a
|
||||||
|
* 32-bit pointer, i.e., using 4 bytes rather than 0.
|
||||||
|
*
|
||||||
|
* Default value is 800.
|
||||||
|
******************************************************************************/
|
||||||
|
#define TRC_CFG_SYMBOL_TABLE_SIZE 5000
|
||||||
|
|
||||||
|
#if (TRC_CFG_SYMBOL_TABLE_SIZE == 0)
|
||||||
|
#error "TRC_CFG_SYMBOL_TABLE_SIZE may not be zero!"
|
||||||
|
#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
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*** ADVANCED SETTINGS ********************************************************
|
||||||
|
******************************************************************************
|
||||||
|
* The remaining settings are not necessary to modify but allows for optimizing
|
||||||
|
* the recorder setup for your specific needs, e.g., to exclude events that you
|
||||||
|
* are not interested in, in order to get longer traces.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* TRC_CFG_HEAP_SIZE_BELOW_16M
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Default value is 0.
|
||||||
|
******************************************************************************/
|
||||||
|
#define TRC_CFG_HEAP_SIZE_BELOW_16M 0
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* TRC_CFG_USE_IMPLICIT_IFE_RULES
|
||||||
|
*
|
||||||
|
* Macro which should be defined as either zero (0) or one (1).
|
||||||
|
* Default is 1.
|
||||||
|
*
|
||||||
|
* Tracealyzer groups the events into "instances" based on Instance Finish
|
||||||
|
* Events (IFEs), produced either by default rules or calls to the recorder
|
||||||
|
* functions vTraceInstanceFinishedNow and vTraceInstanceFinishedNext.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
* If these rules don't give appropriate instances in your case, you can
|
||||||
|
* override the default rules using vTraceInstanceFinishedNow/Next for one
|
||||||
|
* 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
|
||||||
|
* disabled globally. You must then call vTraceInstanceFinishedNow or
|
||||||
|
* vTraceInstanceFinishedNext to manually group the events into instances,
|
||||||
|
* otherwise the tasks will appear a single long instance.
|
||||||
|
*
|
||||||
|
* The default IFE rules count the following events as "instance finished":
|
||||||
|
* - Task delay, delay until
|
||||||
|
* - Task suspend
|
||||||
|
* - 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.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* TRC_CFG_USE_16BIT_OBJECT_HANDLES
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* objects such as tasks and queues. This limits the supported number of
|
||||||
|
* concurrently active objects to 255 of each type (tasks, queues, mutexes,
|
||||||
|
* etc.) Note: 255, not 256, since handle 0 is reserved.
|
||||||
|
*
|
||||||
|
* If set to 1 (one), the recorder uses 16-bit handles to identify kernel
|
||||||
|
* objects such as tasks and queues. This limits the supported number of
|
||||||
|
* concurrent objects to 65535 of each type (object class). However, since the
|
||||||
|
* object property table is limited to 64 KB, the practical limit is about
|
||||||
|
* 3000 objects in total.
|
||||||
|
*
|
||||||
|
* Default is 0 (8-bit handles)
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* tables in the recorder gets slightly larger when using 16-bit handles.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define TRC_CFG_USE_16BIT_OBJECT_HANDLES 0
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* TRC_CFG_USE_TRACE_ASSERT
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* separate user event buffer (UB).
|
||||||
|
* In this mode, user events are stored separately from other events,
|
||||||
|
* e.g., RTOS events. Thereby you can get a much longer history of
|
||||||
|
* user events as they don't need to share the buffer space with more
|
||||||
|
* frequent events.
|
||||||
|
*
|
||||||
|
* The UB is typically used with the snapshot ring-buffer mode, so the
|
||||||
|
* recording can continue when the main buffer gets full. And since the
|
||||||
|
* main buffer then overwrites the earliest events, Tracealyzer displays
|
||||||
|
* "Unknown Actor" instead of task scheduling for periods with UB data only.
|
||||||
|
*
|
||||||
|
* In UB mode, user events are structured as UB channels, which contains
|
||||||
|
* a channel name and a default format string. Register a UB channel using
|
||||||
|
* xTraceRegisterUBChannel.
|
||||||
|
*
|
||||||
|
* Events and data arguments are written using vTraceUBEvent and
|
||||||
|
* vTraceUBData. They are designed to provide efficient logging of
|
||||||
|
* repeating events, using the same format string within each channel.
|
||||||
|
*
|
||||||
|
* Examples:
|
||||||
|
*
|
||||||
|
* traceString chn1 = xTraceRegisterString("Channel 1");
|
||||||
|
* traceString fmt1 = xTraceRegisterString("Event!");
|
||||||
|
* traceUBChannel UBCh1 = xTraceRegisterUBChannel(chn1, fmt1);
|
||||||
|
*
|
||||||
|
* traceString chn2 = xTraceRegisterString("Channel 2");
|
||||||
|
* traceString fmt2 = xTraceRegisterString("X: %d, Y: %d");
|
||||||
|
* traceUBChannel UBCh2 = xTraceRegisterUBChannel(chn2, fmt2);
|
||||||
|
*
|
||||||
|
* // Result in "[Channel 1] Event!"
|
||||||
|
* vTraceUBEvent(UBCh1);
|
||||||
|
*
|
||||||
|
* // Result in "[Channel 2] X: 23, Y: 19"
|
||||||
|
* vTraceUBData(UBCh2, 23, 19);
|
||||||
|
*
|
||||||
|
* You can also use the other user event functions, like vTracePrintF.
|
||||||
|
* 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
|
||||||
|
* provided channel name and format string, or creates a new UB channel
|
||||||
|
* if no match is found. The format string should therefore not contain
|
||||||
|
* "random" messages but mainly format specifiers. Random strings should
|
||||||
|
* be stored using %s and with the string as an argument.
|
||||||
|
*
|
||||||
|
* // Creates a new UB channel ("Channel 2", "%Z: %d")
|
||||||
|
* vTracePrintF(chn2, "%Z: %d", value1);
|
||||||
|
*
|
||||||
|
* // Finds the existing UB channel
|
||||||
|
* vTracePrintF(chn2, "%Z: %d", value2);
|
||||||
|
|
||||||
|
******************************************************************************/
|
||||||
|
#define TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER 0
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* TRC_CFG_SEPARATE_USER_EVENT_BUFFER_SIZE
|
||||||
|
*
|
||||||
|
* Macro which should be defined as an integer value.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Only applicable if TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER is 1.
|
||||||
|
******************************************************************************/
|
||||||
|
#define TRC_CFG_SEPARATE_USER_EVENT_BUFFER_SIZE 200
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* TRC_CFG_UB_CHANNELS
|
||||||
|
*
|
||||||
|
* Macro which should be defined as an integer value.
|
||||||
|
*
|
||||||
|
* This defines the number of User Event Buffer Channels (UB channels).
|
||||||
|
* These are used to structure the events when using the separate user
|
||||||
|
* event buffer, and contains both a User Event Channel (the name) and
|
||||||
|
* a default format string for the channel.
|
||||||
|
*
|
||||||
|
* Only applicable if TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER is 1.
|
||||||
|
******************************************************************************/
|
||||||
|
#define TRC_CFG_UB_CHANNELS 32
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* TRC_CFG_ISR_TAILCHAINING_THRESHOLD
|
||||||
|
*
|
||||||
|
* 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*/
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
|
@ -19,11 +19,13 @@
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseOfMfc>false</UseOfMfc>
|
<UseOfMfc>false</UseOfMfc>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseOfMfc>false</UseOfMfc>
|
<UseOfMfc>false</UseOfMfc>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
@ -135,11 +137,9 @@
|
||||||
<ClCompile Include="..\..\..\FreeRTOS\Source\tasks.c" />
|
<ClCompile Include="..\..\..\FreeRTOS\Source\tasks.c" />
|
||||||
<ClCompile Include="..\..\..\FreeRTOS\Source\timers.c" />
|
<ClCompile Include="..\..\..\FreeRTOS\Source\timers.c" />
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-CLI\FreeRTOS_CLI.c" />
|
<ClCompile Include="..\..\Source\FreeRTOS-Plus-CLI\FreeRTOS_CLI.c" />
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcBase.c" />
|
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcHardwarePort.c" />
|
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcKernel.c" />
|
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcKernelPort.c" />
|
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcKernelPort.c" />
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcUser.c" />
|
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcSnapshotRecorder.c" />
|
||||||
|
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcStreamingRecorder.c" />
|
||||||
<ClCompile Include="CLI-commands.c" />
|
<ClCompile Include="CLI-commands.c" />
|
||||||
<ClCompile Include="main.c">
|
<ClCompile Include="main.c">
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
@ -150,13 +150,9 @@
|
||||||
<ClCompile Include="UDPCommandServer.c" />
|
<ClCompile Include="UDPCommandServer.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcBase.h" />
|
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernel.h" />
|
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernelPort.h" />
|
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcTypes.h" />
|
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcUser.h" />
|
|
||||||
<ClInclude Include="FreeRTOSConfig.h" />
|
<ClInclude Include="FreeRTOSConfig.h" />
|
||||||
<ClInclude Include="Trace_Recorder_Configuration\trcConfig.h" />
|
<ClInclude Include="Trace_Recorder_Configuration\trcConfig.h" />
|
||||||
|
<ClInclude Include="Trace_Recorder_Configuration\trcSnapshotConfig.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
|
|
@ -25,9 +25,6 @@
|
||||||
<Filter Include="FreeRTOS+\FreeRTOS+Trace">
|
<Filter Include="FreeRTOS+\FreeRTOS+Trace">
|
||||||
<UniqueIdentifier>{629e761f-e8a8-430e-b44e-f38d83292b54}</UniqueIdentifier>
|
<UniqueIdentifier>{629e761f-e8a8-430e-b44e-f38d83292b54}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="FreeRTOS+\FreeRTOS+Trace\Include">
|
|
||||||
<UniqueIdentifier>{e17028e8-51ed-45af-8aa4-22ade709b3fb}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="FreeRTOS\Configuration Files">
|
<Filter Include="FreeRTOS\Configuration Files">
|
||||||
<UniqueIdentifier>{19ff1a34-36de-4c48-9d10-3fb1fa0d1fa4}</UniqueIdentifier>
|
<UniqueIdentifier>{19ff1a34-36de-4c48-9d10-3fb1fa0d1fa4}</UniqueIdentifier>
|
||||||
<Extensions>
|
<Extensions>
|
||||||
|
@ -74,21 +71,15 @@
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-CLI\FreeRTOS_CLI.c">
|
<ClCompile Include="..\..\Source\FreeRTOS-Plus-CLI\FreeRTOS_CLI.c">
|
||||||
<Filter>FreeRTOS+\FreeRTOS+CLI</Filter>
|
<Filter>FreeRTOS+\FreeRTOS+CLI</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcUser.c">
|
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcBase.c">
|
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcKernel.c">
|
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcHardwarePort.c">
|
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcKernelPort.c">
|
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcKernelPort.c">
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace</Filter>
|
<Filter>FreeRTOS+\FreeRTOS+Trace</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcSnapshotRecorder.c">
|
||||||
|
<Filter>FreeRTOS+\FreeRTOS+Trace</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\Source\FreeRTOS-Plus-Trace\trcStreamingRecorder.c">
|
||||||
|
<Filter>FreeRTOS+\FreeRTOS+Trace</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="FreeRTOSConfig.h">
|
<ClInclude Include="FreeRTOSConfig.h">
|
||||||
|
@ -97,20 +88,8 @@
|
||||||
<ClInclude Include="Trace_Recorder_Configuration\trcConfig.h">
|
<ClInclude Include="Trace_Recorder_Configuration\trcConfig.h">
|
||||||
<Filter>Demo App Source\Trace Recorder Configuration</Filter>
|
<Filter>Demo App Source\Trace Recorder Configuration</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcUser.h">
|
<ClInclude Include="Trace_Recorder_Configuration\trcSnapshotConfig.h">
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
<Filter>Demo App Source\Trace Recorder Configuration</Filter>
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcBase.h">
|
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernel.h">
|
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcTypes.h">
|
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernelPort.h">
|
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -121,9 +121,6 @@
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
|
||||||
/* FreeRTOS+Trace includes. */
|
|
||||||
#include "trcUser.h"
|
|
||||||
|
|
||||||
/* Priorities at which the tasks are created. */
|
/* Priorities at which the tasks are created. */
|
||||||
#define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
#define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||||
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||||
|
@ -161,12 +158,6 @@ extern void vRegisterCLICommands( void );
|
||||||
/* The queue used by both tasks. */
|
/* The queue used by both tasks. */
|
||||||
static xQueueHandle xQueue = NULL;
|
static xQueueHandle xQueue = NULL;
|
||||||
|
|
||||||
/* The user trace event posted to the trace recording on each tick interrupt.
|
|
||||||
Note tick events will not appear in the trace recording with regular period
|
|
||||||
because this project runs in a Windows simulator, and does not therefore
|
|
||||||
exhibit deterministic behaviour. */
|
|
||||||
traceLabel xTickTraceUserEvent;
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
int main( void )
|
int main( void )
|
||||||
|
@ -175,8 +166,7 @@ const uint32_t ulLongTime_ms = 250UL;
|
||||||
|
|
||||||
/* Initialise the trace recorder and create the label used to post user
|
/* Initialise the trace recorder and create the label used to post user
|
||||||
events to the trace recording on each tick interrupt. */
|
events to the trace recording on each tick interrupt. */
|
||||||
vTraceInitTraceData();
|
vTraceEnable( TRC_START );
|
||||||
xTickTraceUserEvent = xTraceOpenLabel( "tick" );
|
|
||||||
|
|
||||||
/* Create the queue used to pass messages from the queue send task to the
|
/* Create the queue used to pass messages from the queue send task to the
|
||||||
queue receive task. */
|
queue receive task. */
|
||||||
|
@ -210,7 +200,7 @@ const uint32_t ulLongTime_ms = 250UL;
|
||||||
line will never be reached. If the following line does execute, then
|
line will never be reached. If the following line does execute, then
|
||||||
there was insufficient FreeRTOS heap memory available for the idle and/or
|
there was insufficient FreeRTOS heap memory available for the idle and/or
|
||||||
timer tasks to be created. See the memory management section on the
|
timer tasks to be created. See the memory management section on the
|
||||||
FreeRTOS web site for more details (this is standard text that is not not
|
FreeRTOS web site for more details (this is standard text that is not
|
||||||
really applicable to the Win32 simulator port). */
|
really applicable to the Win32 simulator port). */
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
|
@ -295,12 +285,4 @@ const unsigned long ulLongSleep = 1000UL;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vApplicationTickHook( void )
|
|
||||||
{
|
|
||||||
/* Write a user event to the trace log.
|
|
||||||
Note tick events will not appear in the trace recording with regular period
|
|
||||||
because this project runs in a Windows simulator, and does not therefore
|
|
||||||
exhibit deterministic behaviour. */
|
|
||||||
vTraceUserEvent( xTickTraceUserEvent );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue