1
Fork 0

Add support for cmse_nonsecure_entry attribute

This patch adds support for the LLVM cmse_nonsecure_entry attribute.
This is a target-dependent attribute that only has sense for the
thumbv8m Rust targets.
You can find more information about this attribute here:
https://developer.arm.com/documentation/ecm0359818/latest/

Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
This commit is contained in:
Hugues de Valon 2020-09-28 21:10:38 +01:00
parent d255d70e7a
commit 1aaafac6ff
15 changed files with 154 additions and 1 deletions

View file

@ -458,6 +458,7 @@ E0770: include_str!("./error_codes/E0770.md"),
E0771: include_str!("./error_codes/E0771.md"),
E0773: include_str!("./error_codes/E0773.md"),
E0774: include_str!("./error_codes/E0774.md"),
E0775: include_str!("./error_codes/E0775.md"),
;
// E0006, // merged with E0005
// E0008, // cannot bind by-move into a pattern guard

View file

@ -0,0 +1,17 @@
`#[cmse_nonsecure_entry]` is only valid for targets with the TrustZone-M
extension.
Erroneous code example:
```compile_fail,E0775
#![feature(cmse_nonsecure_entry)]
#[cmse_nonsecure_entry]
fn toto() {}
```
To fix this error, compile your code for a Rust target that supports the
TrustZone-M extension. The current possible targets are:
* `thumbv8m.main-none-eabi`
* `thumbv8m.main-none-eabihf`
* `thumbv8m.base-none-eabi`