Skip to content

Conversation

japaric
Copy link
Contributor

@japaric japaric commented Aug 24, 2018

This expands on PR #53663 to complete the set of Cortex-R targets and builds
rust-std components for them.

r? @alexcrichton

each extra rust-std component (there's 4 of them) takes about 3 minutes to build
on my local machine. In terms of stability (LLVM codegen bugs) these new targets
should be as stable as the Cortex-M ones (e.g. thumbv7m-none-eabi).

If the extra build time is too much we can leave the rust-std components out for
now

closes #53663
cc @paoloteti

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 24, 2018
@japaric
Copy link
Contributor Author

japaric commented Aug 24, 2018

Oh, and examples of actual devices for each Cortex-R target

  • armv7r-none-eabi: TI RM42L432, Cortex-R4, no FPU, Little Endian
  • armv7r-none-eabihf: TI RM46L852, Cortex-R4F, with FPU, Little Endian
  • armebv7r-none-eabi: TI TMS570LS0432, Cortex-R4, no FPU, Big Endian (BE32)
  • armebv7r-none-eabihf: TI TMS570LS1224, Cortex-R4F, with FPU, Big Endian (BE32)


ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc
CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc \
CC_armebv7r_none_eabi=arm-none-eabi-gcc
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can drop this once rust-lang/cc-rs#341 is available in a new release but no need to block on that

@alexcrichton
Copy link
Member

Looks good to me! r=me with a cc bump for the most recent addition (and when y'all are comfortable w/ this )

@japaric
Copy link
Contributor Author

japaric commented Aug 24, 2018

@paoloteti @parched are you OK with landing this as it is?

@parched
Copy link
Contributor

parched commented Aug 24, 2018

LGTM

@paoloteti
Copy link
Contributor

LGTM and thanks for the extra patches

@bors
Copy link
Collaborator

bors commented Aug 24, 2018

☔ The latest upstream changes (presumably #53662) made this pull request unmergeable. Please resolve the merge conflicts.

@japaric
Copy link
Contributor Author

japaric commented Aug 24, 2018

@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented Aug 24, 2018

📌 Commit 99922847a6dd7aab2da5165d9c61ed5fad3cc45e has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 24, 2018
@kenkeiter
Copy link

@japaric @pablobm @alexcrichton @parched Thanks for making this happen! 🎊

@bors
Copy link
Collaborator

bors commented Aug 26, 2018

☔ The latest upstream changes (presumably #53567) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 26, 2018
@japaric
Copy link
Contributor Author

japaric commented Aug 26, 2018

Rebased

@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented Aug 26, 2018

📌 Commit 521df79 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 26, 2018
@bors
Copy link
Collaborator

bors commented Aug 28, 2018

⌛ Testing commit 521df79 with merge 7061b27...

bors added a commit that referenced this pull request Aug 28, 2018
add more Cortex-R targets

This expands on PR #53663 to complete the set of Cortex-R targets and builds
rust-std components for them.

r? @alexcrichton

each extra rust-std component (there's 4 of them) takes about 3 minutes to build
on my local machine. In terms of stability (LLVM codegen bugs) these new targets
should be as stable as the Cortex-M ones (e.g. `thumbv7m-none-eabi`).

If the extra build time is too much we can leave the rust-std components out for
now

closes #53663
cc @paoloteti
@bors
Copy link
Collaborator

bors commented Aug 28, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 7061b27 to master...

@bors bors merged commit 521df79 into rust-lang:master Aug 28, 2018
bors bot added a commit to rust-embedded/wg that referenced this pull request Sep 6, 2018
199: [RFC] initial Cortex-R team r=japaric a=japaric

This is a proposal for creating a Cortex-R team.

@paoloteti and I will be the initial members. I know pretty much nothing about
the Cortex-R but will be working with them starting November; @paoloteti is the
real expert here.

The following work has been planed for this team (some of it has been done
already)

- [x] Add more built-in targets to cover existing devices. In
  rust-lang/rust#53679 we went from 1 target to 4. We now have good coverage of
  Cortex R4(F) and R5(F) cores.

- [x] Move to LLD to remove the dependency on a external linker. Done in
  rust-lang/rust#53679.

- [x] Produce `rust-std` components to not depend on tools like Xargo, which
  require nightly. Also done in rust-lang/rust#53679.

- [ ] Create a `cortex-r` crate (\*) akin to the `cortex-m` crate that provides
  a safe API to emit arch-specific instructions and to manipulate system
  registers.

- [ ] Create a `cortex-r-rt` crate (\*) akin to the `cortex-m-rt` crate that
  helps building a minimal `no_std` binary.

- [ ] See if we can generate register APIs from the XML files that vendors like
  TI ship with their IDEs.

(\*) Initial work in this area: https://github.com/paoloteti/ti-hercules-bsp

@rust-embedded/all please vote on this proposal using [GitHub reviews][approve].
This proposal needs at least 11 approvals to land (/all has 21 members atm).

[approve]: https://help.github.com/articles/approving-a-pull-request-with-required-reviews/


Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants