pyocd / pyocd/pyOCD

nRF5340 net core flash issue

Open
#1,357 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
560
Avg merge
1h 41m
Merged PRs (30d)
3

Description

I am doing some trials with PyOCD + DAP link (probe is Max32625PICO) with the dual core nRF5340. I installed the pack nrf5340_xxaa.
Flashing the APP core is no issue and everything goes well. But when trying to flash the NET core I get :
Failed to add data chunk: no memory region defined for address 0x01000000 [file_programmer]

I dived a bit in the device pack and the parser and found out the ROM region for NET core is beeing removed and not replaced by a FLASH region as it should (And as it does for the APP core)
NET:
image
APP:
image

(For a clearer view, I splitted nrf5340_xxaa into nrf5340_xxaa_APP and nrf5340_xxaa_NET in the pdsc file of the device pack but results are the same with original pdsc)

Problem seems to be in _split_flash_region_by_sector_size() where we do start = region.start + offset and start ends up equal end and as a result the FLASH region is not added. Changing this line then gives an error about the NET core RAM region:
pyocd.core.exceptions.TransferFaultError: Memory transfer fault @ 0x21000200-0x210003ff

  • Is nRF5340 really fully supported by PyOCD ?
  • If yes, what am I doing wrong ?

Thank you !

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with _split_flash_region_by_sector_size() and reproduce the file_programmer failure while flashing the nRF5340 NET core with the nrf5340_xxaa pack. Trace why the NET FLASH region is not added and investigate the subsequent RAM transfer fault at 0x21000200-0x210003ff. Done means the NET core can be flashed successfully without either error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.