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

Refactor the clock module, provide ROM functions via linker scripts #353

Merged
merged 4 commits into from
Jan 23, 2023

Conversation

jessebraham
Copy link
Member

  • Refactors clock.rs and clocks_ll into a common clock module
  • Add a rom-functions linker script for each device's HAL
  • Use the provided ROM functions instead of transmuting memory addresses
  • Fix a warning about an unused import

@jessebraham
Copy link
Member Author

This builds just fine locally for me, no idea why the S2 is failing on GHA.

Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

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

LGTM

@bjoernQ
Copy link
Contributor

bjoernQ commented Jan 23, 2023

Code looks fine to me and I even tried to build the ESP32-S2 examples in WSL (to make sure there isn't a case-sensitivity issue with some file) - compiled fine for me

Still, I'm a bit concerned since it would be awful if all future CI builds would fail for S2

@bjoernQ
Copy link
Contributor

bjoernQ commented Jan 23, 2023

One thing that is interesting: In the failing build it shows the invocation of the linker and it's missing "-nostartfiles" "-Wl,-Tlinkall.x" which should come from .cargo/config.toml

@bjoernQ
Copy link
Contributor

bjoernQ commented Jan 23, 2023

Ok I know what is going on!

In https://github.com/esp-rs/esp-hal/blob/7f8a15ccf565a18eec466687de62829b20c6d5bd/.github/workflows/ci.yml#LL117C7-L117C16

The RUSTFLAGS get set which means it won't take the rustflags from .cargo/config.toml

Removing that from the build script should make CI happy again

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

LGTM! Much cleaner now :).

@jessebraham
Copy link
Member Author

@bjoernQ good eye! Thank you so much that was driving me crazy 😁 That line should have been removed before the CI changes got merged so that was my bad anyway. Oh well, fixed now!

@jessebraham jessebraham merged commit 832f9ef into esp-rs:main Jan 23, 2023
@jessebraham jessebraham deleted the fixes/refactor branch January 23, 2023 15:25
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