Bird
0
0

Given this code snippet enabling trace hooks and starting FreeRTOS+Trace recording:

medium📝 Predict Output Q4 of 15
FreeRTOS - Debugging and Monitoring
Given this code snippet enabling trace hooks and starting FreeRTOS+Trace recording:
vTraceEnable(TRC_START);
// Task creation and scheduler start
vTaskStartScheduler();

What will happen if configUSE_TRACE_FACILITY is not set to 1 in FreeRTOSConfig.h?
ATrace recording will start but with limited data
BTrace recording will not start and no trace data will be collected
CThe code will fail to compile
DThe scheduler will not start
Step-by-Step Solution
Solution:
  1. Step 1: Understand configUSE_TRACE_FACILITY role

    This config enables trace hooks; if disabled, trace functions do nothing.
  2. Step 2: Analyze effect on vTraceEnable(TRC_START)

    Without enabling trace facility, vTraceEnable(TRC_START) runs but no trace data is collected; code compiles and scheduler runs normally.
  3. Final Answer:

    Trace recording will not start and no trace data will be collected -> Option B
  4. Quick Check:

    Trace facility disabled = no trace data [OK]
Quick Trick: Enable configUSE_TRACE_FACILITY to collect trace data [OK]
Common Mistakes:
  • Assuming code won't compile without trace facility
  • Thinking scheduler won't start
  • Believing partial trace data is collected automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes