Commit 6db200e4 authored by Oliver Horst's avatar Oliver Horst
Browse files

[chg] Improved the structure of the coresight extension

parent 21d58679
#ifndef FREERTOSPLUS_TRACE_STM_TRACE_H
#define FREERTOSPLUS_TRACE_STM_TRACE_H
#ifndef FREERTOSPLUS_CORESIGHT_STM_TRACE_H
#define FREERTOSPLUS_CORESIGHT_STM_TRACE_H
#include "xil/xil_io.h"
......@@ -99,6 +99,6 @@ extern stm_drvdata_t xSTMTraceDrvData;
* FUNCTIONS
*******************************************************************************/
void stm_trace_init();
void cs_stm_trace_init();
#endif /* FREERTOSPLUS_TRACE_STM_TRACE_H */
#ifndef FREERTOSPLUS_CORESIGHT_TIMESTAMPING_H
#define FREERTOSPLUS_CORESIGHT_TIMESTAMPING_H
void cs_timestamping_init();
#endif /* FREERTOSPLUS_CORESIGHT_TIMESTAMPING_H */
......@@ -3,4 +3,4 @@ cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
add_subdirectory(hal)
add_subdirectory(memguard)
add_subdirectory(perfmon)
add_subdirectory(stm-trace)
add_subdirectory(coresight)
......@@ -4,5 +4,6 @@ target_sources(
freertos-portable
#
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/trace.c"
"${CMAKE_CURRENT_LIST_DIR}/stm_trace.c"
"${CMAKE_CURRENT_LIST_DIR}/timestamping.c"
)
......@@ -19,10 +19,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos+/stm-trace/trace.h"
#if ENABLE_stm_trace == 1
#include "freertos+/coresight/stm_trace.h"
#include "xil/xil_io.h"
#include "xil/csparameters.h"
......@@ -193,20 +190,9 @@ static void stm_enable_hw( stm_drvdata_t *drvdata )
CS_LOCK( drvdata->base );
}
static void timestamp_enable()
{
volatile int *ts_enable = (volatile int *)( CS_TS_BASE + CS_TS_ENABLE_OFFSET );
volatile int *ts_freq = (volatile int *)( CS_TS_BASE + CS_TS_FREQ_OFFSET );
*ts_freq = configTS_GEN_FREQUENCY;
*ts_enable = 0x1 | ( configTS_GEN_DEBUG_HALT << 1 );
}
void stm_trace_init()
void cs_stm_trace_init()
{
timestamp_enable();
#if ( configSTM_ENABLE == 1 )
stm_enable_hw( &xSTMTraceDrvData );
#endif
}
#endif /* ENABLE_stm_trace == 1 */
#include "freertos/FreeRTOS.h"
#include "xil/csparameters.h"
void cs_timestamping_init()
{
#if ( configTS_GEN_ACTIVATE == 1 )
volatile int *ts_enable = (volatile int *)( CS_TS_BASE + CS_TS_ENABLE_OFFSET );
volatile int *ts_freq = (volatile int *)( CS_TS_BASE + CS_TS_FREQ_OFFSET );
*ts_freq = configTS_GEN_FREQUENCY;
*ts_enable = 0x1 | ( configTS_GEN_DEBUG_HALT << 1 );
#endif
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment