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

WIP: nrf5340 support #1656

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
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
5 changes: 5 additions & 0 deletions docs/builtin-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,11 @@ title: Built-in targets
<td>NRF52840</td>
</tr>

<tr><td><code>nrf53</code></td>
<td>Nordic Semiconductor</td>
<td>NRF5340</td>
</tr>

<tr><td><code>nrf91</code></td>
<td>Nordic Semiconductor</td>
<td>NRF9160</td>
Expand Down
1 change: 1 addition & 0 deletions pyocd/core/memory_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ class FlashRegion(MemoryRegion):
'erased_byte_value': 0xff,
'access': 'rx', # By default flash is not writable.
'are_erased_sectors_readable': True,
'core_index': 0, # Core to be used to access this region
})

_algo: Optional[Dict[str, Any]]
Expand Down
4 changes: 2 additions & 2 deletions pyocd/coresight/coresight_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@ def create_flash(self) -> None:
argspec = getfullargspec(klass.__init__)
if 'flash_algo' in argspec.args:
if region.algo is not None:
obj = klass(self, region.algo)
obj = klass(self._cores[region.core_index], region.algo)
else:
LOG.warning("flash region '%s' has no flash algo" % region.name)
continue
else:
obj = klass(self) # type:ignore
obj = klass(self._cores[region.core_index]) # type:ignore

# Set the region in the flash instance.
obj.region = region
Expand Down
Loading
Loading