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

applet.interface.spi_flashrom: documentation, spi-serprog -> spi-flashrom #535

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

Manawyrm
Copy link
Contributor

Just a very small fix for the example cmdline given in the new spi-flashrom applet.
Thanks to everyone involved with it, I've been using it for the last days, it works very well 😎

@Manawyrm Manawyrm requested a review from neuschaefer as a code owner March 13, 2024 09:44
@whitequark
Copy link
Member

Thanks to everyone involved with it, I've been using it for the last days, it works very well 😎

Is there something the built-in SPI flash support does not handle?

Copy link
Contributor

@neuschaefer neuschaefer left a comment

Choose a reason for hiding this comment

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

Thanks!

@whitequark
Copy link
Member

The build is failing due to YosysHQ/yosys#4280.

@Manawyrm
Copy link
Contributor Author

Is there something the built-in SPI flash support does not handle?

Hm, well...
The built-in flash support was very slow for me, I was probably using it wrong (there's probably some way to set the SPI clock speed I missed?).

My setup is also mechanically a bit flaky, flashrom enforces a chip-ID/identify before each access, which is nice for me.
With the memory-25xx, I had trouble with it reading a blank file (because the connection wasn't OK) and didn't notice because I/it didn't run identify.

My chip also has some magic about 256K vs. 4K sector sizes, which flashrom seems to handle for me, I wasn't 100% sure what I'd need to configure there in memory-25xx.

But yes, memory-25xx was what I've been using before and it worked well otherwise :)

@whitequark
Copy link
Member

The built-in flash support was very slow for me, I was probably using it wrong (there's probably some way to set the SPI clock speed I missed?).

Um... they are using literally the same gateware and the same command line arguments. Did you never call it with --help? The suggested command line for spi-flashrom has --freq 4000 in it, which is the exact same argument that memory-25x takes, because they use the same gateware.

@whitequark
Copy link
Member

My setup is also mechanically a bit flaky, flashrom enforces a chip-ID/identify before each access, which is nice for me.

We should probably just add this to memory-25x. But I'm too depressed thinking about how you never discovered --freq until you could copy it from an example command line...

@Manawyrm
Copy link
Contributor Author

We should probably just add this to memory-25x. But I'm too depressed thinking about how you never discovered --freq until you could copy it from an example command line...

Indeed. Actually, I always looked at the .py files in the glasgow-repo to find out how to use all the things, I basically never called --help anywhere (which is probably my fault).

This might be a "me"-problem, but having some export/overview/man-page with all the different applets (and their command line options) listed would be super duper useful.

I had just looked at

access.add_pin_argument(parser, "cs", default=True, required=True)
, didn't really realize it inherited from a more complex class above it. That being said, the time I did this it was very late at night, I was in a hurry and just needed to get things done, so I didn't really look at the tooling properly. I had hardware/electrical problems with the setup, so I was focussing on it, instead of the glasgow... Sorry about that 😄

@whitequark
Copy link
Member

This might be a "me"-problem, but having some export/overview/man-page with all the different applets (and their command line options) listed would be super duper useful.

This is a lot of work as far as I know (to integrate it with Sphinx); one that's kinda hard to justify when the --help is right there and gives you the same information.

@Manawyrm
Copy link
Contributor Author

This is a lot of work as far as I know (to integrate it with Sphinx); one that's kinda hard to justify when the --help is right there and gives you the same information.

Indeed.

I just looked at the output of --help for the first time and yes, it's indeed very helpful.
This one's on me for not reading the documentation, I'd say 😄

@whitequark
Copy link
Member

Will be mergeable after #537.

@whitequark whitequark added this pull request to the merge queue Mar 14, 2024
Merged via the queue into GlasgowEmbedded:main with commit ebefef4 Mar 14, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants