adds tracing to thread demo
this hardcodes the trace buffer
This commit is contained in:
@@ -28,11 +28,14 @@ if(NX_DEBUG)
|
|||||||
target_compile_definitions(netxduo PRIVATE NX_DEBUG NX_DEBUG_PACKET NX_ENABLE_PACKET_DEBUG_INFO)
|
target_compile_definitions(netxduo PRIVATE NX_DEBUG NX_DEBUG_PACKET NX_ENABLE_PACKET_DEBUG_INFO)
|
||||||
endif()
|
endif()
|
||||||
if(TX_TRACE)
|
if(TX_TRACE)
|
||||||
|
target_compile_definitions(threadx PUBLIC TX_ENABLE_EVENT_TRACE)
|
||||||
|
target_compile_definitions(threadx_smp PUBLIC TX_ENABLE_EVENT_TRACE)
|
||||||
target_compile_definitions(netxduo PUBLIC TX_ENABLE_EVENT_TRACE)
|
target_compile_definitions(netxduo PUBLIC TX_ENABLE_EVENT_TRACE)
|
||||||
endif()
|
endif()
|
||||||
###############################################################################
|
###############################################################################
|
||||||
project(threadx_demo C ASM)
|
project(threadx_demo C ASM)
|
||||||
option(NX_DEBUG "compile netxduo debug output in" OFF)
|
option(NX_DEBUG "compile netxduo debug output in" OFF)
|
||||||
|
option(TX_TRACE "Enable dump of traces to be read by TraceX" OFF)
|
||||||
set(TARGET_MEM "ram" CACHE STRING "memory map to use")
|
set(TARGET_MEM "ram" CACHE STRING "memory map to use")
|
||||||
set(CMAKE_EXECUTABLE_SUFFIX_C ".elf")
|
set(CMAKE_EXECUTABLE_SUFFIX_C ".elf")
|
||||||
|
|
||||||
|
|||||||
@@ -184,6 +184,9 @@ void tx_application_define(void* first_unused_memory)
|
|||||||
|
|
||||||
/* Release the block back to the pool. */
|
/* Release the block back to the pool. */
|
||||||
tx_block_release(pointer);
|
tx_block_release(pointer);
|
||||||
|
|
||||||
|
/* Enable tracing */
|
||||||
|
tx_trace_enable((void*)0x31000000, 0x100000, 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Define the test threads. */
|
/* Define the test threads. */
|
||||||
|
|||||||
Reference in New Issue
Block a user