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

cortex_test fails on DISCO_L475VG_IOT01A device #581

Closed
studavekar opened this issue Mar 18, 2019 · 2 comments · Fixed by #595
Closed

cortex_test fails on DISCO_L475VG_IOT01A device #581

studavekar opened this issue Mar 18, 2019 · 2 comments · Fixed by #595
Assignees

Comments

@studavekar
Copy link
Collaborator

pyocd version : 0.18.0

Device : DISCO_L475VG_IOT01A

pyocd.yaml

probes:
  0666FF555051897267232812: # Probe's unique ID.
    target_override:  stm32l475xg
    test_binary:      stm32l475vg_iot01a.bin

Test command

python cortex_test.py

Linux

    ------ Testing Invalid Memory Access Recovery ------
    reading 0x1000 bytes at invalid address 0x3e000000
    failed to get expected fault
    reading 0x1000 bytes at invalid address 0x3e000001
    failed to get expected fault
    writing 0x00001000 bytes at invalid address 0x3e000000
    failed to get expected fault!
    writing 0x00001000 bytes at invalid address 0x3e000001
    failed to get expected fault!
    r/w 0x00000502 bytes at 0x20000000
    Aligned access pass
    r/w 0x00000502 bytes at 0x20000001
    Unaligned access pass
    TEST FAILED

Windows

------ Testing Invalid Memory Access Recovery ------
reading 0x1000 bytes at invalid address 0x3e000000
  got expected error: SWD/JTAG Transfer Fault @ 0x3e000000-0x3e0007ff
reading 0x1000 bytes at invalid address 0x3e000001
Traceback (most recent call last):
  File "cortex_test.py", line 537, in <module>
    cortex_test(None)
  File "cortex_test.py", line 392, in cortex_test
    target.read_memory_block8(addr_invalid + 1, 0x1000)
  File "C:\repos\pyOCD\pyocd\core\coresight_target.py", line 255, in read_memory_block8
    return self.selected_core.read_memory_block8(addr, size)
  File "C:\repos\pyOCD\pyocd\coresight\cortex_m.py", line 620, in read_memory_block8
    data = self.ap.read_memory_block8(addr, size)
  File "C:\repos\pyOCD\pyocd\core\memory_interface.py", line 73, in read_memory_block8
    mem = self.read8(addr)
  File "C:\repos\pyOCD\pyocd\core\memory_interface.py", line 64, in read8
    return self.read_memory(addr, 8, now)
  File "C:\repos\pyOCD\pyocd\probe\stlink_probe.py", line 290, in read_memory
    six.raise_from(self._convert_exception(exc), exc)
  File "C:\repos\pyOCD\venv\lib\site-packages\six-1.12.0-py2.7.egg\six.py", line 737, in raise_from
    raise value
pyocd.core.exceptions.ProbeError: STLink error (24): AP WDATA error
@flit flit added the backlog label Mar 21, 2019
@flit
Copy link
Member

flit commented Mar 21, 2019

I'm able to reproduce this failure. It only happens on new STLink firmware versions. I previously had V2J28 (current version as of when I first implemented STLink support) installed on my L475 board and the test passed. Updating to V2J33 causes this failure.

Strangely, I see the same failure on Linux (Ubuntu 18.04.2 LTS) as on Windows instead of the different failures you reported.

@studavekar
Copy link
Collaborator Author

Strangely, I see the same failure on Linux (Ubuntu 18.04.2 LTS) as on Windows instead of the different failures you reported.

it might be ubuntu version I have Ubuntu 16.04.2 LTS


------ Testing Invalid Memory Access Recovery ------
reading 0x1000 bytes at invalid address 0x3e000000
  got expected error: SWD/JTAG Transfer Fault @ 0x3e000000-0x3e0007ff
reading 0x1000 bytes at invalid address 0x3e000001
Traceback (most recent call last):
  File "cortex_test.py", line 537, in <module>
    cortex_test(None)
  File "cortex_test.py", line 392, in cortex_test
    target.read_memory_block8(addr_invalid + 1, 0x1000)
  File "/home/arm/repo/pyOCD/pyocd/core/coresight_target.py", line 266, in read_memory_block8
    return self.selected_core.read_memory_block8(addr, size)
  File "/home/arm/repo/pyOCD/pyocd/coresight/cortex_m.py", line 620, in read_memory_block8
    data = self.ap.read_memory_block8(addr, size)
  File "/home/arm/repo/pyOCD/pyocd/core/memory_interface.py", line 73, in read_memory_block8
    mem = self.read8(addr)
  File "/home/arm/repo/pyOCD/pyocd/core/memory_interface.py", line 64, in read8
    return self.read_memory(addr, 8, now)
  File "/home/arm/repo/pyOCD/pyocd/probe/stlink_probe.py", line 290, in read_memory
    six.raise_from(self._convert_exception(exc), exc)
  File "/home/arm/repo/pyOCD/env/local/lib/python2.7/site-packages/six.py", line 737, in raise_from
    raise value
pyocd.core.exceptions.ProbeError: STLink error (24): AP WDATA error


(env) arm@austin-ci-linux-002:~/repo/pyOCD/test$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

@flit flit mentioned this issue Mar 27, 2019
@flit flit self-assigned this Mar 27, 2019
@flit flit added in progress and removed backlog labels Mar 27, 2019
@flit flit closed this as completed in #595 Mar 27, 2019
@flit flit removed the in progress label Mar 27, 2019
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

Successfully merging a pull request may close this issue.

2 participants