wireless-esp8266-dap icon indicating copy to clipboard operation
wireless-esp8266-dap copied to clipboard

pyocd does not detect debug probe

Open AILIFE4798 opened this issue 6 months ago • 22 comments

esp8266 version worked just fine with usbip on keil i can upload and debug but i want to erase flash to unlock readout protection with pyocd but it does not detect the debug probe image

AILIFE4798 avatar Jan 22 '24 17:01 AILIFE4798

Hi, @AILIFE4798 ,

I haven't tested pyocd. Can the device be detected if you use openocd?

windowsair avatar Jan 23 '24 01:01 windowsair

idk how to use openocd , and it does not support the mm32spin05pf mcu i need it for the device is detected in device manager correctly like in the readme image

AILIFE4798 avatar Jan 23 '24 11:01 AILIFE4798

If possible, could you provide more information about pyocd, such as the version you're using and related commands?

windowsair avatar Jan 23 '24 11:01 windowsair

i installed the latest pyocd with pip just install python first (ofcourse) then use pip install pyocd(vpn needed) then to check the available debug probe use pyocd list -p it should show the probes like this image

AILIFE4798 avatar Jan 23 '24 11:01 AILIFE4798

I have reproduced the problem. It may take some time to adapt pyocd :)

windowsair avatar Jan 25 '24 03:01 windowsair

try this firmware

https://github.com/windowsair/wireless-esp8266-dap/actions/runs/7656753399

windowsair avatar Jan 26 '24 01:01 windowsair

need change wifi credentials ssid:AILIFE_SmartHome_2.4G password:43214321 because i cannot build my self

AILIFE4798 avatar Jan 26 '24 13:01 AILIFE4798

ota also does not work

AILIFE4798 avatar Jan 26 '24 13:01 AILIFE4798

Some of pyocd's usb operations don't seem to be well adapted. It may take a while to fix this.

windowsair avatar Jan 26 '24 14:01 windowsair

ok

AILIFE4798 avatar Jan 26 '24 14:01 AILIFE4798

Hello, you can try the latest code in the master branch. I've done a simple test using pyocd :)

windowsair avatar Feb 16 '24 11:02 windowsair

i have tried to use latest firmware it can detect the probe now but cannot erase or flash when a target is connected correctly it says no ack received and when i didnt connect target it says unexpected ack value 0 image and there is suvior bug idk in where cuz when i first tried this i connected the swd line wrong and when i run erase command it hangs for 30 second and entire windows os crashed with blue screen it hapenned 2 times but it is not consistant i cannot reproduce it

AILIFE4798 avatar Mar 08 '24 14:03 AILIFE4798

Sometimes usbip can cause BSOD. For your device, is it always unable to erase?

windowsair avatar Mar 10 '24 08:03 windowsair

yes always hangs for a long time then says no ack received

AILIFE4798 avatar Mar 10 '24 09:03 AILIFE4798

usb ip on windows is really not easy maybe better way is to upload hex or bin file via a website and itll get flashed to device or maybe gdb server via wifi

AILIFE4798 avatar Mar 10 '24 09:03 AILIFE4798

Well, I don't have too many chips to test. Looks like you have mm32 and gd32 boards? If you use the gd32, will it work?

windowsair avatar Mar 10 '24 12:03 windowsair

it is doing something this time image

AILIFE4798 avatar Mar 10 '24 14:03 AILIFE4798

also tested on stm32f103 the single most common and most cloned chip it did not work either image

AILIFE4798 avatar Mar 10 '24 15:03 AILIFE4798

It's weird. looks like the behavior is the same between the different chips. I tested it on stm32f103rc and it work well :( I'll try c8 later.

windowsair avatar Mar 11 '24 02:03 windowsair

dont have a f103rc now or actually i do have one but it is locked and i want to keep it

AILIFE4798 avatar Mar 11 '24 03:03 AILIFE4798

okay i found some problem. we should use 10MHz speed when we use esp8266.

pyocd erase -t stm32f103c8 --chip --frequency=10000000

windowsair avatar Mar 11 '24 12:03 windowsair

ok it seems to work now i wished i have this earlier so i do not need to spend a day to solder serial wire to mcu and flash it that way image

AILIFE4798 avatar Mar 11 '24 15:03 AILIFE4798