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

Regression: "target was not halted as expected..." - for pyocd 0.36 versions #1695

Open
prosper00 opened this issue May 16, 2024 · 1 comment

Comments

@prosper00
Copy link

prosper00 commented May 16, 2024

I've recently noticed some issues with 0.36 release (also the 0.36-dev) series. Reverting to an earlier version of pyocd (in this case, 0.35-dev), and everything flashes (and functions) as expected.

[the pyocd.yaml file specifies the .pack to use, I'm using the one from https://github.com/IOsetting/hk32f030m-template/tree/main/Misc]

Also see #1646

~/Embedded/HK32F030M-base/Projects/blink$ python3 -m pipx install git+https://github.com/pyocd/pyOCD.git
  installed package pyocd 0.36.1.dev2, installed using Python 3.11.9
  These apps are now globally available
    - pyocd
    - pyocd-gdbserver
done! ✨ 🌟 ✨
~/Embedded/HK32F030M-base/Projects/blink$ make flash
pyocd erase -c -t hk32f030mf4p6 --config ./Misc/pyocd.yaml
0001218 I Erasing chip... [eraser]
0001580 I Chip erase complete [eraser]
pyocd load ./Build/blink.hex -t hk32f030mf4p6 --config ./Misc/pyocd.yaml
0001203 I Loading /home/bdroy/Embedded/HK32F030M-base/Projects/blink/Build/blink.hex [load_cmd]
0001339 W T bit in XPSR is invalid; the vector table may be invalid or corrupt [cortex_m]
0001417 C target was not halted as expected after calling flash algorithm routine (IPSR=3) [__main__]
make: *** [rules.mk:117: flash] Error 1
~/Embedded/HK32F030M-base/Projects/blink$ pipx uninstall pyocd
uninstalled pyocd! ✨ 🌟 ✨
bdroy@bigfart:~/Embedded/HK32F030M-base/Projects/blink$ python3 -m pipx install git+https://github.com/pyocd/pyOCD.git@develop
  installed package pyocd 0.35.2.dev28, installed using Python 3.11.9
  These apps are now globally available
    - pyocd
    - pyocd-gdbserver
done! ✨ 🌟 ✨
~/Embedded/HK32F030M-base/Projects/blink$ make flash
pyocd erase -c -t hk32f030mf4p6 --config ./Misc/pyocd.yaml
0001192 I Erasing chip... [eraser]
0001559 I Chip erase complete [eraser]
pyocd load ./Build/blink.hex -t hk32f030mf4p6 --config ./Misc/pyocd.yaml
0001213 I Loading /home/bdroy/Embedded/HK32F030M-base/Projects/blink/Build/blink.hex [load_cmd]
[==================================================] 100%
0004799 I Erased 1920 bytes (15 sectors), programmed 1920 bytes (15 pages), skipped 0 bytes (0 pages) at 0.52 kB/s [loader]
@omegat
Copy link

omegat commented Oct 6, 2024

Hi,

I too have problems with 0.36:

0.36:

PS D:[...]> pyocd erase --chip -t stm32l071cbtx
0001057 I Erasing chip... [eraser]
0001181 W T bit in XPSR is invalid; the vector table may be invalid or corrupt [cortex_m]
0001209 C target was not halted as expected after calling flash algorithm routine (IPSR=3) [main]

0.35.1 (same HW, did not even unplug the DAPlink):

PS D:[...]> pip uninstall pyocd
Found existing installation: pyocd 0.36.0
Uninstalling pyocd-0.36.0:
Would remove:
c:\users\t\appdata\local\programs\python\python310\lib\site-packages\pyocd-0.36.0.dist-info*
c:\users\t\appdata\local\programs\python\python310\lib\site-packages\pyocd*
c:\users\t\appdata\local\programs\python\python310\scripts\pyocd-gdbserver.exe
c:\users\t\appdata\local\programs\python\python310\scripts\pyocd.exe
Proceed (Y/n)? y
Successfully uninstalled pyocd-0.36.0
PS D:[...]> pip install pyocd==0.35.1
[... ... ...]
Successfully installed pyocd-0.35.1
PS D:[...]> pyocd --version
0.35.1
PS D:[...]> pyocd erase --chip -t stm32l071cbtx
0002000 I Erasing chip... [eraser]
0002494 I Erasing sector 0x08000000 (128 bytes) [eraser]
0002634 I Erasing sector 0x08000080 (128 bytes) [eraser]
0002774 I Erasing sector 0x08000100 (128 bytes) [eraser]
[... ... ...]

So there definitely is an issue. I updated the pack to the current version (2.3.0?) which didn't fix the issue.
The MCU is obviously a STM32L071CBT6 (Cortex M0+)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants