-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Sy1xx/otp bootloader runner #87394
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
Sy1xx/otp bootloader runner #87394
Conversation
tswaehn
commented
Mar 20, 2025
- With this commit we add a runner that is capable of flashing the sensry sy1xx socs via uart to support the onboard OTP bootloader.
- Added the sy1xx runner to the list for automated test.
- Adding support for using west flash to install new firmware on the ganymed-bob (sy1xx based soc) board.
8016df2 to
91b7f3c
Compare
91b7f3c to
430697e
Compare
7a12127 to
b527c68
Compare
b527c68 to
aea26db
Compare
aea26db to
d5990e4
Compare
|
Actually, for bisectability, the first 2 commits should be squashed. |
|
one second, ... can be done. |
d5990e4 to
86a88de
Compare
done |
|
dear @carlescufi ;; would be great if you could check, if there are changes to make. looking forward to get it merged :) |
|
would be really great to have this merged - anything that need to be changed? |
Please follow the guidelines for PRs. |
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.
If @pdgendt wants to override me, feel free to remove this -1, but I don't like that we're adding a --serial argument after we spent time unifying the runners on a --dev-id argument a while ago
Right, forgot we had that, agree that we should use |
86a88de to
aaeea44
Compare
aaeea44 to
b49294a
Compare
With this commit we add a runner that is capable of flashing the sensry sy1xx socs via uart to support the onboard OTP bootloader. Added the sy1xx runner to the list for automated test. Signed-off-by: Sven Ginka <[email protected]>
Adding support for using west flash to install new firmware on the board. Signed-off-by: Sven Ginka <[email protected]>
b49294a to
7c69089
Compare
|
dear @mbolivar would be great if you could have an eye on it. should be implemented, like you suggested... |
| def flash(self, **kwargs): | ||
| self.logger.info(f'Flashing file: {self.bin_file} to {self.dev_id}') | ||
|
|
||
| from ganymed.bootloader import Bootloader |
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.
Where does this come from and how does one install this? It doesn't seem to be documented anywhere?
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.
it comes from here: https://pypi.org/project/ganymed/
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.
Sure but you can't expect users to just know that, and it will just fail when they west flash :)
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.
Initially I had an auto installer via pip, when creating this runner. However this is maybe not the best version. for now it prompts:
if importlib.util.find_spec('ganymed') is None:
raise RuntimeError("ganymed not found; can be installed with 'pip install ganymed'")
when flashing the first time. so it offers to install on demand.
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.
Oh I missed that, sorry. I guess that works if @pdgendt and others are happy with the approach, although the error message can probably be more explicit IMO "ganymed Python package is required to use the sy1xx runner. etc"
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 did recommend this, and the short concise message was copied from
zephyr/scripts/west_commands/patch.py
Line 481 in 4875978
| self.die("PyGithub not found; can be installed with 'pip install PyGithub'") |
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.
actually, it cannt be missed:
[94/94] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
L2_START: 4 B 128 B 3.12%
L2_VALIDITY: 4 B 128 B 3.12%
ROM: 13972 B 391680 B 3.57%
RAM: 4432 B 2 MB 0.21%
L2_PRIV_CH0: 3 KB 8 KB 37.50%
IDT_LIST: 0 GB 2 KB 0.00%
Generating files from /home/user/.local/zephyrproject-latest/zephyr/build/zephyr/zephyr.elf for board: ganymed_bob
-- west flash: using runner sy1xx
FATAL ERROR: ganymed not found; can be installed with 'pip install ganymed'
$