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

doc: ap-protect: edit nrfjprog to nrfutil #19913

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

greg-fer
Copy link
Contributor

Changed nrfjprog commands to nrfutil in the AP-Protect documentation. NCSDK-30148.

@greg-fer greg-fer added CI-disable Disable CI for this PR doc only labels Jan 15, 2025
@greg-fer greg-fer added this to the 3.0.0 milestone Jan 15, 2025
@greg-fer greg-fer requested a review from a team as a code owner January 15, 2025 09:02
@github-actions github-actions bot added doc-required PR must not be merged without tech writer approval. changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Jan 15, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jan 15, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 5

Inputs:

Sources:

more details

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (0)

Outputs:

Toolchain

Version:
Build docker image:

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain
  • ◻️ Build twister
  • ◻️ Integration tests

Note: This message is automatically posted and updated by the CI

@greg-fer greg-fer force-pushed the doc_approtect_nrfutil_commands branch from 76baa95 to a8a0817 Compare January 15, 2025 09:08
@greg-fer greg-fer requested a review from a team as a code owner January 15, 2025 09:08
@github-actions github-actions bot removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jan 15, 2025
@greg-fer greg-fer requested review from bjorgan and a team January 15, 2025 09:16
@greg-fer greg-fer force-pushed the doc_approtect_nrfutil_commands branch from a8a0817 to 1aae4b3 Compare January 15, 2025 09:21
@greg-fer greg-fer requested a review from peknis January 15, 2025 09:21
@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link.

Note: This comment is automatically posted by the Documentation Publish GitHub Action.

@greg-fer greg-fer removed the request for review from a team January 15, 2025 11:34
@greg-fer greg-fer added the DNM label Jan 15, 2025

.. note::
|nrfjprog_deprecation_note|
nrfutil device protection-set All
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To lock both the network core and application core in nrf53, you actually have to do both:
nrfutil device protection-set All --core Network
nrfutil device protection-set All

And in this order.

This is the same with nrfjprog, but I think that this should be updated in here.


.. note::
|nrfjprog_deprecation_note|
nrfutil device protection-set All
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With nrf54l15 (using my nRF54L15-PDK):

nrfutil device protection-set All

Fails with: [Probe] Device error: Unknown device: Unknown part number 0x0000001c and revision 0x00000001 , code: Generic

Debugger can be connected after this.

nrfjprog --rbp ALL also fails, but the debugger cannot be connected after that.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarkusLassila: Which version is this? (nrfutil device --version)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nrfutil-device 2.3.6 (20652ac 2024-05-30)
commit-hash: 20652ac7e517947958af060dcb956b9de5fe5456
commit-date: 2024-05-30
host: x86_64-unknown-linux-gnu
build-timestamp: 2024-05-30T11:22:59.088218653Z
classification: nrf-external

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evenl , @bjorgan , @Tiwalun , would you know what the issue might be? Could it be related to Markus using a PDK, not a DK?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too old version, I think. The version (2.3.6) also sounds like the latest on the old package index, so needs an upgrade of nrfutil itself as well.

@MarkusLassila: Could you run nrfutil self-upgrade and nrfutil upgrade device and try again?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nrfutil device --version

nrfutil-device 2.7.11 (7005884 2025-01-15)
commit-hash: 70058847a6226212a758c274d19aa8f95dc23cdc
commit-date: 2025-01-15
host: x86_64-unknown-linux-gnu
build-timestamp: 2025-01-16T09:13:44.207691632Z
classification: nrf-external

Detected SEGGER J-Link version: JLink_V7.94i

nrfutil device protection-set All
❌ Failed to set protection on 1057792717, [Probe] Device error: Memory access error at 0x00ffd000. Probably a memory prot
Error: One or more set protection tasks failed:

  • 1057792717: [Probe] Device error: Memory access error at 0x00ffd000. Probably a memory protection issue. Probe access is Secure, code: Generic

nrfutil device protection-set SecureRegions
✔️ Protection was set on 1057792717

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, that was disappointing. Sounds like a bug, thanks for discovering this.

I'll contact Markus directly about this so that I don't spam down the PR review with debugging questions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can reproduce the Memory access error at 0x00ffd000 error if I try to run nrfutil device protection-set All after flashing an application to the nRF54L15. The command works if nrfutil device recover is run before protection-set All

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failure seemed to be specific for TF-M builds (/NS) for regular builds, it seemed to work.

@greg-fer greg-fer force-pushed the doc_approtect_nrfutil_commands branch from 1aae4b3 to 340882e Compare January 17, 2025 09:48
Changed nrfjprog commands to nrfutil in the AP-Protect documentation.
NCSDK-30148.

Signed-off-by: Grzegorz Ferenc <[email protected]>
@greg-fer greg-fer force-pushed the doc_approtect_nrfutil_commands branch from 340882e to 680155e Compare January 17, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-disable Disable CI for this PR DNM doc only doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants