rustc_target/spec/targets/
thumbv6m_nuttx_eabi.rs

1// Targets the Cortex-M0, Cortex-M0+ and Cortex-M1 processors (ARMv6-M architecture)
2
3use crate::spec::{FloatAbi, Target, TargetOptions, base, cvs};
4
5pub(crate) fn target() -> Target {
6    Target {
7        llvm_target: "thumbv6m-none-eabi".into(),
8        metadata: crate::spec::TargetMetadata {
9            description: None,
10            tier: Some(3),
11            host_tools: None,
12            std: Some(true),
13        },
14        pointer_width: 32,
15        data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
16        arch: "arm".into(),
17
18        options: TargetOptions {
19            families: cvs!["unix"],
20            os: "nuttx".into(),
21            abi: "eabi".into(),
22            llvm_floatabi: Some(FloatAbi::Soft),
23            // The ARMv6-M architecture doesn't support unaligned loads/stores so we disable them
24            // with +strict-align.
25            // The ARMv6-M doesn't support hardware atomic operations, use atomic builtins instead.
26            features: "+strict-align".into(),
27            max_atomic_width: Some(32),
28            ..base::thumb::opts()
29        },
30    }
31}