mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-05-09 14:49:04 -04:00
+ Update demos that use FreeRTOS+Trace to work with the latest trace recorder library.
+ Fix a few compiler warnings. + Add TickType_t specific critical sections so critical sections are not used when accessing the tick count in cases where the access is atomic (32-bit tick count, 32-bit architecture).
This commit is contained in:
parent
85fb1cc024
commit
f407b70dcc
|
@ -105,7 +105,7 @@
|
||||||
#define configTIMER_QUEUE_LENGTH 20
|
#define configTIMER_QUEUE_LENGTH 20
|
||||||
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
|
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
|
||||||
|
|
||||||
#define configMAX_PRIORITIES ( ( UBaseType_t ) 7 )
|
#define configMAX_PRIORITIES ( 7 )
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,6 +157,8 @@ 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()
|
||||||
|
#define TRACE_EXIT_CRITICAL_SECTION() portEXIT_CRITICAL()
|
||||||
#include "trcKernelPort.h"
|
#include "trcKernelPort.h"
|
||||||
|
|
||||||
#endif /* FREERTOS_CONFIG_H */
|
#endif /* FREERTOS_CONFIG_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Tracealyzer v2.6.0 Recorder Library
|
* Tracealyzer v2.7.0 Recorder Library
|
||||||
* Percepio AB, www.percepio.com
|
* Percepio AB, www.percepio.com
|
||||||
*
|
*
|
||||||
* trcConfig.h
|
* trcConfig.h
|
||||||
|
@ -36,16 +36,101 @@
|
||||||
* damages, or the exclusion of implied warranties or limitations on how long an
|
* 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.
|
* implied warranty may last, so the above limitations may not apply to you.
|
||||||
*
|
*
|
||||||
* Copyright Percepio AB, 2013.
|
* Tabs are used for indent in this file (1 tab = 4 spaces)
|
||||||
|
*
|
||||||
|
* Copyright Percepio AB, 2014.
|
||||||
* www.percepio.com
|
* www.percepio.com
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#ifndef TRCCONFIG_H
|
#ifndef TRCCONFIG_H
|
||||||
#define TRCCONFIG_H
|
#define TRCCONFIG_H
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* SELECTED_PORT
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* Macro which should be defined as one of:
|
||||||
|
* - TRACE_STORE_MODE_RING_BUFFER
|
||||||
|
* - TRACE_STORE_MODE_STOP_WHEN_FULL
|
||||||
|
* 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
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* CONFIGURATION RELATED TO CAPACITY AND ALLOCATION
|
* TRACE_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.
|
||||||
|
*
|
||||||
|
* Users of FreeRTOS+Trace Free Edition only displays scheduling events, so this
|
||||||
|
* option can be used to avoid storing unsupported events.
|
||||||
|
*
|
||||||
|
* Default value is 0 (store all enabled events).
|
||||||
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
#define TRACE_SCHEDULING_ONLY 0
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* EVENT_BUFFER_SIZE
|
* EVENT_BUFFER_SIZE
|
||||||
|
@ -53,34 +138,144 @@
|
||||||
* 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. Each registered event typically use one record (4 byte), but
|
* it may store. Most events use one record (4 byte), although some events
|
||||||
* vTracePrintF may use multiple records depending on the number of data args.
|
* 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 EVENT_BUFFER_SIZE 15000
|
||||||
#define EVENT_BUFFER_SIZE 4000 /* Adjust wrt. to available RAM */
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* USE_LINKER_PRAGMA
|
* NTask, NISR, NQueue, NSemaphore, NMutex
|
||||||
*
|
*
|
||||||
* Macro which should be defined as an integer value, default is 0.
|
* A group of macros which should be defined as integer values, zero or larger.
|
||||||
*
|
*
|
||||||
* If this is 1, the header file "recorderdata_linker_pragma.h" is included just
|
* These define the capacity of the Object Property Table, i.e., the maximum
|
||||||
* before the declaration of RecorderData (in trcBase.c), i.e., the trace data
|
* number of objects active at any given point, within each object class (e.g.,
|
||||||
* structure. This allows the user to specify a pragma with linker options.
|
* task, queue, semaphore, ...).
|
||||||
*
|
*
|
||||||
* Example (for IAR Embedded Workbench and NXP LPC17xx):
|
* If tasks or other other objects are deleted in your system, this
|
||||||
* #pragma location="AHB_RAM_MEMORY"
|
* setting does not limit the total amount of objects created, only the number
|
||||||
|
* of objects that have been successfully created but not yet deleted.
|
||||||
*
|
*
|
||||||
* This example instructs the IAR linker to place RecorderData in another RAM
|
* Using too small values will cause vTraceError to be called, which stores an
|
||||||
* bank, the AHB RAM. This can also be used for other compilers with a similar
|
* error message in the trace that is shown when opening the trace file.
|
||||||
* pragmas for linker options.
|
|
||||||
*
|
*
|
||||||
* Note that this only applies if using static allocation, see below.
|
* 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 NISR 60
|
||||||
|
#define NQueue 60
|
||||||
|
#define NSemaphore 60
|
||||||
|
#define NMutex 60
|
||||||
|
#define NTimer 200
|
||||||
|
#define NEventGroup 60
|
||||||
|
|
||||||
#define USE_LINKER_PRAGMA 0
|
/******************************************************************************
|
||||||
|
* 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 to
|
||||||
|
* exclude malloc/free calls, or one (1) to include such events in the trace.
|
||||||
|
*
|
||||||
|
* Default value is 1.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define INCLUDE_MEMMANG_EVENTS 1
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* 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 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.
|
||||||
|
*
|
||||||
|
* Note that User Events are only displayed in Professional Edition.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define INCLUDE_USER_EVENTS 1
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* 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 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
|
* SYMBOL_TABLE_SIZE
|
||||||
|
@ -89,96 +284,26 @@
|
||||||
*
|
*
|
||||||
* 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
|
||||||
* objects. Note that the names of active objects not stored here but in the
|
* objects. If you don't use User Events or delete any kernel
|
||||||
* Object Table. Thus, 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.
|
||||||
* objects you set this to a very low value, e.g. 4, but not zero (0) since
|
* A size of zero (0) is not allowed since a zero-sized array may result in a
|
||||||
* this causes a declaration of a zero-sized array, for which the C compiler
|
* 32-bit pointer, i.e., using 4 bytes rather than 0.
|
||||||
* behavior is not standardized and may cause misaligned data.
|
*
|
||||||
|
* Default value is 800.
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define SYMBOL_TABLE_SIZE 1000
|
#define SYMBOL_TABLE_SIZE 5000
|
||||||
|
|
||||||
#if (SYMBOL_TABLE_SIZE == 0)
|
#if (SYMBOL_TABLE_SIZE == 0)
|
||||||
#error "SYMBOL_TABLE_SIZE may not be zero!"
|
#error "SYMBOL_TABLE_SIZE may not be zero!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/******************************************************************************
|
||||||
* USE_SEPARATE_USER_EVENT_BUFFER
|
* NameLenTask, NameLenQueue, ...
|
||||||
*
|
*
|
||||||
* Macro which should be defined as an integer value.
|
* Macros that specify the maximum lengths (number of characters) for names of
|
||||||
* Default is zero (0).
|
* kernel objects, such as tasks and queues. If longer names are used, they will
|
||||||
*
|
* be truncated when stored in the recorder.
|
||||||
* This enables and disables the use of the separate user event buffer.
|
*****************************************************************************/
|
||||||
*
|
|
||||||
* 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 500
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* 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
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* NTask, NISR, NQueue, NSemaphore, NMutex
|
|
||||||
*
|
|
||||||
* A group of Macros which should be defined as an integer value of zero (0)
|
|
||||||
* or larger.
|
|
||||||
*
|
|
||||||
* This defines the capacity of the Object Property Table - the maximum number
|
|
||||||
* of objects active at any given point within each object class.
|
|
||||||
*
|
|
||||||
* NOTE: In case objects are deleted and created during runtime, this setting
|
|
||||||
* does not limit the total amount of objects, only the number of concurrently
|
|
||||||
* active objects.
|
|
||||||
*
|
|
||||||
* Using too small values will give an error message through the vTraceError
|
|
||||||
* routine, which makes the error message appear when opening the trace data
|
|
||||||
* in Tracealyzer. If you are using the recorder status monitor task,
|
|
||||||
* any error messages are displayed in console prints, assuming that the
|
|
||||||
* print macro has been defined properly (vConsolePrintMessage).
|
|
||||||
*
|
|
||||||
* It can be wise to start with very large values for these constants,
|
|
||||||
* unless you are very confident on these numbers. Then do a recording and
|
|
||||||
* check the actual usage in Tracealyzer. This is shown by selecting
|
|
||||||
* View -> Trace Details -> Resource Usage -> Object Table
|
|
||||||
*
|
|
||||||
* NOTE 2: Remember to account for all tasks and other objects created by
|
|
||||||
* the kernel, such as the IDLE task, any timer tasks, and any tasks created
|
|
||||||
* by other 3rd party software components, such as communication stacks.
|
|
||||||
* Moreover, one task slot is used to indicate "(startup)", i.e., a fictive
|
|
||||||
* task that represent the time before the scheduler starts.
|
|
||||||
* NTask should thus be at least 2-3 slots larger than your application task count.
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#define NTask 15
|
|
||||||
#define NISR 15
|
|
||||||
#define NQueue 15
|
|
||||||
#define NSemaphore 15
|
|
||||||
#define NMutex 15
|
|
||||||
#define NTimer 15
|
|
||||||
#define NEventGroup 15
|
|
||||||
|
|
||||||
/* Maximum object name length for each class (includes zero termination) */
|
|
||||||
#define NameLenTask 15
|
#define NameLenTask 15
|
||||||
#define NameLenISR 15
|
#define NameLenISR 15
|
||||||
#define NameLenQueue 15
|
#define NameLenQueue 15
|
||||||
|
@ -187,30 +312,6 @@
|
||||||
#define NameLenTimer 15
|
#define NameLenTimer 15
|
||||||
#define NameLenEventGroup 15
|
#define NameLenEventGroup 15
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* TRACE_DESCRIPTION
|
|
||||||
*
|
|
||||||
* Macro which should be defined as a string.
|
|
||||||
*
|
|
||||||
* This string is stored in the trace and displayed in Tracealyzer. Can be
|
|
||||||
* used to store, e.g., system version or build date. This is also used to store
|
|
||||||
* internal error messages from the recorder, which if occurs overwrites the
|
|
||||||
* value defined here. This may be maximum 256 chars.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define TRACE_DESCRIPTION "Tracealyzer Recorder Test Program"
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* TRACE_DESCRIPTION_MAX_LENGTH
|
|
||||||
*
|
|
||||||
* The maximum length (including zero termination) for the TRACE_DESCRIPTION
|
|
||||||
* string. Since this string also is used for internal error messages from the
|
|
||||||
* recorder do not make it too short, as this may truncate the error messages.
|
|
||||||
* Default is 80.
|
|
||||||
* Maximum allowed length is 256 - the trace will fail to load if longer.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define TRACE_DESCRIPTION_MAX_LENGTH 80
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* TRACE_DATA_ALLOCATION
|
* TRACE_DATA_ALLOCATION
|
||||||
*
|
*
|
||||||
|
@ -227,173 +328,49 @@
|
||||||
*
|
*
|
||||||
* Using dynamic allocation may give more flexibility in some cases.
|
* Using dynamic allocation may give more flexibility in some cases.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#define TRACE_DATA_ALLOCATION TRACE_DATA_ALLOCATION_STATIC
|
#define TRACE_DATA_ALLOCATION TRACE_DATA_ALLOCATION_STATIC
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* CONFIGURATION REGARDING WHAT CODE/FEATURES TO INCLUDE
|
*** 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.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* USE_TRACE_ASSERT
|
* HEAP_SIZE_BELOW_16M
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* An integer constant that can be used to reduce the buffer usage of memory
|
||||||
* Default is 0.
|
* 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
|
||||||
* If this is one (1), the TRACE_ASSERT macro will verify that a condition is
|
* lower 24 bits only. If 0, you get the full 32-bit addresses.
|
||||||
* true. If the condition is false, vTraceError() will be called.
|
*
|
||||||
*****************************************************************************/
|
* Default value is 0.
|
||||||
#define USE_TRACE_ASSERT 1
|
******************************************************************************/
|
||||||
|
#define HEAP_SIZE_BELOW_16M 0
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* INCLUDE_FLOAT_SUPPORT
|
* USE_LINKER_PRAGMA
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* Macro which should be defined as an integer value, default is 0.
|
||||||
* Default is 1.
|
|
||||||
*
|
*
|
||||||
* If this is zero (0), all references to floating point values are removed,
|
* If this is 1, the header file "recorderdata_linker_pragma.h" is included just
|
||||||
* in case floating point values are not supported by the platform used.
|
* before the declaration of RecorderData (in trcBase.c), i.e., the trace data
|
||||||
* Floating point values are only used in vTracePrintF and its subroutines, to
|
* structure. This allows the user to specify a pragma with linker options.
|
||||||
* store float (%f) or double (%lf) argments.
|
|
||||||
*
|
*
|
||||||
* Note: vTracePrintF can still be used with integer and string arguments in
|
* Example (for IAR Embedded Workbench and NXP LPC17xx):
|
||||||
* either case.
|
* #pragma location="AHB_RAM_MEMORY"
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_FLOAT_SUPPORT 0
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* INCLUDE_USER_EVENTS
|
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* This example instructs the IAR linker to place RecorderData in another RAM
|
||||||
* Default is 1.
|
* bank, the AHB RAM. This can also be used for other compilers with a similar
|
||||||
|
* pragmas for linker options.
|
||||||
*
|
*
|
||||||
* If this is zero (0) the code for creating User Events is excluded to
|
* Note that this only applies if using static allocation, see below.
|
||||||
* reduce code size. User Events are application-generated events, like
|
******************************************************************************/
|
||||||
* "printf" but for the trace log instead of console output. User Events are
|
#define USE_LINKER_PRAGMA 0
|
||||||
* much faster than a printf and can therefore be used in timing critical code.
|
|
||||||
* See vTraceUserEvent() and vTracePrintF() in trcUser.h
|
|
||||||
*
|
|
||||||
* Note that User Events are not displayed in FreeRTOS+Trace Free Edition.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_USER_EVENTS 1
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* INCLUDE_READY_EVENTS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 1.
|
|
||||||
*
|
|
||||||
* If this is zero (0), the code for recording Ready events is
|
|
||||||
* excluded. Note, this will make it impossible to calculate the correct
|
|
||||||
* response times.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_READY_EVENTS 1
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* INCLUDE_NEW_TIME_EVENTS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 0.
|
|
||||||
*
|
|
||||||
* If this is zero (1), events will be generated whenever the os clock is
|
|
||||||
* increased.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_NEW_TIME_EVENTS 0
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* INCLUDE_ISR_TRACING
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 1.
|
|
||||||
*
|
|
||||||
* If this is zero (0), the code for recording Interrupt Service Routines is
|
|
||||||
* excluded to reduce code size.
|
|
||||||
*
|
|
||||||
* 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_OBJECT_DELETE
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 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.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_OBJECT_DELETE 1
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* INCLUDE_MEMMANG_EVENTS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 1.
|
|
||||||
*
|
|
||||||
* This controls if malloc and free calls should be traced. Set this to zero to
|
|
||||||
* exclude malloc/free calls from the tracing.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_MEMMANG_EVENTS 1
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* CONFIGURATION RELATED TO BEHAVIOR
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* TRACE_RECORDER_STORE_MODE
|
|
||||||
*
|
|
||||||
* Macro which should be defined as one of:
|
|
||||||
* - TRACE_STORE_MODE_RING_BUFFER
|
|
||||||
* - TRACE_STORE_MODE_STOP_WHEN_FULL
|
|
||||||
* 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 a large trace buffer
|
|
||||||
* for string the whole run since startup. In this mode, the recorder can run
|
|
||||||
* "forever" as the buffer never gets full, i.e., in the sense that it always
|
|
||||||
* has room for more events.
|
|
||||||
*
|
|
||||||
* To fetch the trace in mode TRACE_STORE_MODE_RING_BUFFER, you need to first halt the
|
|
||||||
* system using your debugger and then do a RAM dump, or to explicitly stop the
|
|
||||||
* recorder using vTraceStop() and then store/upload the trace data using a
|
|
||||||
* task that you need to provide yourself. The trace data is found in the struct
|
|
||||||
* RecorderData, initialized in trcBase.c.
|
|
||||||
*
|
|
||||||
* Note that, if you upload the trace using a RAM dump, i.e., when the system is
|
|
||||||
* halted on a breakpoint or by a debugger command, there is no need to stop the
|
|
||||||
* recorder first.
|
|
||||||
*
|
|
||||||
* When TRACE_RECORDER_STORE_MODE is TRACE_STORE_MODE_STOP_WHEN_FULL, the recording is
|
|
||||||
* stopped when the buffer becomes full. When the recorder stops itself this way
|
|
||||||
* vTracePortEnd() is called which allows for custom actions, such as triggering
|
|
||||||
* a task that stores the trace buffer, i.e., in case taking a RAM dump
|
|
||||||
* using an on-chip debugger is not possible. In the Windows port, vTracePortEnd
|
|
||||||
* saves the trace to file directly, but this is not recommended in a real-time
|
|
||||||
* system since the scheduler is blocked during the processing of vTracePortEnd.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
#define TRACE_RECORDER_STORE_MODE TRACE_STORE_MODE_RING_BUFFER
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* STOP_AFTER_N_EVENTS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as an integer value, or not defined.
|
|
||||||
* Default is -1
|
|
||||||
*
|
|
||||||
* STOP_AFTER_N_EVENTS is intended for tests of the ring buffer mode (when
|
|
||||||
* RECORDER_STORE_MODE is STORE_MODE_RING_BUFFER). It stops the recording when
|
|
||||||
* the specified number of events has been observed. This value can be larger
|
|
||||||
* than the buffer size, to allow for test of the "wrapping around" that occurs
|
|
||||||
* in ring buffer mode . A negative value (or no definition of this macro)
|
|
||||||
* disables this feature.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define STOP_AFTER_N_EVENTS -1
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* USE_IMPLICIT_IFE_RULES
|
* USE_IMPLICIT_IFE_RULES
|
||||||
|
@ -401,56 +378,26 @@
|
||||||
* 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.
|
||||||
*
|
*
|
||||||
* ### Instance Finish Events (IFE) ###
|
* 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).
|
||||||
*
|
*
|
||||||
* For tasks with "infinite" main loops (non-terminating tasks), the concept
|
* If USE_IMPLICIT_IFE_RULES is one (1), the default IFEs will be enabled, which
|
||||||
* of a task instance has no clear definition, it is an application-specific
|
* gives a "typical" grouping of events into instances. You can combine this
|
||||||
* thing. Tracealyzer allows you to define Instance Finish Events (IFEs),
|
* with calls to vTraceTaskInstanceFinish for specific tasks.
|
||||||
* which marks the point in a cyclic task when the "task instance" ends.
|
|
||||||
* The IFE is a blocking kernel call, typically in the main loop of a task
|
|
||||||
* which typically reads a message queue, waits for a semaphore or performs
|
|
||||||
* an explicit delay.
|
|
||||||
*
|
*
|
||||||
* If USE_IMPLICIT_IFE_RULES is one (1), the kernel macros (trcKernelPort.h)
|
* If USE_IMPLICIT_IFE_RULES is zero (0), the implicit IFEs are disabled and all
|
||||||
* will define what kernel calls are considered by default to be IFEs.
|
* events withing each task is then shown as a single instance, unless you call
|
||||||
*
|
* vTraceTaskInstanceFinish() at suitable locations to mark the IFEs.
|
||||||
* However, Implicit IFEs only applies to blocking kernel calls. If a
|
|
||||||
* service reads a message without blocking, it does not create a new
|
|
||||||
* instance since no blocking occurred.
|
|
||||||
*
|
|
||||||
* Moreover, the actual IFE might sometimes be another blocking call. We
|
|
||||||
* therefore allow for user-defined Explicit IFEs by calling
|
|
||||||
*
|
|
||||||
* vTraceTaskInstanceIsFinished()
|
|
||||||
*
|
|
||||||
* right before the kernel call considered as IFE. This does not create an
|
|
||||||
* additional event but instead stores the service code and object handle
|
|
||||||
* of the IFE call as properties of the task.
|
|
||||||
*
|
|
||||||
* If using Explicit IFEs and the task also calls an Implicit IFE, this may
|
|
||||||
* result in additional incorrect task instances.
|
|
||||||
* This is solved by disabling the Implicit IFEs for the task, by adding
|
|
||||||
* a call to
|
|
||||||
*
|
|
||||||
* vTraceTaskSkipDefaultInstanceFinishedEvents()
|
|
||||||
*
|
|
||||||
* in the very beginning of that task. This allows you to combine Explicit IFEs
|
|
||||||
* for some tasks with Implicit IFEs for the rest of the tasks, if
|
|
||||||
* USE_IMPLICIT_IFE_RULES is 1.
|
|
||||||
*
|
|
||||||
* By setting USE_IMPLICIT_IFE_RULES to zero (0), the implicit IFEs are disabled
|
|
||||||
* for all tasks. Tasks will then be considered to have a single instance only,
|
|
||||||
* covering all execution fragments, unless you define an explicit IFE in each
|
|
||||||
* task by calling vTraceTaskInstanceIsFinished before the blocking call.
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define USE_IMPLICIT_IFE_RULES 1
|
#define USE_IMPLICIT_IFE_RULES 1
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* USE_16BIT_OBJECT_HANDLES
|
* USE_16BIT_OBJECT_HANDLES
|
||||||
*
|
*
|
||||||
* 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 0.
|
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -462,69 +409,67 @@
|
||||||
* object property table is limited to 64 KB, the practical limit is about
|
* object property table is limited to 64 KB, the practical limit is about
|
||||||
* 3000 objects in total.
|
* 3000 objects in total.
|
||||||
*
|
*
|
||||||
* NOTE: An object with a high ID (> 255) will generate an extra event
|
* Default is 0.
|
||||||
* (= 4 byte) in the event buffer.
|
|
||||||
*
|
*
|
||||||
* NOTE: Some internal tables in the recorder gets larger when using 16-bit
|
* NOTE: An object with handle above 255 will use an extra 4-byte record in
|
||||||
* handles. The additional RAM usage is 5-10 byte plus 1 byte per kernel object
|
* the event buffer whenever referenced. Moreover, some internal tables in the
|
||||||
*, i.e., task, queue, semaphore, mutex, etc.
|
* 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
|
#define USE_16BIT_OBJECT_HANDLES 0
|
||||||
|
|
||||||
/****** Port Name ******************** Code ** Official ** OS Platform ******
|
|
||||||
* PORT_APPLICATION_DEFINED -2 - -
|
|
||||||
* PORT_NOT_SET -1 - -
|
|
||||||
* PORT_HWIndependent 0 Yes Any
|
|
||||||
* PORT_Win32 1 Yes FreeRTOS 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_PIC32 9 No 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
|
|
||||||
*****************************************************************************/
|
|
||||||
#define SELECTED_PORT PORT_Win32
|
|
||||||
|
|
||||||
#if (SELECTED_PORT == PORT_NOT_SET)
|
|
||||||
#error "You need to define SELECTED_PORT here!"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* USE_PRIMASK_CS (for Cortex M devices only)
|
* USE_TRACE_ASSERT
|
||||||
*
|
|
||||||
* An integer constant that selects between two options for the critical
|
|
||||||
* sections of the recorder library.
|
|
||||||
*
|
*
|
||||||
* 0: The default FreeRTOS critical section (BASEPRI) - default setting
|
* Macro which should be defined as either zero (0) or one (1).
|
||||||
* 1: Always disable ALL interrupts (using PRIMASK)
|
* Default is 1.
|
||||||
*
|
*
|
||||||
* Option 0 uses the standard FreeRTOS macros for critical sections.
|
* If this is one (1), the TRACE_ASSERT macro will verify that a condition is
|
||||||
* However, on Cortex-M devices they only disable interrupts with priorities
|
* true. If the condition is false, vTraceError() will be called.
|
||||||
* below a certain configurable level, while higher priority ISRs remain active.
|
* This is used on several places in the recorder code for sanity checks on
|
||||||
* Such high-priority ISRs may not use the recorder functions in this mode.
|
* parameters. Can be switched off to reduce CPU usage of the tracing.
|
||||||
*
|
*****************************************************************************/
|
||||||
* Option 1 allows you to safely call the recorder from any ISR, independent of
|
#define USE_TRACE_ASSERT 1
|
||||||
* the interrupt priority. This mode may however cause higher IRQ latencies
|
|
||||||
* (some microseconds) since ALL configurable interrupts are disabled during
|
/*******************************************************************************
|
||||||
* the recorder's critical sections in this mode, using the PRIMASK register.
|
* 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_PRIMASK_CS 0
|
#define USE_SEPARATE_USER_EVENT_BUFFER 0
|
||||||
|
|
||||||
/******************************************************************************
|
/*******************************************************************************
|
||||||
* HEAP_SIZE_BELOW_16M
|
* USER_EVENT_BUFFER_SIZE
|
||||||
*
|
*
|
||||||
* An integer constant that can be used to reduce the buffer usage of memory
|
* Macro which should be defined as an integer value.
|
||||||
* 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 addresses truncated to the
|
* This defines the capacity of the user event buffer, in number of slots.
|
||||||
* lower 24 bit. Otherwise set it to 0 to get the full 32-bit addresses.
|
* A single user event can use between 1 and X slots, depending on the data.
|
||||||
******************************************************************************/
|
*
|
||||||
#define HEAP_SIZE_BELOW_16M 0
|
* 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
|
||||||
|
|
||||||
|
|
|
@ -151,14 +151,12 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcBase.h" />
|
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcBase.h" />
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcHooks.h" />
|
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernel.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\trcKernelPort.h" />
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcTypes.h" />
|
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcTypes.h" />
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcUser.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\trcHardwarePort.h" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
|
|
@ -103,9 +103,6 @@
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcBase.h">
|
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcBase.h">
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcHooks.h">
|
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernel.h">
|
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernel.h">
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -115,8 +112,5 @@
|
||||||
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernelPort.h">
|
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernelPort.h">
|
||||||
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Trace_Recorder_Configuration\trcHardwarePort.h">
|
|
||||||
<Filter>Demo App Source\Trace Recorder Configuration</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -5,14 +5,14 @@
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.56486929" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.56486929" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
@ -78,6 +78,7 @@
|
||||||
<option id="com.crt.advproject.link.gcc.hdrlib.2006557555" name="Use C library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.nohost" valueType="enumerated"/>
|
<option id="com.crt.advproject.link.gcc.hdrlib.2006557555" name="Use C library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.nohost" valueType="enumerated"/>
|
||||||
<option id="gnu.c.link.option.nodeflibs.2072403274" name="Do not use default libraries (-nodefaultlibs)" superClass="gnu.c.link.option.nodeflibs" value="false" valueType="boolean"/>
|
<option id="gnu.c.link.option.nodeflibs.2072403274" name="Do not use default libraries (-nodefaultlibs)" superClass="gnu.c.link.option.nodeflibs" value="false" valueType="boolean"/>
|
||||||
<option id="com.crt.advproject.link.gcc.multicore.slave.1911982348" name="Multicore slave" superClass="com.crt.advproject.link.gcc.multicore.slave"/>
|
<option id="com.crt.advproject.link.gcc.multicore.slave.1911982348" name="Multicore slave" superClass="com.crt.advproject.link.gcc.multicore.slave"/>
|
||||||
|
<option id="com.crt.advproject.link.gcc.multicore.master.userobjs.502901386" superClass="com.crt.advproject.link.gcc.multicore.master.userobjs" valueType="userObjs"/>
|
||||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1085761099" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1085761099" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||||
|
@ -133,7 +134,7 @@
|
||||||
<storageModule moduleId="com.crt.config">
|
<storageModule moduleId="com.crt.config">
|
||||||
<projectStorage><?xml version="1.0" encoding="UTF-8"?>
|
<projectStorage><?xml version="1.0" encoding="UTF-8"?>
|
||||||
<TargetConfig>
|
<TargetConfig>
|
||||||
<Properties property_0="" property_2="LPC1850A_4350A_SPIFI.cfx" property_3="NXP" property_4="LPC1830" property_count="5" version="60000"/>
|
<Properties property_0="" property_2="LPC1850A_4350A_SPIFI.cfx" property_3="NXP" property_4="LPC1830" property_count="5" version="70200"/>
|
||||||
<infoList vendor="NXP"><info chip="LPC1830" match_id="0x0" name="LPC1830" resetscript="LPC18LPC43ExternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"><chip><name>LPC1830</name>
|
<infoList vendor="NXP"><info chip="LPC1830" match_id="0x0" name="LPC1830" resetscript="LPC18LPC43ExternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"><chip><name>LPC1830</name>
|
||||||
<family>LPC18xx</family>
|
<family>LPC18xx</family>
|
||||||
<vendor>NXP (formerly Philips)</vendor>
|
<vendor>NXP (formerly Philips)</vendor>
|
||||||
|
@ -154,10 +155,12 @@
|
||||||
<peripheralInstance derived_from="V7M_ITM" id="ITM" location="0xe0000000"/>
|
<peripheralInstance derived_from="V7M_ITM" id="ITM" location="0xe0000000"/>
|
||||||
<peripheralInstance derived_from="SCT" id="SCT" location="0x40000000"/>
|
<peripheralInstance derived_from="SCT" id="SCT" location="0x40000000"/>
|
||||||
<peripheralInstance derived_from="GPDMA" id="GPDMA" location="0x40002000"/>
|
<peripheralInstance derived_from="GPDMA" id="GPDMA" location="0x40002000"/>
|
||||||
|
<peripheralInstance derived_from="SPIFI" id="SPIFI" location="0x40003000"/>
|
||||||
<peripheralInstance derived_from="SDMMC" id="SDMMC" location="0x40004000"/>
|
<peripheralInstance derived_from="SDMMC" id="SDMMC" location="0x40004000"/>
|
||||||
<peripheralInstance derived_from="EMC" id="EMC" location="0x40005000"/>
|
<peripheralInstance derived_from="EMC" id="EMC" location="0x40005000"/>
|
||||||
<peripheralInstance derived_from="USB0" id="USB0" location="0x40006000"/>
|
<peripheralInstance derived_from="USB0" id="USB0" location="0x40006000"/>
|
||||||
<peripheralInstance derived_from="USB1" id="USB1" location="0x40007000"/>
|
<peripheralInstance derived_from="USB1" id="USB1" location="0x40007000"/>
|
||||||
|
<peripheralInstance derived_from="EEPROM" id="EEPROM" location="0x4000e000"/>
|
||||||
<peripheralInstance derived_from="ETHERNET" id="ETHERNET" location="0x40010000"/>
|
<peripheralInstance derived_from="ETHERNET" id="ETHERNET" location="0x40010000"/>
|
||||||
<peripheralInstance derived_from="ATIMER" id="ATIMER" location="0x40040000"/>
|
<peripheralInstance derived_from="ATIMER" id="ATIMER" location="0x40040000"/>
|
||||||
<peripheralInstance derived_from="REGFILE" id="REGFILE" location="0x40041000"/>
|
<peripheralInstance derived_from="REGFILE" id="REGFILE" location="0x40041000"/>
|
||||||
|
@ -198,7 +201,6 @@
|
||||||
<peripheralInstance derived_from="ADC0" id="ADC0" location="0x400e3000"/>
|
<peripheralInstance derived_from="ADC0" id="ADC0" location="0x400e3000"/>
|
||||||
<peripheralInstance derived_from="ADC1" id="ADC1" location="0x400e4000"/>
|
<peripheralInstance derived_from="ADC1" id="ADC1" location="0x400e4000"/>
|
||||||
<peripheralInstance derived_from="GPIO-PORT" id="GPIO-PORT" location="0x400f4000"/>
|
<peripheralInstance derived_from="GPIO-PORT" id="GPIO-PORT" location="0x400f4000"/>
|
||||||
<peripheralInstance derived_from="EEPROM" id="EEPROM" location="0x4000e000"/>
|
|
||||||
</chip>
|
</chip>
|
||||||
<processor><name gcc_name="cortex-m3">Cortex-M3</name>
|
<processor><name gcc_name="cortex-m3">Cortex-M3</name>
|
||||||
<family>Cortex-M</family>
|
<family>Cortex-M</family>
|
||||||
|
|
|
@ -92,7 +92,7 @@ extern uint32_t SystemCoreClock;
|
||||||
#define configTICK_RATE_HZ 100
|
#define configTICK_RATE_HZ 100
|
||||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 300 )
|
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 300 )
|
||||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40 * 1024 ) ) /* Has not effect in this demo as the heap is manually pointed to AHB RAM. */
|
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40 * 1024 ) ) /* Has not effect in this demo as the heap is manually pointed to AHB RAM. */
|
||||||
#define configMAX_TASK_NAME_LEN ( 12 )
|
#define configMAX_TASK_NAME_LEN ( 9 )
|
||||||
#define configIDLE_SHOULD_YIELD 0
|
#define configIDLE_SHOULD_YIELD 0
|
||||||
#define configQUEUE_REGISTRY_SIZE 10
|
#define configQUEUE_REGISTRY_SIZE 10
|
||||||
#define configUSE_TRACE_FACILITY 1
|
#define configUSE_TRACE_FACILITY 1
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
/* The name of this header file is set by the trace recorder code, but the name
|
||||||
|
of the actual header file is used below. */
|
||||||
|
#include "lpc18xx.h"
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Tracealyzer v2.6.0 Recorder Library
|
* Tracealyzer v2.7.0 Recorder Library
|
||||||
* Percepio AB, www.percepio.com
|
* Percepio AB, www.percepio.com
|
||||||
*
|
*
|
||||||
* trcConfig.h
|
* trcConfig.h
|
||||||
|
@ -36,16 +36,101 @@
|
||||||
* damages, or the exclusion of implied warranties or limitations on how long an
|
* 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.
|
* implied warranty may last, so the above limitations may not apply to you.
|
||||||
*
|
*
|
||||||
* Copyright Percepio AB, 2013.
|
* Tabs are used for indent in this file (1 tab = 4 spaces)
|
||||||
|
*
|
||||||
|
* Copyright Percepio AB, 2014.
|
||||||
* www.percepio.com
|
* www.percepio.com
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#ifndef TRCCONFIG_H
|
#ifndef TRCCONFIG_H
|
||||||
#define TRCCONFIG_H
|
#define TRCCONFIG_H
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* SELECTED_PORT
|
||||||
|
*
|
||||||
|
* 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_ARM_CortexM
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* Macro which should be defined as one of:
|
||||||
|
* - TRACE_STORE_MODE_RING_BUFFER
|
||||||
|
* - TRACE_STORE_MODE_STOP_WHEN_FULL
|
||||||
|
* 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
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* CONFIGURATION RELATED TO CAPACITY AND ALLOCATION
|
* TRACE_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.
|
||||||
|
*
|
||||||
|
* Users of FreeRTOS+Trace Free Edition only displays scheduling events, so this
|
||||||
|
* option can be used to avoid storing unsupported events.
|
||||||
|
*
|
||||||
|
* Default value is 0 (store all enabled events).
|
||||||
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
#define TRACE_SCHEDULING_ONLY 0
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* EVENT_BUFFER_SIZE
|
* EVENT_BUFFER_SIZE
|
||||||
|
@ -53,122 +138,35 @@
|
||||||
* 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. Each registered event typically use one record (4 byte), but
|
* it may store. Most events use one record (4 byte), although some events
|
||||||
* vTracePrintF may use multiple records depending on the number of data args.
|
* 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 EVENT_BUFFER_SIZE 1000
|
||||||
#define EVENT_BUFFER_SIZE 10000 /* Adjust wrt. to available RAM */
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* 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
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* 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. Note that the names of active objects not stored here but in the
|
|
||||||
* Object Table. Thus, if you don't use User Events or delete any kernel
|
|
||||||
* objects you set this to a very low value, e.g. 4, but not zero (0) since
|
|
||||||
* this causes a declaration of a zero-sized array, for which the C compiler
|
|
||||||
* behavior is not standardized and may cause misaligned data.
|
|
||||||
******************************************************************************/
|
|
||||||
#define SYMBOL_TABLE_SIZE 1000
|
|
||||||
|
|
||||||
#if (SYMBOL_TABLE_SIZE == 0)
|
|
||||||
#error "SYMBOL_TABLE_SIZE may not be zero!"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* 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 500
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* 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
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* NTask, NISR, NQueue, NSemaphore, NMutex
|
* NTask, NISR, NQueue, NSemaphore, NMutex
|
||||||
*
|
*
|
||||||
* A group of Macros which should be defined as an integer value of zero (0)
|
* A group of macros which should be defined as integer values, zero or larger.
|
||||||
* or larger.
|
|
||||||
*
|
*
|
||||||
* This defines the capacity of the Object Property Table - the maximum number
|
* These define the capacity of the Object Property Table, i.e., the maximum
|
||||||
* of objects active at any given point within each object class.
|
* number of objects active at any given point, within each object class (e.g.,
|
||||||
|
* task, queue, semaphore, ...).
|
||||||
*
|
*
|
||||||
* NOTE: In case objects are deleted and created during runtime, this setting
|
* If tasks or other other objects are deleted in your system, this
|
||||||
* does not limit the total amount of objects, only the number of concurrently
|
* setting does not limit the total amount of objects created, only the number
|
||||||
* active objects.
|
* of objects that have been successfully created but not yet deleted.
|
||||||
*
|
*
|
||||||
* Using too small values will give an error message through the vTraceError
|
* Using too small values will cause vTraceError to be called, which stores an
|
||||||
* routine, which makes the error message appear when opening the trace data
|
* error message in the trace that is shown when opening the trace file.
|
||||||
* in Tracealyzer. If you are using the recorder status monitor task,
|
|
||||||
* any error messages are displayed in console prints, assuming that the
|
|
||||||
* print macro has been defined properly (vConsolePrintMessage).
|
|
||||||
*
|
*
|
||||||
* It can be wise to start with very large values for these constants,
|
* 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
|
* unless you are very confident on these numbers. Then do a recording and
|
||||||
* check the actual usage in Tracealyzer. This is shown by selecting
|
* check the actual usage by selecting View menu -> Trace Details ->
|
||||||
* View -> Trace Details -> Resource Usage -> Object Table
|
* Resource Usage -> Object Table.
|
||||||
*
|
|
||||||
* NOTE 2: Remember to account for all tasks and other objects created by
|
|
||||||
* the kernel, such as the IDLE task, any timer tasks, and any tasks created
|
|
||||||
* by other 3rd party software components, such as communication stacks.
|
|
||||||
* Moreover, one task slot is used to indicate "(startup)", i.e., a fictive
|
|
||||||
* task that represent the time before the scheduler starts.
|
|
||||||
* NTask should thus be at least 2-3 slots larger than your application task count.
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define NTask 15
|
#define NTask 15
|
||||||
#define NISR 4
|
#define NISR 4
|
||||||
|
@ -178,39 +176,142 @@
|
||||||
#define NTimer 10
|
#define NTimer 10
|
||||||
#define NEventGroup 1
|
#define NEventGroup 1
|
||||||
|
|
||||||
/* Maximum object name length for each class (includes zero termination) */
|
/******************************************************************************
|
||||||
#define NameLenTask configMAX_TASK_NAME_LEN
|
* INCLUDE_MEMMANG_EVENTS
|
||||||
#define NameLenISR 10
|
*
|
||||||
|
* 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 to
|
||||||
|
* exclude malloc/free calls, or one (1) to include such events in the trace.
|
||||||
|
*
|
||||||
|
* Default value is 1.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define INCLUDE_MEMMANG_EVENTS 1
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* 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 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.
|
||||||
|
*
|
||||||
|
* Note that User Events are only displayed in Professional Edition.
|
||||||
|
*****************************************************************************/
|
||||||
|
#define INCLUDE_USER_EVENTS 0
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* 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 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 0
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* 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
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* 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 NameLenQueue 15
|
||||||
#define NameLenSemaphore 15
|
#define NameLenSemaphore 15
|
||||||
#define NameLenMutex 15
|
#define NameLenMutex 15
|
||||||
#define NameLenTimer 15
|
#define NameLenTimer 15
|
||||||
#define NameLenEventGroup 15
|
#define NameLenEventGroup 15
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* TRACE_DESCRIPTION
|
|
||||||
*
|
|
||||||
* Macro which should be defined as a string.
|
|
||||||
*
|
|
||||||
* This string is stored in the trace and displayed in Tracealyzer. Can be
|
|
||||||
* used to store, e.g., system version or build date. This is also used to store
|
|
||||||
* internal error messages from the recorder, which if occurs overwrites the
|
|
||||||
* value defined here. This may be maximum 256 chars.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define TRACE_DESCRIPTION "FreeRTOS+Trace Demo"
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* TRACE_DESCRIPTION_MAX_LENGTH
|
|
||||||
*
|
|
||||||
* The maximum length (including zero termination) for the TRACE_DESCRIPTION
|
|
||||||
* string. Since this string also is used for internal error messages from the
|
|
||||||
* recorder do not make it too short, as this may truncate the error messages.
|
|
||||||
* Default is 80.
|
|
||||||
* Maximum allowed length is 256 - the trace will fail to load if longer.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define TRACE_DESCRIPTION_MAX_LENGTH 80
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* TRACE_DATA_ALLOCATION
|
* TRACE_DATA_ALLOCATION
|
||||||
*
|
*
|
||||||
|
@ -227,177 +328,49 @@
|
||||||
*
|
*
|
||||||
* Using dynamic allocation may give more flexibility in some cases.
|
* Using dynamic allocation may give more flexibility in some cases.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#define TRACE_DATA_ALLOCATION TRACE_DATA_ALLOCATION_STATIC
|
#define TRACE_DATA_ALLOCATION TRACE_DATA_ALLOCATION_STATIC
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* CONFIGURATION REGARDING WHAT CODE/FEATURES TO INCLUDE
|
*** 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.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* USE_TRACE_ASSERT
|
* HEAP_SIZE_BELOW_16M
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* An integer constant that can be used to reduce the buffer usage of memory
|
||||||
* Default is 0.
|
* 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
|
||||||
* If this is one (1), the TRACE_ASSERT macro will verify that a condition is
|
* lower 24 bits only. If 0, you get the full 32-bit addresses.
|
||||||
* true. If the condition is false, vTraceError() will be called.
|
*
|
||||||
*****************************************************************************/
|
* Default value is 0.
|
||||||
#define USE_TRACE_ASSERT 1
|
******************************************************************************/
|
||||||
|
#define HEAP_SIZE_BELOW_16M 0
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* INCLUDE_FLOAT_SUPPORT
|
* USE_LINKER_PRAGMA
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* Macro which should be defined as an integer value, default is 0.
|
||||||
* Default is 1.
|
|
||||||
*
|
*
|
||||||
* If this is zero (0), all references to floating point values are removed,
|
* If this is 1, the header file "recorderdata_linker_pragma.h" is included just
|
||||||
* in case floating point values are not supported by the platform used.
|
* before the declaration of RecorderData (in trcBase.c), i.e., the trace data
|
||||||
* Floating point values are only used in vTracePrintF and its subroutines, to
|
* structure. This allows the user to specify a pragma with linker options.
|
||||||
* store float (%f) or double (%lf) argments.
|
|
||||||
*
|
*
|
||||||
* Note: vTracePrintF can still be used with integer and string arguments in
|
* Example (for IAR Embedded Workbench and NXP LPC17xx):
|
||||||
* either case.
|
* #pragma location="AHB_RAM_MEMORY"
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_FLOAT_SUPPORT 0
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* INCLUDE_USER_EVENTS
|
|
||||||
*
|
*
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
* This example instructs the IAR linker to place RecorderData in another RAM
|
||||||
* Default is 1.
|
* bank, the AHB RAM. This can also be used for other compilers with a similar
|
||||||
|
* pragmas for linker options.
|
||||||
*
|
*
|
||||||
* If this is zero (0) the code for creating User Events is excluded to
|
* Note that this only applies if using static allocation, see below.
|
||||||
* reduce code size. User Events are application-generated events, like
|
******************************************************************************/
|
||||||
* "printf" but for the trace log instead of console output. User Events are
|
#define USE_LINKER_PRAGMA 0
|
||||||
* much faster than a printf and can therefore be used in timing critical code.
|
|
||||||
* See vTraceUserEvent() and vTracePrintF() in trcUser.h
|
|
||||||
*
|
|
||||||
* Note that User Events are not displayed in FreeRTOS+Trace Free Edition.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_USER_EVENTS 1
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* INCLUDE_READY_EVENTS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 1.
|
|
||||||
*
|
|
||||||
* If this is zero (0), the code for recording Ready events is
|
|
||||||
* excluded. Note, this will make it impossible to calculate the correct
|
|
||||||
* response times.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_READY_EVENTS 1
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* INCLUDE_NEW_TIME_EVENTS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 0.
|
|
||||||
*
|
|
||||||
* If this is zero (1), events will be generated whenever the os clock is
|
|
||||||
* increased.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_NEW_TIME_EVENTS 0
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* INCLUDE_ISR_TRACING
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 1.
|
|
||||||
*
|
|
||||||
* If this is zero (0), the code for recording Interrupt Service Routines is
|
|
||||||
* excluded to reduce code size.
|
|
||||||
*
|
|
||||||
* 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_OBJECT_DELETE
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 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.
|
|
||||||
*****************************************************************************/
|
|
||||||
#ifdef INCLUDE_OBJECT_DELETE
|
|
||||||
#undef INCLUDE_OBJECT_DELETE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define INCLUDE_OBJECT_DELETE 1
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* INCLUDE_MEMMANG_EVENTS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as either zero (0) or one (1).
|
|
||||||
* Default is 1.
|
|
||||||
*
|
|
||||||
* This controls if malloc and free calls should be traced. Set this to zero to
|
|
||||||
* exclude malloc/free calls from the tracing.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define INCLUDE_MEMMANG_EVENTS 0
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* CONFIGURATION RELATED TO BEHAVIOR
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* TRACE_RECORDER_STORE_MODE
|
|
||||||
*
|
|
||||||
* Macro which should be defined as one of:
|
|
||||||
* - TRACE_STORE_MODE_RING_BUFFER
|
|
||||||
* - TRACE_STORE_MODE_STOP_WHEN_FULL
|
|
||||||
* 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 a large trace buffer
|
|
||||||
* for string the whole run since startup. In this mode, the recorder can run
|
|
||||||
* "forever" as the buffer never gets full, i.e., in the sense that it always
|
|
||||||
* has room for more events.
|
|
||||||
*
|
|
||||||
* To fetch the trace in mode TRACE_STORE_MODE_RING_BUFFER, you need to first halt the
|
|
||||||
* system using your debugger and then do a RAM dump, or to explicitly stop the
|
|
||||||
* recorder using vTraceStop() and then store/upload the trace data using a
|
|
||||||
* task that you need to provide yourself. The trace data is found in the struct
|
|
||||||
* RecorderData, initialized in trcBase.c.
|
|
||||||
*
|
|
||||||
* Note that, if you upload the trace using a RAM dump, i.e., when the system is
|
|
||||||
* halted on a breakpoint or by a debugger command, there is no need to stop the
|
|
||||||
* recorder first.
|
|
||||||
*
|
|
||||||
* When TRACE_RECORDER_STORE_MODE is TRACE_STORE_MODE_STOP_WHEN_FULL, the recording is
|
|
||||||
* stopped when the buffer becomes full. When the recorder stops itself this way
|
|
||||||
* vTracePortEnd() is called which allows for custom actions, such as triggering
|
|
||||||
* a task that stores the trace buffer, i.e., in case taking a RAM dump
|
|
||||||
* using an on-chip debugger is not possible. In the Windows port, vTracePortEnd
|
|
||||||
* saves the trace to file directly, but this is not recommended in a real-time
|
|
||||||
* system since the scheduler is blocked during the processing of vTracePortEnd.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
#define TRACE_RECORDER_STORE_MODE TRACE_STORE_MODE_RING_BUFFER
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* STOP_AFTER_N_EVENTS
|
|
||||||
*
|
|
||||||
* Macro which should be defined as an integer value, or not defined.
|
|
||||||
* Default is -1
|
|
||||||
*
|
|
||||||
* STOP_AFTER_N_EVENTS is intended for tests of the ring buffer mode (when
|
|
||||||
* RECORDER_STORE_MODE is STORE_MODE_RING_BUFFER). It stops the recording when
|
|
||||||
* the specified number of events has been observed. This value can be larger
|
|
||||||
* than the buffer size, to allow for test of the "wrapping around" that occurs
|
|
||||||
* in ring buffer mode . A negative value (or no definition of this macro)
|
|
||||||
* disables this feature.
|
|
||||||
*****************************************************************************/
|
|
||||||
#define STOP_AFTER_N_EVENTS -1
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* USE_IMPLICIT_IFE_RULES
|
* USE_IMPLICIT_IFE_RULES
|
||||||
|
@ -405,56 +378,26 @@
|
||||||
* 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.
|
||||||
*
|
*
|
||||||
* ### Instance Finish Events (IFE) ###
|
* 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).
|
||||||
*
|
*
|
||||||
* For tasks with "infinite" main loops (non-terminating tasks), the concept
|
* If USE_IMPLICIT_IFE_RULES is one (1), the default IFEs will be enabled, which
|
||||||
* of a task instance has no clear definition, it is an application-specific
|
* gives a "typical" grouping of events into instances. You can combine this
|
||||||
* thing. Tracealyzer allows you to define Instance Finish Events (IFEs),
|
* with calls to vTraceTaskInstanceFinish for specific tasks.
|
||||||
* which marks the point in a cyclic task when the "task instance" ends.
|
|
||||||
* The IFE is a blocking kernel call, typically in the main loop of a task
|
|
||||||
* which typically reads a message queue, waits for a semaphore or performs
|
|
||||||
* an explicit delay.
|
|
||||||
*
|
*
|
||||||
* If USE_IMPLICIT_IFE_RULES is one (1), the kernel macros (trcKernelPort.h)
|
* If USE_IMPLICIT_IFE_RULES is zero (0), the implicit IFEs are disabled and all
|
||||||
* will define what kernel calls are considered by default to be IFEs.
|
* events withing each task is then shown as a single instance, unless you call
|
||||||
*
|
* vTraceTaskInstanceFinish() at suitable locations to mark the IFEs.
|
||||||
* However, Implicit IFEs only applies to blocking kernel calls. If a
|
|
||||||
* service reads a message without blocking, it does not create a new
|
|
||||||
* instance since no blocking occurred.
|
|
||||||
*
|
|
||||||
* Moreover, the actual IFE might sometimes be another blocking call. We
|
|
||||||
* therefore allow for user-defined Explicit IFEs by calling
|
|
||||||
*
|
|
||||||
* vTraceTaskInstanceIsFinished()
|
|
||||||
*
|
|
||||||
* right before the kernel call considered as IFE. This does not create an
|
|
||||||
* additional event but instead stores the service code and object handle
|
|
||||||
* of the IFE call as properties of the task.
|
|
||||||
*
|
|
||||||
* If using Explicit IFEs and the task also calls an Implicit IFE, this may
|
|
||||||
* result in additional incorrect task instances.
|
|
||||||
* This is solved by disabling the Implicit IFEs for the task, by adding
|
|
||||||
* a call to
|
|
||||||
*
|
|
||||||
* vTraceTaskSkipDefaultInstanceFinishedEvents()
|
|
||||||
*
|
|
||||||
* in the very beginning of that task. This allows you to combine Explicit IFEs
|
|
||||||
* for some tasks with Implicit IFEs for the rest of the tasks, if
|
|
||||||
* USE_IMPLICIT_IFE_RULES is 1.
|
|
||||||
*
|
|
||||||
* By setting USE_IMPLICIT_IFE_RULES to zero (0), the implicit IFEs are disabled
|
|
||||||
* for all tasks. Tasks will then be considered to have a single instance only,
|
|
||||||
* covering all execution fragments, unless you define an explicit IFE in each
|
|
||||||
* task by calling vTraceTaskInstanceIsFinished before the blocking call.
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define USE_IMPLICIT_IFE_RULES 1
|
#define USE_IMPLICIT_IFE_RULES 1
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* USE_16BIT_OBJECT_HANDLES
|
* USE_16BIT_OBJECT_HANDLES
|
||||||
*
|
*
|
||||||
* 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 0.
|
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -466,69 +409,67 @@
|
||||||
* object property table is limited to 64 KB, the practical limit is about
|
* object property table is limited to 64 KB, the practical limit is about
|
||||||
* 3000 objects in total.
|
* 3000 objects in total.
|
||||||
*
|
*
|
||||||
* NOTE: An object with a high ID (> 255) will generate an extra event
|
* Default is 0.
|
||||||
* (= 4 byte) in the event buffer.
|
|
||||||
*
|
*
|
||||||
* NOTE: Some internal tables in the recorder gets larger when using 16-bit
|
* NOTE: An object with handle above 255 will use an extra 4-byte record in
|
||||||
* handles. The additional RAM usage is 5-10 byte plus 1 byte per kernel object
|
* the event buffer whenever referenced. Moreover, some internal tables in the
|
||||||
*, i.e., task, queue, semaphore, mutex, etc.
|
* 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
|
#define USE_16BIT_OBJECT_HANDLES 0
|
||||||
|
|
||||||
/****** Port Name ******************** Code ** Official ** OS Platform ******
|
|
||||||
* PORT_APPLICATION_DEFINED -2 - -
|
|
||||||
* PORT_NOT_SET -1 - -
|
|
||||||
* PORT_HWIndependent 0 Yes Any
|
|
||||||
* PORT_Win32 1 Yes FreeRTOS 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_PIC32 9 No 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
|
|
||||||
*****************************************************************************/
|
|
||||||
#define SELECTED_PORT PORT_ARM_CortexM
|
|
||||||
|
|
||||||
#if (SELECTED_PORT == PORT_NOT_SET)
|
|
||||||
#error "You need to define SELECTED_PORT here!"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* USE_PRIMASK_CS (for Cortex M devices only)
|
* USE_TRACE_ASSERT
|
||||||
*
|
|
||||||
* An integer constant that selects between two options for the critical
|
|
||||||
* sections of the recorder library.
|
|
||||||
*
|
*
|
||||||
* 0: The default FreeRTOS critical section (BASEPRI) - default setting
|
* Macro which should be defined as either zero (0) or one (1).
|
||||||
* 1: Always disable ALL interrupts (using PRIMASK)
|
* Default is 1.
|
||||||
*
|
*
|
||||||
* Option 0 uses the standard FreeRTOS macros for critical sections.
|
* If this is one (1), the TRACE_ASSERT macro will verify that a condition is
|
||||||
* However, on Cortex-M devices they only disable interrupts with priorities
|
* true. If the condition is false, vTraceError() will be called.
|
||||||
* below a certain configurable level, while higher priority ISRs remain active.
|
* This is used on several places in the recorder code for sanity checks on
|
||||||
* Such high-priority ISRs may not use the recorder functions in this mode.
|
* parameters. Can be switched off to reduce CPU usage of the tracing.
|
||||||
*
|
*****************************************************************************/
|
||||||
* Option 1 allows you to safely call the recorder from any ISR, independent of
|
#define USE_TRACE_ASSERT 1
|
||||||
* the interrupt priority. This mode may however cause higher IRQ latencies
|
|
||||||
* (some microseconds) since ALL configurable interrupts are disabled during
|
/*******************************************************************************
|
||||||
* the recorder's critical sections in this mode, using the PRIMASK register.
|
* 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_PRIMASK_CS 0
|
#define USE_SEPARATE_USER_EVENT_BUFFER 0
|
||||||
|
|
||||||
/******************************************************************************
|
/*******************************************************************************
|
||||||
* HEAP_SIZE_BELOW_16M
|
* USER_EVENT_BUFFER_SIZE
|
||||||
*
|
*
|
||||||
* An integer constant that can be used to reduce the buffer usage of memory
|
* Macro which should be defined as an integer value.
|
||||||
* 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 addresses truncated to the
|
* This defines the capacity of the user event buffer, in number of slots.
|
||||||
* lower 24 bit. Otherwise set it to 0 to get the full 32-bit addresses.
|
* A single user event can use between 1 and X slots, depending on the data.
|
||||||
******************************************************************************/
|
*
|
||||||
#define HEAP_SIZE_BELOW_16M 0
|
* 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
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-2135181506" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-726532912" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<Windows>
|
<Windows>
|
||||||
|
|
||||||
|
|
||||||
<Wnd0>
|
<Wnd2>
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<Tab>
|
<Tab>
|
||||||
<Identity>TabID-29494-21985</Identity>
|
<Identity>TabID-29494-21985</Identity>
|
||||||
|
@ -33,11 +33,11 @@
|
||||||
<Factory>Workspace</Factory>
|
<Factory>Workspace</Factory>
|
||||||
<Session>
|
<Session>
|
||||||
|
|
||||||
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode></NodeDict></Session>
|
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS_Source</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS_Source/port.c</ExpandedNode></NodeDict></Session>
|
||||||
</Tab>
|
</Tab>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
<SelectedTab>0</SelectedTab></Wnd0><Wnd1>
|
<SelectedTab>0</SelectedTab></Wnd2><Wnd3>
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<Tab>
|
<Tab>
|
||||||
<Identity>TabID-28344-23030</Identity>
|
<Identity>TabID-28344-23030</Identity>
|
||||||
|
@ -47,20 +47,20 @@
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab><Identity>TabID-19430-2343</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>
|
<Tab><Identity>TabID-19430-2343</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>
|
||||||
|
|
||||||
<SelectedTab>0</SelectedTab></Wnd1></Windows>
|
<SelectedTab>0</SelectedTab></Wnd3></Windows>
|
||||||
<Editor>
|
<Editor>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>64</YPos2><SelStart2>5909</SelStart2><SelEnd2>5909</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_full.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>62</YPos2><SelStart2>8654</SelStart2><SelEnd2>8654</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_blinky.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>63</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>64</YPos2><SelStart2>5909</SelStart2><SelEnd2>5909</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_full.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>62</YPos2><SelStart2>8654</SelStart2><SelEnd2>8654</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_blinky.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>63</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\ARM_CM4F\portmacro.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>132</YPos2><SelStart2>4892</SelStart2><SelEnd2>4892</SelEnd2></Tab><ActiveTab>3</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>1492</YPos2><SelStart2>53848</SelStart2><SelEnd2>53881</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||||
<Positions>
|
<Positions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Top><Row0><Sizes><Toolbar-013BA698><key>iaridepm.enu1</key></Toolbar-013BA698></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>389</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>232738</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
<Top><Row0><Sizes><Toolbar-002A6A90><key>iaridepm.enu1</key></Toolbar-002A6A90></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>742</Bottom><Right>389</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>232738</sizeVertCX><sizeVertCY>756098</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203252</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||||
</Desktop>
|
</Desktop>
|
||||||
</Workspace>
|
</Workspace>
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,9 @@ static uint32_t ulTimerNotificationsReceived = 0UL, ulTimerNotificationsSent = 0
|
||||||
/* The timer used to notify the task. */
|
/* The timer used to notify the task. */
|
||||||
static TimerHandle_t xTimer = NULL;
|
static TimerHandle_t xTimer = NULL;
|
||||||
|
|
||||||
|
/* Used by the pseudo random number generating function. */
|
||||||
|
static uint32_t ulNextRand = 0;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vStartTaskNotifyTask( void )
|
void vStartTaskNotifyTask( void )
|
||||||
|
@ -130,6 +133,9 @@ void vStartTaskNotifyTask( void )
|
||||||
/* Create the task that performs some tests by itself, then loops around
|
/* Create the task that performs some tests by itself, then loops around
|
||||||
being notified by both a software timer and an interrupt. */
|
being notified by both a software timer and an interrupt. */
|
||||||
xTaskCreate( prvNotifiedTask, "Notified", configMINIMAL_STACK_SIZE, NULL, notifyTASK_PRIORITY, &xTaskToNotify );
|
xTaskCreate( prvNotifiedTask, "Notified", configMINIMAL_STACK_SIZE, NULL, notifyTASK_PRIORITY, &xTaskToNotify );
|
||||||
|
|
||||||
|
/* Pseudo seed the random number generator. */
|
||||||
|
ulNextRand = ( uint32_t ) prvRand;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -349,9 +355,9 @@ const uint32_t ulBit0 = 0x01UL, ulBit1 = 0x02UL;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
static void prvNotifyingTimer( TimerHandle_t xTimer )
|
static void prvNotifyingTimer( TimerHandle_t xNotUsed )
|
||||||
{
|
{
|
||||||
( void ) xTimer;
|
( void ) xNotUsed;
|
||||||
|
|
||||||
xTaskNotifyGive( xTaskToNotify );
|
xTaskNotifyGive( xTaskToNotify );
|
||||||
|
|
||||||
|
@ -494,9 +500,7 @@ const uint32_t ulMaxSendReceiveDeviation = 5UL;
|
||||||
|
|
||||||
static UBaseType_t prvRand( void )
|
static UBaseType_t prvRand( void )
|
||||||
{
|
{
|
||||||
static uint32_t ulNextRand = ( uint32_t ) prvRand;
|
const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL;
|
||||||
|
|
||||||
const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL;
|
|
||||||
|
|
||||||
/* Utility function to generate a pseudo random number. */
|
/* Utility function to generate a pseudo random number. */
|
||||||
ulNextRand = ( ulMultiplier * ulNextRand ) + ulIncrement;
|
ulNextRand = ( ulMultiplier * ulNextRand ) + ulIncrement;
|
||||||
|
|
|
@ -3,5 +3,5 @@ VERSION=v14.01
|
||||||
TC_INSTALL=C:\devtools\KPIT\GNURXv14.01-ELF\rx-ELF\rx-ELF\
|
TC_INSTALL=C:\devtools\KPIT\GNURXv14.01-ELF\rx-ELF\rx-ELF\
|
||||||
GCC_STRING=4.7-GNURX_v14.01
|
GCC_STRING=4.7-GNURX_v14.01
|
||||||
VERSION_IDE=
|
VERSION_IDE=
|
||||||
|
E2STUDIO_VERSION=3.1.2.09
|
||||||
ACTIVE_CONFIGURATION=HardwareDebug
|
ACTIVE_CONFIGURATION=HardwareDebug
|
||||||
E2STUDIO_VERSION=3.0.1.09
|
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
<configuration id="%com.renesas.cdt.rx.hardwaredebug.win32.configuration.Id.606469687" name="HardwareDebug">
|
<configuration id="%com.renesas.cdt.rx.hardwaredebug.win32.configuration.Id.606469687" name="HardwareDebug">
|
||||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
<provider class="com.renesas.cdt.common.build.spec.RXGCCBuiltinSpecsDetector" console="false" env-hash="879191947459214602" id="RXGCCBuiltinSpecsDetector" keep-relative-paths="false" name="Renesas GCCBuildinCompilerSettings" options-hash="1142094570" parameter="rx-elf-gcc -E -P -v -dD ${INPUTS}" prefer-non-shared="true">
|
||||||
<provider class="com.renesas.cdt.common.build.spec.RXGCCBuiltinSpecsDetector" console="false" env-hash="982537399514949188" id="RXGCCBuiltinSpecsDetector" keep-relative-paths="false" name="Renesas GCCBuildinCompilerSettings" options-hash="1142094570" parameter="rx-elf-gcc -E -P -v -dD ${INPUTS} -mcpu=rx600 -mlittle-endian-data" prefer-non-shared="true">
|
|
||||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
</provider>
|
</provider>
|
||||||
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
</extension>
|
</extension>
|
||||||
</configuration>
|
</configuration>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -396,6 +396,8 @@ void *pvAllocated;
|
||||||
/* Called by vApplicationTickHook(), which is defined in main.c. */
|
/* Called by vApplicationTickHook(), which is defined in main.c. */
|
||||||
void vFullDemoTickHookFunction( void )
|
void vFullDemoTickHookFunction( void )
|
||||||
{
|
{
|
||||||
|
TaskHandle_t xTimerTask;
|
||||||
|
|
||||||
/* Call the periodic timer test, which tests the timer API functions that
|
/* Call the periodic timer test, which tests the timer API functions that
|
||||||
can be called from an ISR. */
|
can be called from an ISR. */
|
||||||
#if( configUSE_PREEMPTION != 0 )
|
#if( configUSE_PREEMPTION != 0 )
|
||||||
|
@ -420,6 +422,10 @@ void vFullDemoTickHookFunction( void )
|
||||||
|
|
||||||
/* Exercise using task notifications from an interrupt. */
|
/* Exercise using task notifications from an interrupt. */
|
||||||
xNotifyTaskFromISR();
|
xNotifyTaskFromISR();
|
||||||
|
|
||||||
|
/* For code coverage purposes. */
|
||||||
|
xTimerTask = xTimerGetTimerDaemonTaskHandle();
|
||||||
|
configASSERT( uxTaskPriorityGetFromISR( xTimerTask ) == configTIMER_TASK_PRIORITY );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -727,6 +727,27 @@ extern "C" {
|
||||||
#define configUSE_TASK_NOTIFICATIONS 1
|
#define configUSE_TASK_NOTIFICATIONS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef portTICK_TYPE_IS_ATOMIC
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if( portTICK_TYPE_IS_ATOMIC == 0 )
|
||||||
|
/* Either variables of tick type cannot be read atomically, or
|
||||||
|
portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
|
||||||
|
the tick count is returned to the standard critical section macros. */
|
||||||
|
#define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()
|
||||||
|
#define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()
|
||||||
|
#define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
|
||||||
|
#define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )
|
||||||
|
#else
|
||||||
|
/* The tick type can be read atomically, so critical sections used when the
|
||||||
|
tick count is returned can be defined away. */
|
||||||
|
#define portTICK_TYPE_ENTER_CRITICAL()
|
||||||
|
#define portTICK_TYPE_EXIT_CRITICAL()
|
||||||
|
#define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
|
||||||
|
#define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Definitions to allow backward compatibility with FreeRTOS versions prior to
|
/* Definitions to allow backward compatibility with FreeRTOS versions prior to
|
||||||
V8 if desired. */
|
V8 if desired. */
|
||||||
#ifndef configENABLE_BACKWARD_COMPATIBILITY
|
#ifndef configENABLE_BACKWARD_COMPATIBILITY
|
||||||
|
|
|
@ -655,6 +655,14 @@ void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xT
|
||||||
*/
|
*/
|
||||||
UBaseType_t uxTaskPriorityGet( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
|
UBaseType_t uxTaskPriorityGet( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* task. h
|
||||||
|
* <pre>UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask );</pre>
|
||||||
|
*
|
||||||
|
* A version of uxTaskPriorityGet() that can be used from an ISR.
|
||||||
|
*/
|
||||||
|
UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* task. h
|
* task. h
|
||||||
* <pre>eTaskState eTaskGetState( TaskHandle_t xTask );</pre>
|
* <pre>eTaskState eTaskGetState( TaskHandle_t xTask );</pre>
|
||||||
|
|
|
@ -95,6 +95,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY (TickType_t) 0xFFFFFFFFF
|
#define portMAX_DELAY (TickType_t) 0xFFFFFFFFF
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,10 @@ typedef unsigned long UBaseType_t;
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
|
|
|
@ -100,6 +100,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,10 @@
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
|
|
|
@ -101,6 +101,10 @@
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
|
|
|
@ -101,6 +101,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY 0xffffffffUL
|
#define portMAX_DELAY 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -110,11 +114,19 @@ typedef unsigned long UBaseType_t;
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Scheduler utilities. */
|
/* Scheduler utilities. */
|
||||||
|
#define portYIELD() \
|
||||||
|
{ \
|
||||||
|
/* Set a PendSV to request a context switch. */ \
|
||||||
|
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; \
|
||||||
|
__DSB(); \
|
||||||
|
__ISB(); \
|
||||||
|
}
|
||||||
|
|
||||||
#define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) )
|
#define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) )
|
||||||
#define portNVIC_PENDSVSET_BIT ( 1UL << 28UL )
|
#define portNVIC_PENDSVSET_BIT ( 1UL << 28UL )
|
||||||
#define portYIELD() vPortYield()
|
#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD()
|
||||||
#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) vPortYield()
|
|
||||||
#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
|
#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Architecture specific optimisations. */
|
/* Architecture specific optimisations. */
|
||||||
|
@ -145,12 +157,19 @@ typedef unsigned long UBaseType_t;
|
||||||
extern void vPortEnterCritical( void );
|
extern void vPortEnterCritical( void );
|
||||||
extern void vPortExitCritical( void );
|
extern void vPortExitCritical( void );
|
||||||
|
|
||||||
#define portDISABLE_INTERRUPTS() ulPortRaiseBASEPRI()
|
#define portDISABLE_INTERRUPTS() \
|
||||||
#define portENABLE_INTERRUPTS() vPortSetBASEPRI( 0 )
|
{ \
|
||||||
|
/* Work around. */ \
|
||||||
|
__set_BASEPRI( configMAX_SYSCALL_INTERRUPT_PRIORITY ); \
|
||||||
|
__DSB(); \
|
||||||
|
__ISB(); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define portENABLE_INTERRUPTS() __set_BASEPRI( 0 )
|
||||||
#define portENTER_CRITICAL() vPortEnterCritical()
|
#define portENTER_CRITICAL() vPortEnterCritical()
|
||||||
#define portEXIT_CRITICAL() vPortExitCritical()
|
#define portEXIT_CRITICAL() vPortExitCritical()
|
||||||
#define portSET_INTERRUPT_MASK_FROM_ISR() ulPortRaiseBASEPRI()
|
#define portSET_INTERRUPT_MASK_FROM_ISR() __get_BASEPRI(); portDISABLE_INTERRUPTS()
|
||||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortSetBASEPRI( x )
|
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) __set_BASEPRI( x )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Tickless idle/low power functionality. */
|
/* Tickless idle/low power functionality. */
|
||||||
|
@ -176,49 +195,6 @@ not necessary for to use this port. They are defined so the common demo files
|
||||||
/* portNOP() is not required by this port. */
|
/* portNOP() is not required by this port. */
|
||||||
#define portNOP()
|
#define portNOP()
|
||||||
|
|
||||||
#ifndef portFORCE_INLINE
|
|
||||||
#define portFORCE_INLINE _Pragma("inline=forced")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
portFORCE_INLINE static void vPortYield( void )
|
|
||||||
{
|
|
||||||
/* Set a PendSV to request a context switch. */
|
|
||||||
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
|
|
||||||
|
|
||||||
/* Barriers are normally not required but do ensure the code is completely
|
|
||||||
within the specified behaviour for the architecture. */
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
portFORCE_INLINE static uint32_t ulPortRaiseBASEPRI( void )
|
|
||||||
{
|
|
||||||
uint32_t ulOriginalBASEPRI;
|
|
||||||
|
|
||||||
__asm volatile
|
|
||||||
(
|
|
||||||
" mrs %0, basepri \n" \
|
|
||||||
" mov r1, %1 \n" \
|
|
||||||
" msr basepri, r1 \n" \
|
|
||||||
" isb \n" \
|
|
||||||
" dsb \n" \
|
|
||||||
:"=r" (ulOriginalBASEPRI) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) : "r1"
|
|
||||||
);
|
|
||||||
|
|
||||||
/* This return will not be reached but is necessary to prevent compiler
|
|
||||||
warnings. */
|
|
||||||
return ulOriginalBASEPRI;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue )
|
|
||||||
{
|
|
||||||
__asm volatile
|
|
||||||
(
|
|
||||||
" msr basepri, %0 " :: "r" ( ulNewMaskValue )
|
|
||||||
);
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Suppress warnings that are generated by the IAR tools, but cannot be fixed in
|
/* Suppress warnings that are generated by the IAR tools, but cannot be fixed in
|
||||||
|
|
|
@ -107,6 +107,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
|
|
|
@ -100,6 +100,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,10 @@ typedef unsigned long UBaseType_t;
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
|
|
||||||
|
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||||
|
not need to be guarded with a critical section. */
|
||||||
|
#define portTICK_TYPE_IS_ATOMIC 1
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -1080,8 +1080,8 @@ TCB_t * pxNewTCB;
|
||||||
|
|
||||||
uxSavedInterruptState = portSET_INTERRUPT_MASK_FROM_ISR();
|
uxSavedInterruptState = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
/* If null is passed in here then we are changing the
|
/* If null is passed in here then it is the priority of the calling
|
||||||
priority of the calling function. */
|
task that is being queried. */
|
||||||
pxTCB = prvGetTCBFromHandle( xTask );
|
pxTCB = prvGetTCBFromHandle( xTask );
|
||||||
uxReturn = pxTCB->uxPriority;
|
uxReturn = pxTCB->uxPriority;
|
||||||
}
|
}
|
||||||
|
@ -1743,11 +1743,11 @@ TickType_t xTaskGetTickCount( void )
|
||||||
TickType_t xTicks;
|
TickType_t xTicks;
|
||||||
|
|
||||||
/* Critical section required if running on a 16 bit processor. */
|
/* Critical section required if running on a 16 bit processor. */
|
||||||
taskENTER_CRITICAL();
|
portTICK_TYPE_ENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
xTicks = xTickCount;
|
xTicks = xTickCount;
|
||||||
}
|
}
|
||||||
taskEXIT_CRITICAL();
|
portTICK_TYPE_EXIT_CRITICAL();
|
||||||
|
|
||||||
return xTicks;
|
return xTicks;
|
||||||
}
|
}
|
||||||
|
@ -1774,11 +1774,11 @@ UBaseType_t uxSavedInterruptStatus;
|
||||||
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
uxSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
xReturn = xTickCount;
|
xReturn = xTickCount;
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
@ -3510,7 +3510,7 @@ TCB_t *pxTCB;
|
||||||
|
|
||||||
/* Pad the end of the string with spaces to ensure columns line up when
|
/* Pad the end of the string with spaces to ensure columns line up when
|
||||||
printed out. */
|
printed out. */
|
||||||
for( x = strlen( pcBuffer ); x < configMAX_TASK_NAME_LEN; x++ )
|
for( x = strlen( pcBuffer ); x < ( configMAX_TASK_NAME_LEN - 1 ); x++ )
|
||||||
{
|
{
|
||||||
pcBuffer[ x ] = ' ';
|
pcBuffer[ x ] = ' ';
|
||||||
}
|
}
|
||||||
|
@ -3685,13 +3685,13 @@ TCB_t *pxTCB;
|
||||||
ulTotalRunTimeDiv100 has already been divided by 100. */
|
ulTotalRunTimeDiv100 has already been divided by 100. */
|
||||||
ulStatsAsPercentage = pxTaskStatusArray[ x ].ulRunTimeCounter / ulTotalTime;
|
ulStatsAsPercentage = pxTaskStatusArray[ x ].ulRunTimeCounter / ulTotalTime;
|
||||||
|
|
||||||
if( ulStatsAsPercentage > 0UL )
|
|
||||||
{
|
|
||||||
/* Write the task name to the string, padding with
|
/* Write the task name to the string, padding with
|
||||||
spaces so it can be printed in tabular form more
|
spaces so it can be printed in tabular form more
|
||||||
easily. */
|
easily. */
|
||||||
pcWriteBuffer = prvWriteNameToBuffer( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName );
|
pcWriteBuffer = prvWriteNameToBuffer( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName );
|
||||||
|
|
||||||
|
if( ulStatsAsPercentage > 0UL )
|
||||||
|
{
|
||||||
#ifdef portLU_PRINTF_SPECIFIER_REQUIRED
|
#ifdef portLU_PRINTF_SPECIFIER_REQUIRED
|
||||||
{
|
{
|
||||||
sprintf( pcWriteBuffer, "\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].ulRunTimeCounter, ulStatsAsPercentage );
|
sprintf( pcWriteBuffer, "\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].ulRunTimeCounter, ulStatsAsPercentage );
|
||||||
|
@ -3710,13 +3710,13 @@ TCB_t *pxTCB;
|
||||||
consumed less than 1% of the total run time. */
|
consumed less than 1% of the total run time. */
|
||||||
#ifdef portLU_PRINTF_SPECIFIER_REQUIRED
|
#ifdef portLU_PRINTF_SPECIFIER_REQUIRED
|
||||||
{
|
{
|
||||||
sprintf( pcWriteBuffer, "%s\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter );
|
sprintf( pcWriteBuffer, "\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter );
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
/* sizeof( int ) == sizeof( long ) so a smaller
|
/* sizeof( int ) == sizeof( long ) so a smaller
|
||||||
printf() library can be used. */
|
printf() library can be used. */
|
||||||
sprintf( pcWriteBuffer, "%s\t\t%u\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, ( unsigned int ) pxTaskStatusArray[ x ].ulRunTimeCounter );
|
sprintf( pcWriteBuffer, "\t\t%u\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, ( unsigned int ) pxTaskStatusArray[ x ].ulRunTimeCounter );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -468,10 +468,10 @@ BaseType_t xTimerListsWereSwitched;
|
||||||
|
|
||||||
if( xTaskResumeAll() == pdFALSE )
|
if( xTaskResumeAll() == pdFALSE )
|
||||||
{
|
{
|
||||||
/* Yield to wait for either a command to arrive, or the block time
|
/* Yield to wait for either a command to arrive, or the
|
||||||
to expire. If a command arrived between the critical section being
|
block time to expire. If a command arrived between the
|
||||||
exited and this yield then the yield will not cause the task
|
critical section being exited and this yield then the yield
|
||||||
to block. */
|
will not cause the task to block. */
|
||||||
portYIELD_WITHIN_API();
|
portYIELD_WITHIN_API();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue