mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Update trace recorder to include heap tracing and new v8 features.
This commit is contained in:
parent
853696a991
commit
04ae37ef12
15 changed files with 1218 additions and 608 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Tracealyzer v2.5.0 Recorder Library
|
||||
* Tracealyzer v2.6.0 Recorder Library
|
||||
* Percepio AB, www.percepio.com
|
||||
*
|
||||
* trcHardwarePort.c
|
||||
|
@ -37,6 +37,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
#include "trcHardwarePort.h"
|
||||
#include "trcKernelPort.h"
|
||||
|
||||
#if (USE_TRACEALYZER_RECORDER == 1)
|
||||
|
||||
|
@ -55,6 +56,45 @@ uint32_t last_timestamp = 0;
|
|||
******************************************************************************/
|
||||
uint32_t uiTraceTickCount = 0;
|
||||
|
||||
uint32_t DWT_CYCLES_ADDED = 0;
|
||||
|
||||
#if (SELECTED_PORT == PORT_ARM_CortexM)
|
||||
|
||||
void prvTraceEnableIRQ(void)
|
||||
{
|
||||
asm volatile ("cpsie i");
|
||||
}
|
||||
|
||||
void prvTraceDisableIRQ(void)
|
||||
{
|
||||
asm volatile ("cpsid i");
|
||||
}
|
||||
|
||||
void prvTraceSetIRQMask(uint32_t priMask)
|
||||
{
|
||||
asm volatile ("MSR primask, %0" : : "r" (priMask) );
|
||||
}
|
||||
|
||||
uint32_t prvTraceGetIRQMask(void)
|
||||
{
|
||||
uint32_t result;
|
||||
asm volatile ("MRS %0, primask" : "=r" (result) );
|
||||
return result;
|
||||
}
|
||||
|
||||
void prvTraceInitCortexM()
|
||||
{
|
||||
DWT_CTRL_REG |= 1; /* Enable the cycle counter */
|
||||
DWT_CYCLE_COUNTER = 0;
|
||||
|
||||
if (RecorderDataPtr->frequency == 0)
|
||||
{
|
||||
RecorderDataPtr->frequency = TRACE_CPU_CLOCK_HZ / HWTC_DIVISOR;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* vTracePortGetTimeStamp
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue