Hi @HugPeter-9392 , thank you for posting this question. I have looked into the ThreadX GitHub repository to check the dependency between tx_trace.h and TX_ENABLE_EVENT_TRACE. I have found a file tx_block_allocate.c in which they define TX_ENABLE_EVENT_TRACE. From the header's section it looks like the program needs tx_trace.h to be included when we define this parameter.
Please refer the following code snippet for your reference
#include "tx_api.h"
#ifdef TX_ENABLE_EVENT_TRACE
#include "tx_trace.h"
#endif
#include "tx_thread.h"
#include "tx_block_pool.h"
Since the headers here include both "tx_api.h" and "tx_trace.h", I hope this answers your question 1.
You can modify the code per your needs and define the features and addons you need. Please refer to point 3 of Building and Using library section.
Kindly let us know if the above shared information is useful. Please reach out to us if you need further clarification or assistance on this.