Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyocd does not detect debug probe #68

Closed
AILIFE4798 opened this issue Jan 22, 2024 · 22 comments
Closed

pyocd does not detect debug probe #68

AILIFE4798 opened this issue Jan 22, 2024 · 22 comments
Labels
bug Something isn't working

Comments

@AILIFE4798
Copy link

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

@windowsair
Copy link
Owner

Hi, @AILIFE4798 ,

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

@AILIFE4798
Copy link
Author

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

@windowsair
Copy link
Owner

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

@windowsair windowsair added the bug Something isn't working label Jan 23, 2024
@AILIFE4798
Copy link
Author

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

@windowsair
Copy link
Owner

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

@windowsair
Copy link
Owner

@AILIFE4798
Copy link
Author

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

@AILIFE4798
Copy link
Author

ota also does not work

@windowsair
Copy link
Owner

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

@AILIFE4798
Copy link
Author

ok

@windowsair
Copy link
Owner

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

@windowsair windowsair pinned this issue Feb 16, 2024
@AILIFE4798
Copy link
Author

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

@windowsair
Copy link
Owner

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

@AILIFE4798
Copy link
Author

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

@AILIFE4798
Copy link
Author

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

@windowsair
Copy link
Owner

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?

@AILIFE4798
Copy link
Author

it is doing something this time
image

@AILIFE4798
Copy link
Author

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

@windowsair
Copy link
Owner

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.

@AILIFE4798
Copy link
Author

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

@windowsair
Copy link
Owner

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

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

@AILIFE4798
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants