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

Unable to flash/erase TM4C129x MCUs #1678

Open
kajusK opened this issue Mar 12, 2024 · 0 comments
Open

Unable to flash/erase TM4C129x MCUs #1678

kajusK opened this issue Mar 12, 2024 · 0 comments

Comments

@kajusK
Copy link

kajusK commented Mar 12, 2024

When trying to erase the tiva MCU, the pyocd fails.

Environment:
MCU: TM4C129DNCPDT
Debugger: tested with J-Link and Orbtrace
Pyocd version: 0.36.0
Pack: Keil.TM4C_DFP 1.1.0
OS: Windows 10 Pro
Command: pyocd erase --mass -t tm4c129dncpdt -vv, most other (flash,...) commands fail in a same way

Error log

...
0017665 D Running task create_cores [sequencer]
0017665 D Creating SCS component [discovery]
0017665 D selected core #0 [soc_target]
0017686 I CPU core #0: Cortex-M4 r0p1, v7.0-M architecture [cortex_m]
0017687 I   Extensions: [DSP, FPU, FPU_V4, MPU] [cortex_m]
0017688 I   FPU present: FPv4-SP-D16-M [cortex_m]
0017698 D Creating SCS component [discovery]
0017700 D uninit session <pyocd.core.session.Session object at 0x0000018153FD3A10> [session]
0017728 C Error: <APv1Address@0x18154b57ad0 #1 dp=0> [__main__]
Traceback (most recent call last):
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\__main__.py", line 161, in run
    status = cmd.invoke()
             ^^^^^^^^^^^^
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\subcommands\erase_cmd.py", line 94, in invoke
    with session:
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\core\session.py", line 415, in __enter__
    self.open()
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\core\session.py", line 553, in open
    self._board.init()
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\board\board.py", line 143, in init
    self.target.init()
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\coresight\coresight_target.py", line 123, in init
    super().init()
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\core\soc_target.py", line 174, in init
    seq.invoke()
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\utility\sequencer.py", line 213, in invoke
    resultSequence.invoke()
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\utility\sequencer.py", line 208, in invoke
    resultSequence = call()
                     ^^^^^^
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\coresight\discovery.py", line 63, in _create_cores
    self._apply_to_all_components(self._create_component,
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\coresight\discovery.py", line 74, in _apply_to_all_components
    ap.rom_table.for_each(action, filter)
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\coresight\rom_table.py", line 338, in for_each
    action(component)
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\coresight\discovery.py", line 56, in _create_component
    cmp = cmpid.factory(cmpid.ap, cmpid, cmpid.address)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\coresight\cortex_m.py", line 222, in factory
    root.add_core(core)
  File "C:\Users\JakubKaderka\AppData\Roaming\Python\Python311\site-packages\pyocd\target\pack\pack_target.py", line 513, in _pack_target_add_core
    pname = _self._pack_device.processors_ap_map[cast(CortexM, core).ap.address].name
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: <APv1Address@0x18154b57ad0 #1 dp=0>

I'm wondering, what is the problem, the J-Link works well with original software in this setup, the pyocd always fails.

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

1 participant