target: add support for nRF54LM20A#1889
Conversation
8d30d96 to
7e4c19a
Compare
|
Can someone help me deal with PR as soon as possible? |
|
Why is there no response at all? I have already verified that this works on the nRF54LM20DK development board. Please, we really need this. |
|
Hi @StarSphere-1024, Apologies for the delay in reviewing this PR, and thank you for your contribution. Our current preference is to use CMSIS Packs for target support whenever possible, and we aim to keep new additions aligned with that approach. However, as Regarding the nRF54LM20 DK: I do not have access to this hardware for local validation, so I will rely on your confirmation that the implementation has been tested and works as expected on that device. |
|
Hi @TeoMahnic, Thank you for the review. I can confirm that I have successfully tested this implementation on the nRF54LM20 DK. Using the onboard J-Link, I was able to flash firmware via pyOCD. I've addressed the requested changes. Should I rebase to squash these commits? |
120920b to
89b37ec
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Hi @TeoMahnic I checked the codebase and found
Are you sure this attribute has been deprecated? |
|
Hi @StarSphere-1024, The There are currently some unrelated issues with functional tests in CI, but once you confirm that flashing works correctly we can proceed with merging this PR. |
This patch adds support for nRF54LM20A to pyOCD. Signed-off-by: Star Sphere <StarSphere@foxmail.com> Co-authored-by: Teo Mahnic <teo.mahnic@arm.com>
89b37ec to
518624c
Compare
|
Hi @TeoMahnic, Thanks for the clarification on begin_data. I've rebased onto the latest develop branch, removed the deprecated attribute, and confirmed that flashing works on the nRF54LM20 DK when the chip already has firmware. However, while testing with a J-Link probe, I hit a critical crash (Segmentation Fault) in pyocd/probe/jlink_probe.py that happens before the flash algorithm even runs. This looks like a pre-existing bug in the J-Link integration that affects other targets too, not just my new one. The Issue:When using a J-Link, pyOCD crashes immediately on connection: (Note: The same command works fine with CMSIS-DAP.) Root Cause:I traced this to two bugs in jlink_probe.py: The Fix:I verified these changes fix the crash and allow stable flashing on both empty and programmed chips: File: pyocd/probe/jlink_probe.py Fix 1: Close the temporary JLink instance @classmethod
def get_all_connected_probes(cls, unique_id=None, is_explicit=False):
try:
jlink = cls._get_jlink()
if jlink is None:
return []
serial_numbers = [cls._format_serial_number(info.SerialNumber) for info in jlink.connected_emulators()]
# FIX: Close the temporary instance before creating JLinkProbe objects
jlink.close()
return [cls(sn) for sn in serial_numbers]
except JLinkException as exc:
raise cls._convert_exception(exc) from excFix 2: Correct order in open() def open(self):
assert self.session
try:
# FIX: Open the device FIRST
self._link.open(self._serial_number_int)
self._is_open = True
# THEN disable dialog boxes
if self.session.options.get('jlink.non_interactive'):
self._link.disable_dialog_boxes()
# ... rest of existing codeSince this fixes a major crash for all J-Link users. Best, |
|
Hi @StarSphere-1024, Thank you for confirming that flashing works with the added internal device support.
Please keep the current PR focused on the internal device support. The J-Link fix should be addressed in a separate PR, as also mentioned in #1927 (comment). |
This patch adds support for nRF54LM20A to pyOCD.