Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Contributing
============
# Contributing

We appreciate your contributions! Because this is an open source project, we want to keep it as easy
as possible to contribute changes. However, we need contributors to follow a few guidelines.

By contributing to pyOCD you agree to the [Code of Conduct](CODE_OF_CONDUCT.md).


## Coding style

Contributed source code must follow [PEP8](https://www.python.org/dev/peps/pep-0008/) style
Expand All @@ -17,13 +15,13 @@ annotations, static type checking isn't actual performed by CI. Also, it is perf
the errant module.

Other formatting requirements:

- 4 space indents, no tabs are allowed.
- No trailing whitespace.
- All source files must end with a newline (an empty line at the end).
- Lines should generally not be longer than 120 characters, though this is not a hard rule. Overall readability
is more important.


## Process

Before you submit your changes, please ensure that:
Expand All @@ -43,7 +41,6 @@ The [developers' guide](docs/developers_guide.md) describes how to create your d
environment. The [automated tests guide](docs/automated_tests.md) provides information about the
available types of tests and describes how to run the tests.


## License

By creating a pull request on GitHub asking to merge your content into pyOCD, you agree to the [Developer Certificate of
Expand All @@ -63,5 +60,3 @@ case must be considered individually. If you are the owner of the source code, t
relicense to Apache 2.0. The most important thing is that the license is compatible with Apache 2.0. Examples
are MIT, the BSD licenses, and similar. GPL-licensed code is expressly disallowed to be contributed, as the
GPL is not compatible with Apache 2.0 (or any of the Apache-compatible licenses).


11 changes: 7 additions & 4 deletions pyocd/target/pack/pack_target.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# pyOCD debugger
# Copyright (c) 2017-2020 Arm Limited
# Copyright (c) 2021-2022 Chris Reed
# Copyright (c) 2025 Morten Engelhardt Olsen
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -510,8 +511,12 @@ def is_reset_sequence_enabled(name: str) -> bool:
@staticmethod
def _pack_target_add_core(_self, core: CoreTarget) -> None:
"""@brief Override to set node name of added core to its pname."""
pname = _self._pack_device.processors_ap_map[cast(CortexM, core).ap.address].name
core.node_name = pname
try:
pname = _self._pack_device.processors_ap_map[cast(CortexM, core).ap.address].name
core.node_name = pname
except KeyError:
LOG.info("No pname found for core #%d", core.core_number)
core.node_name = cast(CortexM, core).architecture.name
CoreSightTarget.add_core(_self, core)

@staticmethod
Expand Down Expand Up @@ -646,5 +651,3 @@ def collect_target_type(dev: CmsisPackDevice) -> None:
(target_name.lower() == dev.part_number.lower())
for dev in ManagedPacks.get_installed_targets()
)