7
31
Fork
You've already forked blackmagic
23

WIP: Add target for the nRF5340 #2156

Draft
northernpaws wants to merge 2 commits from northernpaws/nrf5340 into main
pull from: northernpaws/nrf5340
merge into: blackmagic-debug:main
blackmagic-debug:main
blackmagic-debug:feature/bmda-remote-comms
blackmagic-debug:ALTracer/feature/aarch64-ident
blackmagic-debug:feature/better-meson-optimisation-handling
blackmagic-debug:feature/am335x-support
blackmagic-debug:feature/esp32-c3-support
blackmagic-debug:feature/cortex-ar-software-breakpoints
blackmagic-debug:feature/unit-testing
blackmagic-debug:feature/windows-usb-serial-interface-naming
blackmagic-debug:fix/bmp-external-spi
blackmagic-debug:ALTracer/feature/bluepillplus-platform
blackmagic-debug:ALTracer/feature/at32f43x-unrdp
blackmagic-debug:feature/const-correctness
blackmagic-debug:ALTracer/feature/fault_handlers
blackmagic-debug:ALTracer/feature/hazard3-ice40-support
blackmagic-debug:fix/ci-cleanup
blackmagic-debug:ALTracer/fix/gdb-10-12-thread
blackmagic-debug:ALTracer/feature/blackpill-f4-adc
blackmagic-debug:ALTracer/fix/cortex-desc-allocfail-report
blackmagic-debug:ALTracer/feature/spi-perf
blackmagic-debug:ALTracer/feature/calibrate_swd
blackmagic-debug:ALTracer/feature/blank-check
blackmagic-debug:feature/avr
blackmagic-debug:v2.0
blackmagic-debug:v1.9
blackmagic-debug:v1.10
blackmagic-debug:v1.8
northernpaws commented 2025年10月29日 04:15:14 +01:00 (Migrated from github.com)
Copy link

Detailed description

  • Adds a target for handling both cores of the nRF5340
  • Detects which cores (application & network) are online/offline
  • Handles detecting if cores are protected and need to be mass-erased to unlock

I've started adding target support for the nRF5340. Following discussions in #1779, this includes support for detecting if the cores are protected or unprotected, and detecting if the network core is offline and powering it on once the application core is unprotected.

Your checklist for this pull request

Closing issues

fixes #1779

TODO

  • Implement mass-erasing for unprotecting the cores
  • Add the flash and memory layout to the target
  • Add target command to bring the network core online if the application core is unprotected
<!-- Filling this template is mandatory --> ## Detailed description * Adds a target for handling both cores of the nRF5340 * Detects which cores (application & network) are online/offline * Handles detecting if cores are protected and need to be mass-erased to unlock I've started adding target support for the nRF5340. Following discussions in #1779, this includes support for detecting if the cores are protected or unprotected, and detecting if the network core is offline and powering it on once the application core is unprotected. ## Your checklist for this pull request * [x] I've read the [Code of Conduct](https://github.com/blackmagic-debug/blackmagic/blob/main/CODE_OF_CONDUCT.md) * [x] I've read the [guidelines for contributing](https://github.com/blackmagic-debug/blackmagic/blob/main/CONTRIBUTING.md) to this repository * [x] It builds for hardware native (see [Building the firmware](https://github.com/blackmagic-debug/blackmagic?tab=readme-ov-file#building-black-magic-debug-firmware)) * [x] It builds as BMDA (see [Building the BMDA](https://github.com/blackmagic-debug/blackmagic?tab=readme-ov-file#building-black-magic-debug-app)) * [x] I've tested it to the best of my ability * [x] My commit messages provide a useful short description of what the commits do ## Closing issues fixes #1779 ## TODO * [ ] Implement mass-erasing for unprotecting the cores * [ ] Add the flash and memory layout to the target * [ ] Add target command to bring the network core online if the application core is unprotected

Accidentally marked as ready for review and don't see the button to undo that - apologies; we are aware it's not actually ready yet, so just leave a message in the comments when you are ready for it to actually be ready for review.

Accidentally marked as ready for review and don't see the button to undo that - apologies; we are aware it's not actually ready yet, so just leave a message in the comments when you are ready for it to actually be ready for review.
northernpaws commented 2025年10月29日 08:55:59 +01:00 (Migrated from github.com)
Copy link

Accidentally marked as ready for review and don't see the button to undo that - apologies; we are aware it's not actually ready yet, so just leave a message in the comments when you are ready for it to actually be ready for review.

No worries, I was able to switch it back to a draft 😄

> Accidentally marked as ready for review and don't see the button to undo that - apologies; we are aware it's not actually ready yet, so just leave a message in the comments when you are ready for it to actually be ready for review. No worries, I was able to switch it back to a draft 😄
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin northernpaws/nrf5340:northernpaws/nrf5340
git switch northernpaws/nrf5340
Sign in to join this conversation.
No reviewers
Labels
Clear labels
BMD App
Black Magic Debug App (aka. PC hosted) (not firmware)
BMP Firmware
Black Magic Probe Firmware (not PC hosted software)
Bug
Confirmed bug
Build system
Build system
Can't reproduce
Maintainers can't reproduce this problem
CI
Continuous Integration System
Contribution wanted
User contributions welcome
Documentation
Project documentation
Draft
Work in progress draft
Duplicate
This issue or pull request already exists
Enhancement
General project improvement
Feedback wanted
Requires additional submitter feedback
Foreign Host Board
Non Native hardware to runing Black Magic firmware on
GDB
Issue/PR related to GDB
Good first issue
Good for newcommers
HwIssue Mitigation
Solving or mitigating a Hardware issue in Software
Information Needed
Maintainers need more information
NativeHardware
Official Black Magic Debug Hardware
New Host Board
New hardware to run Black Magic firmware on
New Target
New debug target
Off Topic
Something that does not involve the project in any way
Potential Bug
A potential, unconfirmed or very special circumstance bug
Regression
Bug caused by a regression
User Interest Needed
More user interest required before consideration
User Testing Needed
Looking for user testing reports
Won't fix
Outside of the project scope or works as intended
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
blackmagic-debug/blackmagic!2156
Reference in a new issue
blackmagic-debug/blackmagic
No description provided.
Delete branch "northernpaws/nrf5340"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?