Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions boards/nxp/mimxrt1170_evk/board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@

if(CONFIG_SOC_MIMXRT1176_CM7 OR CONFIG_SECOND_CORE_MCUX)
board_runner_args(pyocd "--target=mimxrt1170_cm7")
board_runner_args(jlink "--device=MIMXRT1176xxxA_M7" "--reset-after-load")
# ITCM is not defined in RT1170's LinkServer device file
board_runner_args(linkserver "--override=/device/memory/-=\{\"location\":\"0x00000000\",\
\"size\":\"0x00040000\",\"type\":\"RAM\"\}")
board_runner_args(jlink "--device=MIMXRT1176xxxA_M7")

if(${BOARD_REVISION} STREQUAL "A")
board_runner_args(linkserver "--device=MIMXRT1176xxxxx:MIMXRT1170-EVK")
Expand All @@ -30,6 +27,11 @@ elseif(CONFIG_SOC_MIMXRT1176_CM4)
board_runner_args(linkserver "--core=cm4")
endif()

if(NOT SYSBUILD)
board_runner_args(jlink "--no-reset")
board_runner_args(linkserver "--no-reset")
endif()

include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
5 changes: 4 additions & 1 deletion scripts/west_commands/runners/linkserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ def do_run(self, command, **kwargs):
['-ex', f'target remote {self.gdb_host}:{self.gdb_port}'])

if command == 'debug':
gdb_cmd += [ '-ex', 'load', '-ex', 'monitor reset']
# If the flash node points to ram, linkserver treats
# the ram as inaccessible and does not flash.
gdb_cmd += ['-ex', 'set mem inaccessible-by-default off']
gdb_cmd += ['-ex', 'monitor reset', '-ex', 'load']
Copy link
Member

Choose a reason for hiding this comment

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

why is the order of load, reset being reversed to reset, load?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we are going to reset, we would want it to be before a load.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But I do see a typo I will fix in the next push if I don't get further comments

Copy link
Member

Choose a reason for hiding this comment

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

If we are going to reset, we would want it to be before a load.

Yes, I see that is what you are doing, you are restating what it is that I said that am observing, my question was why. You should explain in the commit message also why you are reversing this order. I don't know why.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have updated the commit message, let me know if that helps!


if command == 'attach':
linkserver_cmd += ['--attach']
Expand Down
Loading