-
Notifications
You must be signed in to change notification settings - Fork 38
Cortex A7 support? #11
Comments
This crate is a support crate (library). It currently only supports aarch64 cortex-a processors, and due to limited bandwidth on my side, no plans to add aarch32 support for now. Having such a support crate is only one part of the equation, though. To actually compile for aarch32 bare-metal, you would first need to have a suitable target for cargo xbuild to use (
There is no bare-metal target for armv7 yet. There was an attempt (rust-lang/rust#60135), but it didn't make it upstream. However, for starters, you could use the targets in the PR to generate a custom target |
This would be a Cortex-R target. |
IMHO there is not difference to Cortex-A regarding the toolchain. Both architectures are defined by the ARMv7-AR reference manual. |
I faintly remember that one of the few differences is that the R profile doesn't have VMSA support? So depending on if you're going to use that or not it might work. |
Correct, it uses PMSA. But that shouldn't be relevant for the toolchain? |
Hi.
v8-R implements the AArch32 execution state. Also the A32 and T32
instruction sets. So it is similar to v8-A in that respect which is why at
the Application level, toolchains targeting v8-A may be used for v8-R.
At the system level things are somewhat different: v8-R only supports PMSA
and introduces an optional EL2 (Hyp mode).
From the PoV of the Cortex-A crate, I _think_ (needs verification) that the
architectural system control register accessors should be common to both
profiles.
My suggestion would be to consider creating a WiP branch of the Cortex-A
crate focused on exploring any modifications specific to v8-R. That way we
can reason about the differences and consider whether it makes sense to
continue with some conditional glue or consider another route.
Robin
…On Tue, Dec 10, 2019 at 2:25 PM Andre Richter ***@***.***> wrote:
I faintly remember that one of the few differences is that the R profile
doesn't have VMSA support?
So depending on if you're going to use that or not it might work.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11?email_source=notifications&email_token=AAFMKYWRYU2OHAO2XBJHGVDQX6RHBA5CNFSM4JVF6MK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGPNB4Q#issuecomment-564056306>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFMKYXWFCYI5PAFCYU3UNTQX6RHBANCNFSM4JVF6MKQ>
.
|
In summary, there's two things you need for bare-metal Cortex A7.
Hope that helps. I would close this issue if all your questions are answered. Is there anything open? Thanks, |
There is already a toolchain available for ARMv7: "armv7r_none_eabi.rs". So toolchain support is already there. As for this issues, maybe it would help to clarify in the readme which "Cortex-A" CPU's are supported by this repo in the readme? "Cortex-A" can refer to both ARMv8 and ARMv7 CPU's. Regards, Robert |
Good point. I pushed 9ec8dd7 |
Hey, sorry for my inactivity, have been very busy :)
Thank you all for your input, I will try the things you suggested and see how far I get. If I get something to work, I will definitely let you know.
|
Thanks! Closing for now. |
Shameless ad: I am writing stuff for the beaglebone, which is a 32bit Cortex-A SoC (armv7). If someone is interested in this, I can make the repos public, but the code is very experimental and I am not an comp-sci expert. |
Please do share, I guarantee I know even less and appreciate the example, even if it is not perfect :)
|
On that topic, said bare metal targets are upstream soon rust-lang/rust#68253 |
@andre-richter that is cool. I thought about making a pull request, but was not sure whether people are interested in that. |
Hello,
First of all, I am completely new to embedded development and relatively new to Rust, but I have an ARMv7 board with the Allwinner A20 (Olimex A20 OLinuXinoLime2 to be precise) laying around that I would like to experiment and learn embedded Rust with.
I saw that the PR for the Cortex A working group only mentioned aarch64 while the A20 uses Cortex A7 cores which would be the armv7 target.
Is there any work happening/done for supporting bare metal armv7 yet? Is this something that I should even attempt to work on as someone new to embedded?
Thanks in advance!
The text was updated successfully, but these errors were encountered: