Code Monkey home page Code Monkey logo

wireless-esp8266-dap's Introduction

image

Build Status master  Build Status develop

 PRs Welcome %e2%9d%a4

中文

Introduce

Wireless debugging with only one ESP Chip !

Realized by USBIP and CMSIS-DAP protocol stack.

👉 5m range, 100kb size firmware(Hex) earse and download test:


For Keil users, we now also support elaphureLink. No need for usbip to start your wireless debugging!

Feature

  1. SoC Compatibility

    • ESP8266/8285
    • ESP32
    • ESP32C3
    • ESP32S3
  2. Debug Communication Mode

    • SWD
    • JTAG
  3. USB Communication Mode

    • USB-HID
    • WCID & WinUSB (Default)
  4. Debug Trace (Uart)

    • Uart TCP Bridge
  5. More..

    • SWD protocol based on SPI acceleration (Up to 40MHz)
    • Support for elaphureLink, fast Keil debug without drivers
    • ...

Link your board

WIFI

The default connected WIFI SSID is DAP or OTA , password 12345678

Support for specifying multiple possible WAP. It can be added here: wifi_configuration.h

You can also specify your IP in the above file (We recommend using the static address binding feature of the router).

WIFI

There is built-in ipv4 only mDNS server. You can access the device using dap.local.

The mDNS in ESP8266 only supports ipv4.

mDNS

Debugger

ESP8266
SWD
SWCLK GPIO14
SWDIO GPIO13
TVCC 3V3
GND GND

JTAG
TCK GPIO14
TMS GPIO13
TDI GPIO4
TDO GPIO16
nTRST (optional) GPIO0*
nRESET GPIO5
TVCC 3V3
GND GND

Other
LED_WIFI_STATUS GPIO15
Tx GPIO2
Rx GPIO3 (U0RXD)

Rx and Tx is used for uart bridge, not enabled by default.

ESP32
SWD
SWCLK GPIO14
SWDIO GPIO13
TVCC 3V3
GND GND

JTAG
TCK GPIO14
TMS GPIO13
TDI GPIO18
TDO GPIO19
nTRST (optional) GPIO25
nRESET GPIO26
TVCC 3V3
GND GND

Other
LED_WIFI_STATUS GPIO27
Tx GPIO23
Rx GPIO22

Rx and Tx is used for uart bridge, not enabled by default.

ESP32C3
SWD
SWCLK GPIO6
SWDIO GPIO7
TVCC 3V3
GND GND

JTAG
TCK GPIO6
TMS GPIO7
TDI GPIO9
TDO GPIO8
nTRST (optional) GPIO4
nRESET GPIO5
TVCC 3V3
GND GND

Other
LED_WIFI_STATUS GPIO10
Tx GPIO19
Rx GPIO18

Rx and Tx is used for uart bridge, not enabled by default.

ESP32S3
SWD
SWCLK GPIO12
SWDIO GPIO11
TVCC 3V3
GND GND

JTAG
TCK GPIO12
TMS GPIO11
TDI GPIO10
TDO GPIO9
nTRST (optional) GPIO14
nRESET GPIO13
TVCC 3V3
GND GND

Hardware Reference

Only a hardware reference for the ESP8266 is currently available.

Here we provide a simple example for reference:

sch

Alternatively, you can connect directly with wires as we gave at the beginning, without additional circuits.

In addition, a complete hardware reference design is available from contributors, see circuit


Build And Flash

You can build locally or use Github Action to build online and then download firmware to flash.

Build with Github Action Online

See: Build with Github Action

General build and Flash

ESP8266
  1. Get ESP8266 RTOS Software Development Kit

    The SDK is already included in the project. Please don't use other versions of the SDK.

  2. Build & Flash

    Build with ESP-IDF build system. More information can be found at the following link: Build System

The following example shows a possible way to build on Windows:

# Build
python ./idf.py build
# Flash
python ./idf.py -p /dev/ttyS5 flash
ESP32/ESP32C3
  1. Get esp-idf

    For now, please use esp-idf v4.4.2 : https://github.com/espressif/esp-idf/releases/tag/v4.4.2

  2. Build & Flash

    Build with ESP-IDF build system. More information can be found at the following link: Build System

The following example shows a possible way to build:

# Set build target
idf.py set-target esp32
# Build
idf.py build
# Flash
idf.py -p /dev/ttyS5 flash

The idf.py in the project root directory is only applicable to the old ESP8266 target. Don't use it in ESP32.

We also provided sample firmware for quick evaluation. See Releases

Usage

  1. Get USBIP project
  • Windows: usbip-win .
  • Linux: Distributed as part of the Linux kernel, but we have not yet tested on Linux platform, and the following instructions are all under Windows platform.
  1. Start ESP chip and connect it to the device to be debugged

  2. Connect it with usbip:

# HID Mode only
# for pre-compiled version on SourceForge
# or usbip old version
.\usbip.exe -D -a <your-esp-device-ip-address>  1-1

# 👉 Recommend
# HID Mode Or WinUSB Mode
# for usbip-win 0.3.0 kmdf ude
.\usbip.exe attach_ude -r <your-esp-device-ip-address> -b 1-1

If all goes well, you should see your device connected.

image

Here, we use MDK for testing:

target


FAQ

Keil is showing a "RDDI-DAP ERROR" or "SWD/JTAG Communication Failure" message.

  1. Check your line connection. Don't forget the 3v3 connection cable.
  2. Check that your network connection is stable.

DAP is slow or often abnormal.

Note that this project is sensitive to the network environment. If you are using a hotspot on your computer, you can try using network analyzer such as wireshark to observe the status of your AP network. During the idle time, the network should stay silent, while in the working state, there should be no too much packet loss.

Some LAN broadcast packets can cause serious impact, including:

  • DropBox LAN Sync
  • Logitech Arx Control
  • ...

For ESP8266, this is not far from UDP FLOOD...😰

It is also affected by the surrounding radio environment, your AP situation (some NICs have terrible AP performance), distance, etc.


Document

Speed Strategy

The maximum rate of esp8266 pure IO is about 2MHz. When you select max clock, we will take the following actions:

  • clock < 2Mhz : Similar to the clock speed you choose.
  • 2MHz <= clock < 10MHz : Use the fastest pure IO speed.
  • clock >= 10MHz : SPI acceleration using 40MHz clock.

Note that the most significant speed constraint of this project is still the TCP connection speed.

For OpenOCD user

This project was originally designed to run on Keil, but now you can also perform firmware flash on OpenOCD.

Note that if you want to use a 40MHz SPI acceleration, you need to specify the speed after the target device is connected, otherwise it will fail with the beginning.

# Run before approaching the flash command
> adapter speed 10000

> halt
> flash write_image [erase] [unlock] filename [offset] [type]

Keil's timing handling is somewhat different from OpenOCD's. For example, OpenOCD lacks the SWD line reset sequence before reading the IDCODE registers.

System OTA

When this project is updated, you can update the firmware over the air.

Visit the following website for OTA operations: online OTA

For most devices, you don't need to care about flash size. However, improper setting of the flash size may cause the OTA to fail. In this case, please change the flash size with idf.py menuconfig, or modify sdkconfig:

# Choose a flash size.
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y

# Then set a flash size
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"

If flash size is 2MB, the sdkconfig file might look like this:

CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"

For devices with 1MB flash size such as ESP8285, the following changes must be made:

CONFIG_PARTITION_TABLE_FILENAME="partitions_two_ota.1MB.csv"
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="1MB"
CONFIG_ESP8266_BOOT_COPY_APP=y

The flash size of the board can be checked with the esptool.py tool:

esptool.py -p (PORT) flash_id

Uart TCP Bridge

This feature provides a bridge between TCP and Uart:

Send data   ->  TCP  ->  Uart TX -> external devices

Recv data   <-  TCP  <-  Uart Rx <- external devices

uart_tcp_bridge

When the TCP connection is established, bridge will try to resolve the text sent for the first packet. When the text is a valid baud rate, bridge will switch to it. For example, sending the ASCII text 115200 will switch the baud rate to 115200.

For performance reasons, this feature is not enabled by default. You can modify wifi_configuration.h to turn it on.


Develop

Check other branches to know the latest development progress.

Any kind of contribute is welcome, including but not limited to new features, ideas about circuits, documentation.

You can also ask questions to make this project better.

Issue

2020.12.1

TCP transmission speed needs to be further improved.

2020.11.11

Winusb is now available, but it is very slow.

2020.2.4

Due to the limitation of USB-HID (I'm not sure if this is a problem with USBIP or Windows), now each URB packet can only reach 255 bytes (About 1MBps bandwidth), which has not reached the upper limit of ESP8266 transmission bandwidth.

I now have an idea to construct a Man-in-the-middle between the two to forward traffic, thereby increasing the bandwidth of each transmission.

2020.1.31

At present, the adaptation to WCID, WinUSB, etc. has all been completed. However, when transmitting data on the endpoint, we received an error message from USBIP. This is most likely a problem with the USBIP project itself.

Due to the completeness of the USBIP protocol document, we have not yet understood its role in the Bulk transmission process, which may also lead to errors in subsequent processes.

We will continue to try to make it work on USB HID. Once the USBIP problem is solved, we will immediately transfer it to work on WinUSB


Credit

Credits to the following project, people and organizations:

License

MIT LICENSE

wireless-esp8266-dap's People

Contributors

kerms avatar windowsair avatar ycwan9 avatar zhuyanzhen1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wireless-esp8266-dap's Issues

build error

huyil233@Huyil:/esp/ESP8266_RTOS_SDK/wireless-esp8266-dap-0.1.3.1/build2$ cmake ..
huyil233@Huyil:
/esp/ESP8266_RTOS_SDK/wireless-esp8266-dap-0.1.3.1/build2$ make all
[100%] Generating binary image from built executable
esptool.py v2.4.0
Generated /home/huyil233/esp/ESP8266_RTOS_SDK/wireless-esp8266-dap-0.1.3.1/build2/bootloader/bootloader.bin
[100%] Built target gen_project_binary
Scanning dependencies of target app
[100%] Built target app
[100%] No install step for 'bootloader'
[100%] Completed 'bootloader'
[100%] Built target bootloader
Scanning dependencies of target gen_project_binary
[100%] Generating binary image from built executable
esptool.py v2.4.0
.flash.rodata len 0x02ea4 load 0x4021b5ec

A fatal error occurred: Segment loaded at 0x4021b5ec lands in same 64KB flash mapping as segment loaded at 0x40210010. Can't generate binary. Suggest changing linker script or ELF to merge sections.
make[2]: *** [CMakeFiles/gen_project_binary.dir/build.make:61: .bin_timestamp] Error 2
make[1]: *** [CMakeFiles/Makefile2:2847: CMakeFiles/gen_project_binary.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

vscode pio 配置

keil 倒是可以

这个可以调试 stm arduino 吧
platformio 怎么配置啊

debug_tool = cmsis-dap
upload_protocol = cmsis-dap
upload_speed=1000

waiting for host??

ets Jan 8 2013,rst cause:1, boot mode:(7,0)

waiting for host

我在串口里收到了这个消息,并且是在烧录之后

我使用的烧录命令是

python "C:\Users\xtx\OneDrive - xutongxin\ESP8266\DAP\pytool\esptool\esptool.py" -p COM16 -b 921600 --after hard_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 esp8266_dap.bin

烧录结果是

Hash of data verified.

Leaving...
Hard resetting via RTS pin...

很抱歉,我对这个芯片确实不够熟悉,希望你可以解答我,再次感谢

Release的固件没有正常运行

模块是ESP-WROOM-02, 16Mbit.使用的固件是v0.2.0,下载设置如下:
ESP-WROOM-02_1
启动信息如下:
ESP-WROOM-02_2
SPI MODE设置为QIO,DIO,DOUT启动信息都一样,在网络里也找不到AP.
v0.1.2版本的固件也试过,都是无法正常运行.
这是下载设置哪里有问题吗?

关于SWD和JTAG引脚口的变更

你好,我在对本项目进行二次开发时,想要修改调试有关的引脚。但是发现了以下的警告注释
image
请问,为什么不能更改SWD或者JTAG的引脚口呢?

ESP8266 does not boot after flashing

Hi. Tryed both merged and separate bin files versiont 0.1.4 then 0.2.0 and 0.2.1, wrote merged at 0x0000 and separate bin files - bootloader to 0x0000, partition_table to 0x8000 and app to 0x10000. Used "ESP download flash tool" v3.9.3 to burn binaries. Device gives to console this output
`load 0x40100000, len 5880, room 16

tail 8

chksum 0xeb

load 0x3ffe8008, len 24, room 0

tail 8

chksum 0x43

load 0x3ffe8020, len 3308, room 0

tail 12

chksum 0xd4

csum 0xd4
[0;32mI (59) boot: ESP-IDF ed19d9c 2nd stage bootloader[0m

[0;32mI (59) boot: compile time 06:01:02[0m

[0;32mI (68) qio_mode: Enabling default flash chip QIO[0m

[0;32mI (68) boot: SPI Speed : 80MHz[0m

[0;32mI (72) boot: SPI Mode : QIO[0m

[0;32mI (78) boot: SPI Flash Size : 16MB[0m

[0;32mI (84) boot: Partition Table:[0m

[0;32mI (90) boot: ## Label Usage Type ST Offset Length[0m

[0;32mI (101) boot: End of partition table[0m

[0;31mE (108) boot: No bootable app partitions in the partition table[0m

user code done`

board is custom diy ESP8266 PCB with 4Mb flash, but i've tested it with primitive arduino apps, all works fine not a hardware issue.

Tryed to upload using ESPHome-Flasher-v1.3.0 and even using commandline Arduino esptool.py. Same result and same output to console with all versions.

关于jtag调试无法正常启动的问题

你好,我在对本项目进行二次开发时,想通过jtag调试器进行调试,但是却发现DebugConsole中出现了以下的错误。
使用的开发板:esp-wrover-kit
系统:win10
平台:VSCode + PlatformIO插件

undefinedC:\Users\22380\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from c:\Users\22380\Documents\GitHub\wireless-esp8266-dap\.pio\build\esp-wrover-kit\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = ftdi
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.11.0-esp32-20211220-1338-g554a6c26 (2022-04-08-09:23)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

WARNING: boards/esp32-wrover.cfg is deprecated, and may be removed in a future release.
         If your board is ESP32-WROVER-KIT, use board/esp32-wrover-kit-1.8v.cfg instead.
adapter speed: 500 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 500 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Warn : target esp32.cpu1 examination failed
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : starting gdb server for esp32.cpu0 on pipe
Info : accepting 'gdb' connection from pipe
Info : esp32.cpu0: Target halted, PC=0x4000921A, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.irom' size 0 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.drom' size 0 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
Warn : negative reply, retrying
0x4000921a in ?? ()
Error: FreeRTOS: uxTopUsedPriority is not defined, consult the OpenOCD manual for a work-around!
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Hardware assisted breakpoint 1 at 0x400d198f: file main/main.c, line 20.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
...
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
pio_reset_run_target
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.

于是,为了验证我的esp32是否硬件上存在问题,我便试着创建一个新的空项目。于是它成功完成了调试。
image
image
其DebugConsole如下:

undefinedC:\Users\22380\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from c:\Users\22380\Documents\PlatformIO\Projects\DEMO\.pio\build\esp-wrover-kit\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = ftdi
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.11.0-esp32-20211220-1338-g554a6c26 (2022-04-08-09:23)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

WARNING: boards/esp32-wrover.cfg is deprecated, and may be removed in a future release.
         If your board is ESP32-WROVER-KIT, use board/esp32-wrover-kit-1.8v.cfg instead.
adapter speed: 500 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 500 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : starting gdb server for esp32.cpu0 on pipe
Info : accepting 'gdb' connection from pipe
Info : esp32.cpu0: Target halted, PC=0x400E403E, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x400E403E, debug_reason=00000000
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 30 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 82 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 30 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 82 KB
Info : Using flash bank 'esp32.cpu0.irom' size 84 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 30 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 82 KB
Info : Using flash bank 'esp32.cpu0.drom' size 32 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
Warn : negative reply, retrying
0x400e403e in esp_pm_impl_waiti () at C:\Users\22380\.platformio\packages\framework-espidf\components\hal\esp32\include/hal/cpu_ll.h:183
183	    asm volatile ("waiti 0\n");
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 30 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 82 KB
Flash mapping 0: 0x10020 -> 0x3f400020, 30 KB
Flash mapping 1: 0x20020 -> 0x400d0020, 82 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu1.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu1.flash' size 4096 KB
** Programming Started **
Auto-detected flash bank 'esp32.cpu1.flash' size 4096 KB
Using flash bank 'esp32.cpu1.flash' size 4096 KB
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : PROF: Data transferred in 1010.16 ms @ 27.7183 KB/s
PROF: Data transferred in 1010.16 ms @ 27.7183 KB/s
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Verified OK **
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : PROF: Data transferred in 158.033 ms @ 25.3112 KB/s
PROF: Data transferred in 158.033 ms @ 25.3112 KB/s
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Verified OK **
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : PROF: Data transferred in 6049.46 ms @ 27.7711 KB/s
PROF: Data transferred in 6049.46 ms @ 27.7711 KB/s
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Verified OK **
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Hardware assisted breakpoint 1 at 0x400e3de0: file src/main.c, line 1.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
Info : esp32.cpu0: Target halted, PC=0x400E3DE0, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400E3DE0, debug_reason=00000001
Info : Set GDB target to 'esp32.cpu0'
Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x400E403E, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x400E403E, debug_reason=00000000
[New Thread 1073440948]
[New Thread 1073439060]
[New Thread 1073413508]
[New Thread 1073432724]
[New Thread 1073412896]
[Switching to Thread 1073437172]

Thread 1 "main" hit Temporary breakpoint 1, app_main () at src/main.c:1
1	void app_main() {
Note: automatically using hardware breakpoints for read-only addresses.

Thread 1 "main" hit Breakpoint 5, app_main () at src/main.c:4
4	    a++;

我猜测可能是因为本项目中存在一些引脚占用,使得jtag的引脚被占用了。于是,我更改了本项目中的main函数,本想让jtag口不进行init。
image
重新烧录进行debug后,发现debug栏卡死,无法进行step over或step into或step out。
image
查看DebugConsole发现存在这样的错误报告。

undefinedC:\Users\22380\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from c:\Users\22380\Documents\GitHub\wireless-esp8266-dap\.pio\build\esp-wrover-kit\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = ftdi
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.11.0-esp32-20211220-1338-g554a6c26 (2022-04-08-09:23)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

WARNING: boards/esp32-wrover.cfg is deprecated, and may be removed in a future release.
         If your board is ESP32-WROVER-KIT, use board/esp32-wrover-kit-1.8v.cfg instead.
adapter speed: 500 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 500 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Warn : target esp32.cpu1 examination failed
Info : starting gdb server for esp32.cpu0 on pipe
Info : accepting 'gdb' connection from pipe
Info : esp32.cpu0: Target halted, PC=0x4000921A, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.irom' size 0 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.drom' size 0 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
Warn : negative reply, retrying
0x4000921a in ?? ()
Error: FreeRTOS: uxTopUsedPriority is not defined, consult the OpenOCD manual for a work-around!
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Hardware assisted breakpoint 1 at 0x400e39ac: file main/main.c, line 18.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
Warn : address 0x400e39af not writable
Error: esp32.cpu0: Failed to write breakpoint instruction (-4)!
Error: esp32.cpu0: Failed to add SW breakpoint!
Error: can't add breakpoint: unknown reason
Warning:
Cannot insert breakpoint 2.
Cannot access memory at address 0x400e39af

Command aborted.

在网上查阅了很久,但并没有发现类似的错误。

在此,还想提问一下,是否存在一种可能,使得在未经main执行前,jtag所对应的引脚已经被启用,虽然并没有进行init,但是会扰乱原本的引脚信号,从而使得jtag无法进行调试?

最后,如果能够得到您的帮助,我会感激不尽。如果您需要查阅更多的报告或文件配置等详细信息,我很乐意提供给您。

Not booting on ESP8266 (first part is in issue #46)

First part of getting FW to work was a fail, issue #46. Decided to make one more last try in hardcore style: compiled softAP from latest ESP8266_RTOS_SDK, opened in hex editor my compiled bootloader.img and partitions.img, compared them with relative parts in the ESP8266 wireless_esp_dap_full.bin v.0.2.1 - they are completly differs. Replaced bootloader part at 0x0000 and partitions part at 0x8000, burned this hardcooked fw.It's started, succesfully connected to the router, successfully connected to elaphureLink and recognized by Keil. My bootloader and partitions bin files attached to this post for further investigation. Looks like the culprit is Partitions part with multiple OTA defifnitions in it.
binaries.zip

error on initially compiling app binary on Ubuntu 20.04 distribution (.flash.rodata linker file related?)

sys: x86_64
os: Linux, Ubuntu 20.04
sdk: Project version: e.g. v3.4-dev-347-g1be2289f for v0.1.3.1 (change from make to idf.py command since version v0.1.3)
wireless-esp8266-dap tags: (comparable resulting compile error) v0.1.0-v0.2.0

idf.py -p /dev/ttyUSB1 app

e.g. from v0.1.3.1
edit: (previous error, started to improve with retrying)

FAILED: .bin_timestamp
cd /dev/shm/dap-0.3.1/build && /root/.espressif/python_env/rtos3.4_py3.8_env/bin/python /mnt/nvme0n1p2/Stm32/cmsisDap/ESP8266_RTOS_SDK/components/esptool_py/esptool/esptool.py --chip esp8266 elf2image --flash_mode dio --flash_freq 80m --flash_size 16MB --version=3 -o /dev/shm/dap-0.3.1/build/esp8266_dap.bin esp8266_dap.elf && /usr/bin/cmake -E echo "Generated /dev/shm/dap-0.3.1/build/esp8266_dap.bin" && /usr/bin/cmake -E md5sum /dev/shm/dap-0.3.1/build/esp8266_dap.bin > /dev/shm/dap-0.3.1/build/.bin_timestamp
esptool.py v2.4.0
.flash.rodata len 0x02ec4 load 0x4021b5ec<\del>

A fatal error occurred: Segment loaded at 0x4021b5ec lands in same 64KB flash mapping as segment loaded at 0x40210010. Can't generate binary. Suggest changing linker script or ELF to merge sections.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

(momentarily workaround for debugging: compiles with copying sdkconfig from compilable ESP8266_RTOS_SDK/examples/get-started/hello_world to 'wireless-esp8266-dap' root directory,
edit: switching back to original sdkconfig compiles now also and creates running binary flashed to 0x10000.
(disconnects and reboots esp8266 device with usbip attach -r xxx.xxx.xxx.xxx -b 1-1)

diff -y sdkconfig_helloWorld sdkconfig

CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y		     |	# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set	     |	CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y	     |	# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not se  |	CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y
# CONFIG_APP_UPDATE_CHECK_APP_HASH is not set		     |	CONFIG_APP_UPDATE_CHECK_APP_HASH=y
CONFIG_ESP8266_NMI_WDT=y				     |	# CONFIG_ESP8266_NMI_WDT is not set
# CONFIG_SOC_FULL_ICACHE is not set			     |	CONFIG_SOC_FULL_ICACHE=y
CONFIG_SOC_IRAM_SIZE=0xC000				     |	CONFIG_SOC_IRAM_SIZE=0x8000
CONFIG_WIFI_PPT_TASKSTACK_SIZE=5120			     |	CONFIG_WIFI_PPT_TASKSTACK_SIZE=4096
CONFIG_ESP8266_CORE_GLOBAL_DATA_LINK_IRAM=y		     <
# CONFIG_ESP8266_WIFI_AMPDU_RX_ENABLED is not set	     |	CONFIG_ESP8266_WIFI_AMPDU_RX_ENABLED=y
							     >	CONFIG_ESP8266_WIFI_RX_BA_WIN_SIZE=6
CONFIG_ESP8266_WIFI_RX_BUFFER_NUM=16			     |	CONFIG_ESP8266_WIFI_RX_BUFFER_NUM=28
CONFIG_ESP8266_WIFI_LEFT_CONTINUOUS_RX_BUFFER_NUM=16	     |	CONFIG_ESP8266_WIFI_LEFT_CONTINUOUS_RX_BUFFER_NUM=8
CONFIG_ESP8266_WIFI_RX_PKT_NUM=7			     |	CONFIG_ESP8266_WIFI_RX_PKT_NUM=16
CONFIG_ESP8266_PHY_MAX_WIFI_TX_POWER=20			     |	CONFIG_ESP8266_PHY_MAX_WIFI_TX_POWER=21
# CONFIG_ESP8266_HSPI_HIGH_THROUGHPUT is not set	     |	CONFIG_ESP8266_HSPI_HIGH_THROUGHPUT=y
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y				     |	# CONFIG_ESP_ERR_TO_NAME_LOOKUP is not set
CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584			     |	CONFIG_ESP_TIMER_TASK_STACK_SIZE=2048
CONFIG_ESP_TASK_WDT=y					     |	# CONFIG_ESP_TASK_WDT is not set
CONFIG_ESP_TASK_WDT_PANIC=y				     <
CONFIG_FREERTOS_GLOBAL_DATA_LINK_IRAM=y			     |	CONFIG_FREERTOS_CODE_LINK_TO_IRAM=y
# CONFIG_FREERTOS_CODE_LINK_TO_IRAM is not set		     <
# CONFIG_HEAP_DISABLE_IRAM is not set			     |	CONFIG_HEAP_DISABLE_IRAM=y
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set		     |	CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
CONFIG_LOG_DEFAULT_LEVEL_INFO=y				     |	# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set
CONFIG_LOG_DEFAULT_LEVEL=3				     |	CONFIG_LOG_DEFAULT_LEVEL=1
# CONFIG_LWIP_IRAM_OPTIMIZATION is not set		     |	CONFIG_LWIP_IRAM_OPTIMIZATION=y
CONFIG_LWIP_IP6_FRAG=y					     |	# CONFIG_LWIP_IP6_FRAG is not set
CONFIG_LWIP_ESP_GRATUITOUS_ARP=y			     |	# CONFIG_LWIP_ESP_GRATUITOUS_ARP is not set
CONFIG_LWIP_GARP_TMR_INTERVAL=60			     |	CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32			     <
CONFIG_LWIP_NETIF_LOOPBACK=y				     |	# CONFIG_LWIP_NETIF_LOOPBACK is not set
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8			     <
CONFIG_LWIP_MAX_LISTENING_TCP=16			     |	CONFIG_LWIP_MAX_LISTENING_TCP=8
CONFIG_LWIP_TCP_MSS=1440				     |	CONFIG_LWIP_TCP_MSS=1460
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880			     |	CONFIG_LWIP_TCP_SND_BUF_DEFAULT=11680
CONFIG_LWIP_TCP_WND_DEFAULT=5760			     |	CONFIG_LWIP_TCP_WND_DEFAULT=10240
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6				     |	CONFIG_LWIP_TCP_RECVMBOX_SIZE=16
CONFIG_LWIP_MAX_UDP_PCBS=16				     |	CONFIG_LWIP_MAX_UDP_PCBS=4
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2048			     |	CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096
CONFIG_LWIP_MAX_RAW_PCBS=16				     |	CONFIG_LWIP_MAX_RAW_PCBS=4
# CONFIG_ESP_SHA is not set				     |	CONFIG_ESP_SHA=y
CONFIG_TCPIP_ADAPTER_GLOBAL_DATA_LINK_IRAM=y		     <
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y			     |	# CONFIG_OPTIMIZATION_LEVEL_DEBUG is not set
# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set		     |	CONFIG_OPTIMIZATION_LEVEL_RELEASE=y
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y		     |	# CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED is not set
# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set	     |	CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED=y
CONFIG_TASK_WDT=y					     |	# CONFIG_TASK_WDT is not set
CONFIG_TASK_WDT_PANIC=y					     <
CONFIG_ESP_GRATUITOUS_ARP=y				     |	# CONFIG_ESP_GRATUITOUS_ARP is not set
CONFIG_GARP_TMR_INTERVAL=60				     |	CONFIG_TCPIP_RECVMBOX_SIZE=64
CONFIG_TCPIP_RECVMBOX_SIZE=32				     <
CONFIG_TCP_MSS=1440					     |	CONFIG_TCP_MSS=1460
CONFIG_TCP_SND_BUF_DEFAULT=2880				     |	CONFIG_TCP_SND_BUF_DEFAULT=11680
CONFIG_TCP_WND_DEFAULT=5760				     |	CONFIG_TCP_WND_DEFAULT=10240
CONFIG_TCP_RECVMBOX_SIZE=6				     |	CONFIG_TCP_RECVMBOX_SIZE=16
CONFIG_TCPIP_TASK_STACK_SIZE=2048			     |	CONFIG_TCPIP_TASK_STACK_SIZE=4096

)
Thx

not booting

I have a problem running the latest firmware. It all builds up fine, flashing works fine, but after reboot I cannot find any new DAP wifi device. Also ping dap.local does not work.

Is there any way to debug this? Maybe via serial port messages, since I have no clue if it's booting/working or not.

Thanks!

自定义wifi连接,防止错连

能否出一个详细的教程,自定义WiFi名称与密码后,进行程序的编译,得到自定义固件(编译小白,恳请大佬解答)

No bootable app partions in the partion table

    运行python idf.py build & python idf.py flash monitor指令后报上述错误,monitor返回的信息如下所示。partion table选择的是Factory app, two OTA definitions,Partion table offset是0x8000。

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 5880, room 16 
tail 8
chksum 0x5f
load 0x3ffe8008, len 24, room 0 
tail 8
chksum 0xb6
load 0x3ffe8020, len 3320, room 0 
tail 8
chksum 0xf2
I (59) boot: ESP-IDF v3.4-dev-348-ga7677d6d 2nd stage bootloader
I (59) boot: compile time 16:54:22
I (68) qio_mode: Enabling default flash chip QIO
I (68) boot: SPI Speed      : 80MHz
I (74) boot: SPI Mode       : QIO
I (80) boot: SPI Flash Size : 4MB
I (86) boot: Partition Table:
I (92) boot: ## Label            Usage          Type ST Offset   Length
I (103) boot: End of partition table
E (110) boot: No bootable app partitions in the partition table
user code done

sdkconfig中有关去敏信息:外挂的Flash为W25Q32,Flash Size选择的是4MB,速度为80MHz,模式为QIO,bootloader offset为0x00。

wifi通用配置

建议wifi 先做广播,先进行wifi连接,然后进行wifi 密码设置,设置重启后,按配置的wifi进行连接(smartconfig)
使用个gpio进行wifi 重置,wifi广播

swo串口

大佬可以把串口加上吗?

关于ESP32C3的硬件复位nReset(GPIO05)

esp32c3的硬件复位似乎无效。
示波器无法看到nReset引脚被拉低。
板子用的是合宙的简约版开发板,esp32c3与被调试芯片用5根10cm的高温线连接,算上接触电阻不超过5Ω。
下载的3个固件均无法拉低nReset。
固件1:通过源码还原工程,编译并下载;
固件2:您这边提供的编译好的esp32c3固件文件夹,wireless_esp_dap_full.bin;
固件3:合宙编译好的soc
三个固件下载后,现象一致,使用elaphureLin,在keil5.35环境下,勾选Reset and Run。
被调试芯片选择stm32f103、stm32f107、gd32f407和air32f103,均可以找到被调试芯片,下载速度设为1M。
image
强制使用硬件复位选项,会提示RDDI-DAP Error,无法下载或擦除。
image
image
使用自动或软件复位,可以擦除下载程序,会提示RDDI-DAP Error,无法正常软复位,需要手动复位被调试芯片。
但是可以直接Debug被调试芯片,可完成擦除下载复位操作。
image

使用最新的SDK 编译成功后链接出错

97354@Kevincoooool MINGW32 ~/ESP8266_RTOS_SDK/wireless-esp8266-dap

make -j20

Toolchain path: /opt/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc
Toolchain version: crosstool-ng-1.22.0-92-g8facf4c0
Compiler version: 5.2.0
Python requirements from D:/AiThinkerIDE_V1.0/msys32/home/97354/ESP8266_RTOS_SDK/requirements.txt are satisfied.
LD build/esp8266_dap.elf
D:/AiThinkerIDE_V1.0/msys32/home/97354/ESP8266_RTOS_SDK/wireless-esp8266-dap/build/esp8266\libesp8266.a(startup.o):(.literal.user_init_entry+0x10): undefined reference to app_main' D:/AiThinkerIDE_V1.0/msys32/home/97354/ESP8266_RTOS_SDK/wireless-esp8266-dap/build/esp8266\libesp8266.a(startup.o): In function user_init_entry':
D:/AiThinkerIDE_V1.0/msys32/home/97354/ESP8266_RTOS_SDK/components/esp8266/source/startup.c:85: undefined reference to `app_main'
collect2.exe: error: ld returned 1 exit status
make: *** [D:\AiThinkerIDE_V1.0\msys32\home\97354\ESP8266_RTOS_SDK/make/project.mk:510:/home/97354/ESP8266_RTOS_SDK/wireless-esp8266-dap/build/esp8266_dap.elf] 错误 1

有关jtag调试无法启动

你好,我在win10系统+VSC平台上用PlatformIO插件对本项目进行二次开发时,想通过jtag调试器进行调试,但是却发现出现了错误。

The question about "RDDI-DAP Error"

连上设备后,第一次打开keil的调试器设置窗口,看到调试器连接成功
after connect to the DAP,The first time I open the keil debugger settings window, the debugger connection is successful.

第一次打开界面

然后关闭窗口,第二次打开设置窗口,显示如下错误
I close the setting window,and open it again,it show the error as the following picture:

第二次打开界面

之后无论开关几次,都显示上述错误。
The above error is displayed no matter how many times I turn it on and off.

请问应该如何解决?
How can I solve it?

python3 ./idf.py build出问题

esp-idf/main/libmain.a(main.c.obj):(.literal.mdns_setup+0x8): undefined reference to mdns_init' esp-idf/main/libmain.a(main.c.obj):(.literal.mdns_setup+0xc): undefined reference to mdns_hostname_set'
esp-idf/main/libmain.a(main.c.obj):(.literal.mdns_setup+0x10): undefined reference to mdns_instance_name_set' esp-idf/main/libmain.a(main.c.obj): In function mdns_setup':
/home/aloha/wireless-esp8266-dap/build/../main/main.c:51: undefined reference to mdns_init' /home/aloha/wireless-esp8266-dap/build/../main/main.c:58: undefined reference to mdns_hostname_set'
/home/aloha/wireless-esp8266-dap/build/../main/main.c:66: undefined reference to `mdns_instance_name_set'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

ESP32C3 SPI mode can't read the IDCODE

CLK<10Mhz, the Last version can work normally by elaphureLink.
image

CLK=10Mhz, can't read the IDCODE in the configration page.
image
I check the SPI clock is 40Mhz as expected, I doubt the speed should be to fast, then decrease into 10Mhz. Still can't read the ID.

非SWO串口

您好,我刚在Issue中发现了关于支持SWO串口的问题。请问是否有计划通过使用ESP8266的烧录串口(即UART0),并在PC端枚举一个虚拟串口设备来实现无线串口的调试呢?另外,我于2020/12/30日通过源码编译的固件在使用过程中会出现掉线情况(约运行10min后),在重新上电后又恢复正常,请问这种现象在新的固件中有解决吗?期待您的回复,谢谢。

Hello, I just found out about the SWO serial port support in Issue. Is it possible to implement a wireless debug serial port by using the burn-in serial port of ESP8266 (UART0) and enumerating a virtual serial device on the PC side? Also, the firmware I compiled by source code on 2020/12/30 will drop out during use (after about 10min of operation) and return to normal after re-powering, is there a solution for this phenomenon in the new firmware? look forward to your reply, thank you.

使用esp32c3编译遇到的问题

The idf.py in the project root directory is only applicable to the old ESP8266 target. Don’t use it in ESP32.
项目里提到不能用里面的这个idf.py,那应该怎么替换啊

亲爱的佬 云编译一直报错可以看看不

Run git clone https://github.com/espressif/esptool.git
Cloning into 'esptool'...
Traceback (most recent call last):
File "./esptool/esptool.py", line 34, in
import esptool
File "/home/runner/work/wireless-esp32c3-dap/wireless-esp32c3-dap/esptool/esptool/init.py", line 41, in
from esptool.bin_image import intel_hex_to_bin
File "/home/runner/work/wireless-esp32c3-dap/wireless-esp32c3-dap/esptool/esptool/bin_image.py", line 16, in
from intelhex import IntelHex
ModuleNotFoundError: No module named 'intelhex'
Error: Process completed with exit code 1.

ESP32 encounter "RDDI-DAP ERROR" and "SWD/JTAG Communication Failure"

description:
Target Keil can't communicate with ESP32.
image

Test Condition:
1.Keil version: 5.30
2.Usbip version: 0.36-dev
3.ESP32-s(Node ESP32-s) with IDF 4.3.2

Debug information:

  1. esp32 uart information:
    rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:1
    load:0x3fff0030,len:7564
    ho 0 tail 12 room 4
    load:0x40078000,len:15604
    load:0x40080400,len:4392
    entry 0x4008069c
    I (28) boot: ESP-IDF v4.3.2 2nd stage bootloader
    I (28) boot: compile time 00:32:47
    I (29) boot: chip revision: 1
    I (31) boot_comm: chip revision: 1, min. bootloader chip revision: 0
    I (38) qio_mode: Enabling default flash chip QIO
    I (44) boot.esp32: SPI Speed : 80MHz
    I (48) boot.esp32: SPI Mode : QIO
    I (53) boot.esp32: SPI Flash Size : 2MB
    I (57) boot: Enabling RNG early entropy source...
    I (63) boot: Partition Table:
    I (66) boot: ## Label Usage Type ST Offset Length
    I (74) boot: 0 nvs WiFi data 01 02 00009000 00006000
    I (81) boot: 1 phy_init RF data 01 01 0000f000 00001000
    I (89) boot: 2 factory factory app 00 00 00010000 00100000
    I (96) boot: End of partition table
    I (100) boot_comm: chip revision: 1, min. application chip revision: 0
    I (107) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=15aach ( 88748) map
    I (140) esp_image: segment 1: paddr=00025ad4 vaddr=3ffb0000 size=03e18h ( 15896) load
    I (146) esp_image: segment 2: paddr=000298f4 vaddr=40080000 size=06724h ( 26404) load
    I (155) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=7d31ch (512796) map
    I (296) esp_image: segment 4: paddr=000ad344 vaddr=40086724 size=11d1ch ( 72988) load
    I (320) esp_image: segment 5: paddr=000bf068 vaddr=50000000 size=00010h ( 16) load
    I (332) boot: Loaded app from partition at offset 0x10000
    I (333) boot: Disabling RNG early entropy source...
    I (344) cpu_start: Pro cpu up.
    I (344) cpu_start: Starting app cpu, entry point is 0x40081610
    I (0) cpu_start: App cpu up.
    I (358) cpu_start: Pro cpu start user code
    I (358) cpu_start: cpu freq: 240000000
    I (358) cpu_start: Application information:
    I (363) cpu_start: Project name: wireless_esp_dap
    I (369) cpu_start: App version: v0.2.0-2-g6650ac7-dirty
    I (375) cpu_start: Compile time: Sep 8 2022 00:32:19
    I (381) cpu_start: ELF file SHA256: 5e8086ad884c2b1b...
    I (387) cpu_start: ESP-IDF: v4.3.2
    I (392) heap_init: Initializing. RAM available for dynamic allocation:
    I (399) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
    I (405) heap_init: At 3FFB8750 len 000278B0 (158 KiB): DRAM
    I (411) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
    I (418) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
    I (424) heap_init: At 40098440 len 00007BC0 (30 KiB): IRAM
    I (431) spi_flash: detected chip: generic
    I (435) spi_flash: flash io: qio
    W (439) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
    I (453) cpu_start: Starting scheduler on PRO CPU.
    I (0) cpu_start: Starting scheduler on APP CPU.
    I (488) wifi:wifi driver task: 3ffc2340, prio:23, stack:6656, core=0
    I (488) system_api: Base MAC address is not set
    I (490) system_api: read default base MAC address from EFUSE
    I (498) wifi:wifi firmware version: eb52264
    I (500) wifi:wifi certification version: v7.0
    I (504) wifi:config NVS flash: enabled
    I (508) wifi:config nano formating: disabled
    I (512) wifi:Init data frame dynamic rx buffer num: 64
    I (517) wifi:Init management frame dynamic rx buffer num: 64
    I (522) wifi:Init management short buffer num: 32
    I (527) wifi:Init dynamic tx buffer num: 64
    I (531) wifi:Init static rx buffer size: 1600
    I (535) wifi:Init static rx buffer num: 16
    I (538) wifi:Init dynamic rx buffer num: 64
    I (543) wifi_init: rx ba win: 32
    I (546) wifi_init: tcpip mbox: 50
    I (550) wifi_init: udp mbox: 6
    I (554) wifi_init: tcp mbox: 6
    I (558) wifi_init: tcp tx win: 5744
    I (562) wifi_init: tcp rx win: 5744
    I (566) wifi_init: tcp mss: 1440
    I (570) wifi_init: WiFi IRAM OP enabled
    I (574) wifi_init: WiFi RX IRAM OP enabled
    I (579) wifi_init: LWIP IRAM OP enabled
    I (584) wifi:Set ps type: 0

I (587) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (675) wifi:mode : sta (9c:9c:1f:24:df:94)
I (675) wifi:enable tsf
Waiting for AP connection...
Disconnect reason : 201
Disconnect reason : 201
I (5977) wifi:new:<11,2>, old:<1,0>, ap:<255,255>, sta:<11,2>, prof:1
I (6433) wifi:state: init -> auth (b0)
I (6461) wifi:state: auth -> assoc (0)
I (6483) wifi:state: assoc -> run (10)
I (6503) wifi:connected with 222, aid = 2, channel 11, 40D, bssid = 7c:b5:9b:f6:a2:e9
I (6503) wifi:security: WPA2-PSK, phy: bgn, rssi: -28
I (6505) wifi:pm start, type: 0

W (6526) wifi:idx:0 (ifx:0, 7c:b5:9b:f6:a2:e9), tid:5, ssn:2, winSize:64
I (6529) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (7486) esp_netif_handlers: sta ip: 192.168.1.100, mask: 255.255.255.0, gw: 192.168.1.1
SYSTEM EVENT STA GOT IP : 192.168.1.100
Connected to AP
I (7490) server_common: mDNS hostname set to: [dap]
I (7495) server_common: mDNS instance name set to: [DAP mDNS]
I (7502) corsacOTA: start corsacOTA thread...
Socket created
Socket binded
Socket listening
W (24875) wifi:idx:1 (ifx:0, 7c:b5:9b:f6:a2:e9), tid:0, ssn:1, winSize:64
Socket accepted
Handling dev attach request...
Sending header...
Sending device info...

  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending only first part of CONFIG
  • GET 0x01 DEVICE DESCRIPTOR
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending only first part of CONFIG
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending ALL CONFIG
  • SET CONFIGURATION
  • GET 0x0F BOS DESCRIPTOR
  • GET MSOS 2.0 vendor-specific descriptor
    ** REQUESTED list of supported languages
  • GET STATUS
    recv failed: errno 104
    Shutting down socket and restarting...
    W (245653) wifi:idx:2 (ifx:0, 7c:b5:9b:f6:a2:e9), tid:2, ssn:1, winSize:64
    Socket accepted
    Handling dev attach request...
    Sending header...
    Sending device info...
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending only first part of CONFIG
  • GET 0x01 DEVICE DESCRIPTOR
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending only first part of CONFIG
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending ALL CONFIG
    recv failed: errno 104
    Shutting down socket and restarting...
    Socket accepted
    Handling dev attach request...
    Sending header...
    Sending device info...
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending only first part of CONFIG
  • GET 0x01 DEVICE DESCRIPTOR
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending only first part of CONFIG
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending ALL CONFIG
  • SET CONFIGURATION
  • GET 0x0F BOS DESCRIPTOR
  • GET MSOS 2.0 vendor-specific descriptor
    ** REQUESTED list of supported languages
  • GET STATUS
    recv failed: errno 104
    Shutting down socket and restarting...
    Socket accepted
    Handling dev attach request...
    Sending header...
    Sending device info...
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending only first part of CONFIG
  • GET 0x01 DEVICE DESCRIPTOR
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending only first part of CONFIG
  • GET 0x02 CONFIGURATION DESCRIPTOR
    Sending ALL CONFIG
  • SET CONFIGURATION
  • SET INTERFACE
  • GET 0x0F BOS DESCRIPTOR
  • GET MSOS 2.0 vendor-specific descriptor
    ** REQUESTED list of supported languages
  • GET STATUS
  1. target usb comm info:
    image

中文版wiki有误

实际在更改WiFi接入点时需要将接入点加入wifi_list而不是更改WIFI_SSID和WIFI_PASS字段

Some error codes

main.c L:71:
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
no PROTOCAL. 'A' to 'O', PROTOCOL is true.

build error:
[100%] Building C object CMakeFiles/esp8266_dap.elf.dir/project_elf_src.c.obj
[100%] Linking CXX executable esp8266_dap.elf
esp-idf/lwip/liblwip.a(sys_arch.c.obj):(.literal.sys_init+0x14): undefined reference to pthread_key_create' esp-idf/lwip/liblwip.a(sys_arch.c.obj):(.literal.sys_thread_sem_init+0x4): undefined reference to pthread_setspecific'
esp-idf/lwip/liblwip.a(sys_arch.c.obj):(.literal.sys_thread_sem_get+0x0): undefined reference to pthread_getspecific' esp-idf/lwip/liblwip.a(sys_arch.c.obj): In function sys_init':
C:/user/user/data/softwareAndData/ordinary/esp8266/esp32_msys2_toolchain/msys32/home/ESP8266_RTOS_SDK/components/lwip/port/esp8266/freertos/sys_ar
ch.c:446: undefined reference to pthread_key_create' esp-idf/lwip/liblwip.a(sys_arch.c.obj): In function sys_thread_sem_init':
C:/user/user/data/softwareAndData/ordinary/esp8266/esp32_msys2_toolchain/msys32/home/ESP8266_RTOS_SDK/components/lwip/port/esp8266/freertos/sys_ar
ch.c:533: undefined reference to pthread_setspecific' esp-idf/lwip/liblwip.a(sys_arch.c.obj): In function sys_thread_sem_get':
C:/user/user/data/softwareAndData/ordinary/esp8266/esp32_msys2_toolchain/msys32/home/ESP8266_RTOS_SDK/components/lwip/port/esp8266/freertos/sys_ar
ch.c:494: undefined reference to `pthread_getspecific'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/esp8266_dap.elf.dir/build.make:230:esp8266_dap.elf] 错误 1
make[1]: *** [CMakeFiles/Makefile2:2163:CMakeFiles/esp8266_dap.elf.dir/all] 错误 2
make: *** [Makefile:150:all] 错误 2
make failed with exit code 2

What should I do?

ESP32-C3FH4使用此固件WiFi信号很差.

使用ESP32-C3FH4设计了一块板,使用板载天线,如下图
捕获1
另外又购买了一块现成的ESP32-C3FH4开发板作参考,如下图
捕获2
以上两块板使用官方AT固件,WiFi信号都很好,而使用wireless dap的固件信号就很差,基本上只有在不超过10厘米的范围内才能连上热点,即使连上了在十多分钟的时间至少要掉线四五次.不知为何会如此?这真的是一个很奇怪的问题.
看了下sdkconfig文件的功率配置,是20,但是我不知道这个20指的是dbm还是设定值,如果是AT固件设定功率的话,存在一个设定值与实际值的对应关系,但很显然config文件与API显然是不同的.

OpenOCD连接失败

OpenOCD版本:Open On-Chip Debugger 0.11.0+dev-00571-g254883597-dirty (2022-02-15-15:05),自己拉仓库下来编译的。ST Link等支持完美。
OpenOCD连接语句:openocd.exe -f cmsis-dap.cfg,cmsis-dap.cfg内容为adapter driver cmsis-dap
连接的过程中就出错了,OpenOCD返回信息:

Open On-Chip Debugger 0.11.0+dev-00571-g254883597-dirty (2022-02-15-15:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Using CMSIS-DAPv2 interface with VID:PID=0xc251:0xf00a, serial=1234
# 上面这条信息出现后ESP8266就core panic了
Error: error writing data: Input/Output Error
Error: CMSIS-DAP command CMD_INFO failed.

串口返回的错误信息:

phy_version: 1163.0, 665d56c, Jun 24 2020, 10:00:08, RTOS new
I (301) wifi:pm stop
Waiting for AP connection...
I (1905) wifi:state: 0 -> 2 (b0)
I (1958) wifi:state: 2 -> 3 (0)
I (1962) wifi:state: 3 -> 5 (10)
I (1984) wifi:connected with AcmeTech, aid = 1, channel 6, HT20, bssid = 2a:76:93:4d:4e:76
SYSTEM EVENT STA GOT IP : 192.168.1.171
Connected to AP
Socket created
Socket binded
Socket listening
Socket accepted
# 到这里停住,等待usbip attach
Handling dev attach request...
Sending header...
Sending device info...
* GET 0x02 CONFIGURATION DESCRIPTOR
Sending only first part of CONFIG
* GET 0x01 DEVICE DESCRIPTOR
* GET 0x02 CONFIGURATION DESCRIPTOR
Sending only first part of CONFIG
* GET 0x02 CONFIGURATION DESCRIPTOR
Sending ALL CONFIG
* SET CONFIGURATION
* SET INTERFACE
* GET 0x0F BOS DESCRIPTOR
* GET MSOS 2.0 vendor-specific descriptor
** REQUESTED list of supported languages
* GET STATUS
** REQUESTED list of supported languages
** REQUESTED list of supported languages
# 到这里会停住,等待openocd连接
s2 handling cmd unlink...
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x4021f2db  PS      : 0x00000030  A0      : 0x40213d23  A1      : 0x3fffaeb0
A2      : 0x00000000  A3      : 0x3ffe906c  A4      : 0x00000204  A5      : 0xffffffff
A6      : 0x3fffaf38  A7      : 0x00000204  A8      : 0x3ffffff8  A9      : 0x3fffd824
A10     : 0x00000000  A11     : 0x00000000  A12     : 0x00000000  A13     : 0x3ffe9060
A14     : 0x00000000  A15     : 0x3fffaf34  SAR     : 0x00000000  EXCCAUSE: 0x0000001c
Backtrace: 0x4021f2db:0x3fffaeb0 0x40213d0f:0x3fffaee0

复现方法:

  1. 下载我编译好的openocd文件并解压
  2. 打开PowerShell,进入openocd/bin目录
  3. 用usbip连接上esp8266-wireless-dap
  4. 运行指令.\openocd.exe -f .\cmsis-dap.cfg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.