pyOCD icon indicating copy to clipboard operation
pyOCD copied to clipboard

nRF5340 net core flash issue

Open bastreynard opened this issue 2 years ago • 3 comments

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 !

bastreynard avatar Mar 31 '22 10:03 bastreynard

I wonder about this issue too. The device pack exposes two devices, one with _APP suffix and the other with _NET, but pyocd lists just one device without suffix? And with that device it is possible to flash the APP cpu.

peterniebert avatar Jun 09 '22 06:06 peterniebert

Are there any updates? I also have the same issue.

GatCode avatar Mar 18 '23 10:03 GatCode

I'm working on it: https://github.com/pyocd/pyOCD/pull/1656

maxd-nordic avatar Jan 01 '24 15:01 maxd-nordic