]> granicus.if.org Git - esp-idf/commitdiff
freertos: Remove "stop program on scheduler start when JTAG/OCD is detected" option
authorAngus Gratton <angus@espressif.com>
Thu, 5 Oct 2017 05:57:59 +0000 (16:57 +1100)
committerAngus Gratton <gus@projectgus.com>
Thu, 12 Oct 2017 23:54:02 +0000 (10:54 +1100)
No longer used with new dual core target & JTAG instructions.

components/freertos/Kconfig
components/freertos/include/freertos/portmacro.h
components/freertos/port.c
docs/api-guides/app_trace.rst
docs/api-guides/jtag-debugging/tips-and-quirks.rst

index d6cec2c5cffb133a1364bc84b4b4190e3a4d9b65..21300bdac2be61e300f12c271db793a7efe387f6 100644 (file)
@@ -91,7 +91,7 @@ config FREERTOS_WATCHPOINT_END_OF_STACK
         This check only triggers if the stack overflow writes within 4 bytes of the end of the stack, rather than
         overshooting further, so it is worth combining this approach with one of the other stack overflow check methods.
 
-        When this watchpoint is hit, gdb will stop with a SIGTRAP message. When no OCD is attached, esp-idf
+        When this watchpoint is hit, gdb will stop with a SIGTRAP message. When no JTAG OCD is attached, esp-idf
         will panic on an unhandled debug exception.
 
 config FREERTOS_INTERRUPT_BACKTRACE
@@ -146,14 +146,6 @@ config FREERTOS_ASSERT_DISABLE
 
 endchoice
 
-config FREERTOS_BREAK_ON_SCHEDULER_START_JTAG
-    bool "Stop program on scheduler start when JTAG/OCD is detected"
-    depends on ESP32_DEBUG_OCDAWARE
-    default n
-    help
-        If JTAG/OCD is connected, stop execution when the scheduler is started and the first
-        task is executed.
-
 config FREERTOS_IDLE_TASK_STACKSIZE
     int "Idle Task stack size"
     range 768 32768
index fbfe9828f9ef432889bc041bea35861937315376..d4f96eb1d24dba5d49800c24ebfff5c4781c3dad 100644 (file)
@@ -126,9 +126,6 @@ typedef unsigned portBASE_TYPE      UBaseType_t;
 #include "sdkconfig.h"
 #include "esp_attr.h"
 
-#define portFIRST_TASK_HOOK CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG
-
-
 typedef struct {
        uint32_t owner;
        uint32_t count;
index 63aa553718fe0463584efcd9cb713909577028c5..79e42160b46febc61131099c70407a8909eeb394 100644 (file)
@@ -361,12 +361,6 @@ void vPortCPUReleaseMutex(portMUX_TYPE *mux) {
 }
 #endif
 
-#if CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG
-void vPortFirstTaskHook(TaskFunction_t function) {
-       esp_set_breakpoint_if_jtag(function);
-}
-#endif
-
 void vPortSetStackWatchpoint( void* pxStackStart ) {
        //Set watchpoint 1 to watch the last 32 bytes of the stack.
        //Unfortunately, the Xtensa watchpoints can't set a watchpoint on a random [base - base+n] region because
index 8ef36d73f1a37ec29968cfcbd035634282545992..ba80c16f9695d8864659d5c93bd2cdfd00e8f80a 100644 (file)
@@ -242,7 +242,7 @@ Command usage examples:
 
                esp32 apptrace start file://trace.log 0 2048 -1 1 0
 
-       There is an option to configure target to halt after reset on start of scheduler. To do so, go to menuconfig and enable option *Stop program on scheduler start when JTAG/OCD is detected* under *Component config > FreeRTOS*. 
+       To configure tracing immediately after reset use the openocd ``reset halt`` command.
 
 
 .. _app_trace-logging-to-host:
index 5a7101d0438e21c9ffa290e8c28057e5853ff8ac..bc81dbd6f5c73e3920600bf2bf07e3e18631ca56 100644 (file)
@@ -33,8 +33,12 @@ When stepping through the code with ``next`` command, GDB is internally setting
 Support options for OpenOCD at compile time
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-The ESP-IDF code has various support options for OpenOCD set at compile time: it can stop execution when the first thread is started and break the system if a panic or unhandled exception is thrown. First option is disabled and second enabled by default and both can be changed using the esp-idf configuration menu. Please see the :ref:`make menuconfig <get-started-configure>` menu for more details.
+ESP-IDF has some support options for OpenOCD debugging which can be set at compile time:
 
+* :ref:`CONFIG_ESP32_DEBUG_OCDAWARE` is enabled by default. If a panic or unhandled exception is thrown and a JTAG debugger is connected (ie openocd is running), ESP-IDF will break into the debugger.
+* :ref:`CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK` (disabled by default) sets watchpoint index 1 (the second of two) at the end of any task stack. This is the most accurate way to debug task stack overflows. Click the link for more details.
+
+Please see the :ref:`make menuconfig <get-started-configure>` menu for more details on setting compile-time options.
 
 .. _jtag-debugging-tip-freertos-support: