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

Backport Rust topgen changes to ES #19988

Merged
merged 3 commits into from
Oct 17, 2023

Conversation

mazurek-michal
Copy link
Contributor

@mazurek-michal mazurek-michal commented Oct 10, 2023

This PR is an attempt to bring software update to auto-generate top level Rust files in earlgrey_es.

  • (new) [topgen] Regenerate Rust top level definitions
  • 21caadb [utils,topgen] Add missing trait in topgen rust template
  • 2bd1d75 [util/topgen,sw]: Add generation of Rust derive to topgen

mazurek-michal and others added 3 commits October 10, 2023 18:25
The main purpose of this change is to allow easier integration
of generated Rust chip definitions in end-user projects.
The following changes remove some issue inherited from
the C source file generator.

Bellow is a list of changes made to topgen scripts:

1) Add option to generate `derive` for Rust enum
2) Add default Copy and Clone implementations to Rust enum generator
3) Add short type names without TOP_CHIP prefix
4) Remove Rust memory template file
5) Replace Rust top_earlgrey_memory with top_earlgrey in SW

Signed-off-by: Michał Mazurek <[email protected]>
* Add generation of compare related traits for enum's in `topgen`.
* Fix missing newline between memory addresses and size in template
  used to generate `top_earlgrey.rs`

  To check generated data please run Rust topgen:
  `cd $REPO_TOP`
  `make -C hw top`
  `make -C hw topgen_rust_pkg`

Signed-off-by: Michał Mazurek <[email protected]>
This commit is used to fill the gap in Rust top level definition
after backporting master topgen to earlgrey_es.

Signed-off-by: Michał Mazurek <[email protected]>
@mazurek-michal mazurek-michal marked this pull request as ready for review October 13, 2023 10:47
@mazurek-michal mazurek-michal requested review from HU90m and removed request for a team October 13, 2023 10:47
@mazurek-michal
Copy link
Contributor Author

mazurek-michal commented Oct 13, 2023

This PR is connected to ongoing effort to write proper driver for TockOS: tock/tock#3707

Copy link
Contributor

@matutem matutem left a comment

Choose a reason for hiding this comment

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

LGTM

@msfschaffner
Copy link
Contributor

@cfrantz does this look fine from your end?

@msfschaffner msfschaffner merged commit edf5e35 into lowRISC:earlgrey_es Oct 17, 2023
23 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.

4 participants