docs: Updates OpenOCD command names

This commit is contained in:
Alexey Gerenkov 2020-03-16 19:06:47 +03:00
parent 63cd2b0613
commit 7ee7a6d7bb
6 changed files with 14 additions and 18 deletions

View File

@ -68,7 +68,7 @@ idf.py -p PORT flash monitor
**Start App Trace:** In the telnet session window, trigger OpenOCD to start App Trace on the ESP32 by entering the command below. This command will collect 9000 bytes of JTAG log data and save them to `adc.log` file in `~/esp/openocd-esp32` folder.
```bash
esp32 apptrace start file://adc.log 0 9000 5 0 0
esp apptrace start file://adc.log 0 9000 5 0 0
```
**Note:** For more details on OpenOCD commands regarding App Trace, refer to the [OpenOCD Application Level Tracing Commands](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/app_trace.html#openocd-application-level-tracing-commands)
@ -156,7 +156,7 @@ Log records count: 428
### Unable to flash when OpenOCD is connected to ESP32
One likely cause would be an incorrect SPI flash voltage when starting OpenOCD. Suppose an ESP32 board/module with a 3.3 V powered SPI flash is being used, but the `board/esp32-wrover.cfg` configuration file is selected when starting OpenOCD which can set the SPI flash voltage to 1.8 V. In this situation, the SPI flash will not work after OpenOCD connects to the ESP32 as OpenOCD has changed the SPI flash voltage. Therefore, you might not be able to flash ESP32 when OpenOCD is connected.
One likely cause would be an incorrect SPI flash voltage when starting OpenOCD. Suppose an ESP32 board/module with a 3.3 V powered SPI flash is being used, but the `board/esp32-wrover.cfg` configuration file is selected when starting OpenOCD which can set the SPI flash voltage to 1.8 V. In this situation, the SPI flash will not work after OpenOCD connects to the ESP32 as OpenOCD has changed the SPI flash voltage. Therefore, you might not be able to flash ESP32 when OpenOCD is connected.
To work around this issue, users are suggested to use `board/esp32-wrover.cfg` for ESP32 boards/modules operating with an SPI flash voltage of 1.8 V, and `board/esp-wroom-32.cfg` for 3.3 V. Refer to [ESP32 Modules and Boards](https://docs.espressif.com/projects/esp-idf/en/latest/hw-reference/modules-and-boards.html) and [Set SPI Flash Voltage](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/tips-and-quirks.html#why-to-set-spi-flash-voltage-in-openocd-configuration) for more details.

View File

@ -36,7 +36,7 @@ telnet localhost 4444
idf.py menuconfig
```
The example will enable the following options by default:
The example will enable the following options by default:
* Enable the Application Tracing Module under `Component config -> Application Level Tracing -> Data Destination` by choosing `Trace memory`.
* Enable GCOV to host interface under `Component config -> Application Level Tracing -> GCOV to Host Enable`.
@ -60,7 +60,7 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui
### 1. Hard-coded Dump
The example will initially execute two hard-coded dumps. Therefore, when the application outputs `Ready to dump GCOV data...`, users should execute the `esp32 gcov dump` OpenOCD command. The example should output the following:
The example will initially execute two hard-coded dumps. Therefore, when the application outputs `Ready to dump GCOV data...`, users should execute the `esp gcov dump` OpenOCD command. The example should output the following:
```
blink_dummy_func: Counter = 0
@ -75,7 +75,7 @@ GCOV data have been dumped.
### 2. Instant Run-Time Dump
After the two hard-coded dumps, the example will continue looping through it's main blink function. Users can call `esp32 gcov` OpenOCD command to trigger an instant run-time dump. The output should resemble the following:
After the two hard-coded dumps, the example will continue looping through it's main blink function. Users can call `esp gcov` OpenOCD command to trigger an instant run-time dump. The output should resemble the following:
```
blink_dummy_func: Counter = 2
@ -144,7 +144,7 @@ If the following log is output when issuing an OpenOCD command via telnet, it co
```
Open On-Chip Debugger
> esp32 gcov dump
> esp gcov dump
Target halted. PRO_CPU: PC=0x4008AFF4 (active) APP_CPU: PC=0x400E396E
Total trace memory: 16384 bytes
Connect targets...

View File

@ -104,14 +104,14 @@ NOTE: In order to run this example you need OpenOCD version `v0.10.0-esp32-20181
5. It is useful to use GDB to start and/or stop tracing automatically. To do this you need to prepare special `gdbinit` file:
```
```
target remote :3333
mon reset halt
b app_main
commands
mon esp32 sysview start file:///tmp/sysview_example.svdat
mon esp sysview start file:///tmp/sysview_example.svdat
# For dual-core mode uncomment the line below and comment the line above
# mon esp32 sysview start file:///tmp/sysview_example0.svdat file:///tmp/sysview_example1.svdat
# mon esp sysview start file:///tmp/sysview_example0.svdat file:///tmp/sysview_example1.svdat
c
end
c
@ -119,8 +119,6 @@ NOTE: In order to run this example you need OpenOCD version `v0.10.0-esp32-20181
Using this file GDB will connect to the target, reset it, and start tracing when it hit breakpoint at `app_main`. Trace data will be saved to `/tmp/sysview_example.svdat`.
**Note:** if running the example on ESP32-S2, modify the command name in gdbinit file from `esp32 sysview` to `esp32_s2 sysview`.
6. Run GDB using the following command from the project root directory:
```
@ -132,7 +130,7 @@ NOTE: In order to run this example you need OpenOCD version `v0.10.0-esp32-20181
7. When program prints the last message, interrupt its execution (e.g. by pressing `CTRL+C`) and type the following command in GDB console to stop tracing:
```
mon esp32 sysview stop
mon esp sysview stop
```
You can also use another breakpoint to stop tracing and add respective lines to `gdbinit` at step 5.

View File

@ -5,9 +5,9 @@ flushregs
b app_main
commands
mon esp32 sysview start file:///tmp/sysview_example.svdat
mon esp sysview start file:///tmp/sysview_example.svdat
# For dual-core mode uncomment the line below and comment the line above
# mon esp32 sysview start file:///tmp/sysview_example0.svdat file:///tmp/sysview_example1.svdat
# mon esp sysview start file:///tmp/sysview_example0.svdat file:///tmp/sysview_example1.svdat
c
end

View File

@ -41,8 +41,6 @@ To run the example and collect trace data:
xtensa-esp32-elf-gdb -x gdbinit build/sysview_tracing_heap_log.elf
```
**Note**: if running the example on ESP32-S2, modify the command name in gdbinit file from `esp32 sysview` to `esp32_s2 sysview`, and run `xtensa-esp32s2-elf-gdb` instead of `xtensa-esp32-elf-gdb`.
2. When program stops at `heap_trace_stop` quit GDB.
3. Open trace data file in SystemView tool.

View File

@ -5,13 +5,13 @@ flushregs
tb heap_trace_start
commands
mon esp32 sysview start file:///tmp/heap_log.svdat
mon esp sysview start file:///tmp/heap_log.svdat
c
end
tb heap_trace_stop
commands
mon esp32 sysview stop
mon esp sysview stop
end
c