-
Notifications
You must be signed in to change notification settings - Fork 7.8k
west: runner: add support for ecpprog #81482
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
west: runner: add support for ecpprog #81482
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add an entry in scripts/west_commands/tests/test_imports.py
too.
c1b7db1
to
6041dc5
Compare
Force-push:
Good to see there is a complete test infrastructure for twister runners. |
6041dc5
to
9f38098
Compare
@pdgendt should this be rebased to be sure it passes Ruff checks? I think we want to be extra careful with all PRs adding Python files that predate the introduction of Ruff, correct? |
9f38098
to
841d0f2
Compare
Ruff has issues, and I'm happy to use this PR as guinea pig for it. I can reproduce by running check_compliance locally:
|
I think stderr and stdout got merged together somehow... output = ex.output.decode("utf-8")
print('<<<' + output + '>>>') <<<warning: The following rules have been removed and ignoring them has no effect:
- UP027
[
{
"cell": null,
"code": "I001",
"end_location": {
"column": 1,
"row": 11
},
"filename": "/home/tinyvision/zephyrproject/zephyr/scripts/west_commands/runners/ecpprog.py",
"fix": {
"applicability": "safe",
"edits": [
{
"content": "from runners.core import BuildConfiguration, RunnerCaps, ZephyrBinaryRunner\n\n\n",
"end_location": {
"column": 1,
"row": 11
},
"location": {
"column": 1,
"row": 8
}
}
],
"message": "Organize imports"
},
"location": {
"column": 1,
"row": 8
},
"message": "Import block is un-sorted or un-formatted",
"noqa_row": 8,
"url": "https://docs.astral.sh/ruff/rules/unsorted-imports"
}
]>>> |
841d0f2
to
732dfaf
Compare
Glad this PR could be useful to someone else than me! [EDIT: it looks like the linting works now! I will fix it then... nice feature!] |
732dfaf
to
c1334a9
Compare
6cbed62
to
6eed115
Compare
The ecpprog command is an utility written by Greg Davill for flashing FPGAs such as ECP5 or CrossLink-NX series. Devkits typically have an FTDI interface chip to access the external flash. FPGA image is typically at flash offset 0x00000000 flash offset, and the Zephyr image offset can be set via CONFIG_FLASH_LOAD_OFFSET. Signed-off-by: Josuah Demangeon <[email protected]>
6eed115
to
e0dc7f8
Compare
Ping @pdgendt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against adding the runner, the downside is it doesn't have an in-tree board that needs it.
I've created #83190 to showcase supporting external runners.
Good point, I will need to add it to |
This adds the
ecpprog
utility to flash FPGA boards on Zephyr.There is currently no board upstream configured to use it, but 3rd-party module soon will, and later be submitted to Zephyr.
Example
board.cmake
:Optional
Kconfig.defconfig
forCONFIG_FLASH_LOAD_OFFSET
support:Sample output: