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

add support for xsdb runner #80046

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kedareswararao
Copy link

@kedareswararao kedareswararao commented Oct 18, 2024

This pull request adds support for xsdb runner

Copy link

Hello @kedareswararao, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

Comment on lines 22 to 25
if 'mbv32' in board_name and bitstream is None:
raise ValueError('Valid bitstream is required for mbv32 platform')
if 'kv260_r5' in board_name and fsbl is None:
raise ValueError('Valid fsbl elf is required for kv260_r5 platform')
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't have board logic in runner scripts. Try to pass the necessary arguments in the board.cmake files using board_runner_args(xsdb "--some-option=value")

Copy link
Author

Choose a reason for hiding this comment

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

Sure will fix

Comment on lines 4 to 8
board_set_runner(FLASH xsdb)
board_set_debugger_ifnset(xsdb)
board_set_flasher_ifnset(xsdb)
board_finalize_runner_args(xsdb)
set(FLASH_RUNNER xsdb)
Copy link
Collaborator

@pdgendt pdgendt Oct 18, 2024

Choose a reason for hiding this comment

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

If this is going to be used by more boards, add boards/common/xsdb.board.cmake and include it here.

Copy link
Author

Choose a reason for hiding this comment

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

Sure will move it to xsdb.board.cmake and will include it in the board.cmake

Copy link
Member

Choose a reason for hiding this comment

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

I would suggest creating a boards/common/xsdb.board.cmake for setting the defaults and include this in the board.cmake. Please see the in-tree examples of how this is done (e.g. `boards/common/jlink.board.cmake).

Copy link
Author

Choose a reason for hiding this comment

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

sure

# Copyright (c) 2024 Advanced Micro Devices, Inc.
#
# SPDX-License-Identifier: Apache-2.0
# Author: Appana Durga Kedareswara rao
Copy link
Member

Choose a reason for hiding this comment

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

We usually don't list authors.

Copy link
Author

Choose a reason for hiding this comment

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

Okay will remove the Author tag

Copy link
Member

Choose a reason for hiding this comment

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

Please add a test suite under scripts/west_commands/tests/.

Copy link
Author

Choose a reason for hiding this comment

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

sure will add

scripts/west_commands/runners/xsdb.py Outdated Show resolved Hide resolved
Appana Durga Kedareswara rao added 3 commits October 19, 2024 16:11
Add support for xsdb(Xilinx System Debugger) used with AMD's FPGA
and SOC platforms, it is a user-friendly, interactive, and scriptable
command line interface, by design choice it's expected that platforms
to have xsdb scripts present inside their platform code.

xsdb runner has bitstream and fsbl optional arguments, bitstream is
needed for fpga targets and fsbl is needed for SOC targets, added
support for both options.

Signed-off-by: Appana Durga Kedareswara rao <[email protected]>
Add pytest case for xsdb runner.

Signed-off-by: Appana Durga Kedareswara rao <[email protected]>
Update the board cmake to use xsdb runner, If users would like to
use default xsdb.cfg then need to pass the fsbl.elf binary via
--fsbl option when using west flash or twister commands.

Usage:
1) west flash --runner xsdb --elf-file kv260_r5/zephyr/zephyr.elf
 --fsbl <path>/fsbl.elf
2) ./scripts/twister -p kv260_r5 --west-runner xsdb --device-testing
 --device-serial /dev/ttyUSB0 --west-flash="--fsbl=<path>/fsbl.elf"

Signed-off-by: Appana Durga Kedareswara rao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: West West utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants