Get started on a descriptor for the atmega32u4 processor

This commit is contained in:
Savanni D'Gerinel 2022-10-30 15:21:09 -04:00
parent d2b11bceb8
commit e14caa7388
3 changed files with 2121 additions and 29 deletions

31
avr-atmega32u4.json Normal file
View File

@ -0,0 +1,31 @@
{
"arch": "avr",
"cpu": "atmega32u4",
"data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
"env": "",
"executables": true,
"linker": "avr-gcc",
"linker-flavor": "gcc",
"linker-is-gnu": true,
"llvm-target": "avr-unknown-unknown",
"os": "unknown",
"position-independent-executables": false,
"exe-suffix": ".elf",
"eh-frame-header": false,
"pre-link-args": {
"gcc": [
"-Os",
"-mmcu=atmega32u4"
]
},
"late-link-args": {
"gcc": [
"-lc",
"-lgcc"
]
},
"target-c-int-width": "16",
"target-endian": "little",
"target-pointer-width": "16",
"vendor": "unknown"
}

2029
src/cores/atmega32u4.rs Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,61 +1,93 @@
//! The primary module containing microcontroller-specific core definitions //! The primary module containing microcontroller-specific core definitions
/// The ATmega88. /// The ATmega88.
#[cfg(any(avr_mcu_atmega88, feature = "all-mcus"))] pub mod atmega88; #[cfg(any(avr_mcu_atmega88, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega88)] pub use self::atmega88 as current; pub mod atmega88;
#[cfg(avr_mcu_atmega88)]
pub use self::atmega88 as current;
/// The ATmega48A. /// The ATmega48A.
#[cfg(any(avr_mcu_atmega48a, feature = "all-mcus"))] pub mod atmega48a; #[cfg(any(avr_mcu_atmega48a, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega48a)] pub use self::atmega48a as current; pub mod atmega48a;
#[cfg(avr_mcu_atmega48a)]
pub use self::atmega48a as current;
/// The ATmega168A. /// The ATmega168A.
#[cfg(any(avr_mcu_atmega168a, feature = "all-mcus"))] pub mod atmega168a; #[cfg(any(avr_mcu_atmega168a, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega168a)] pub use self::atmega168a as current; pub mod atmega168a;
#[cfg(avr_mcu_atmega168a)]
pub use self::atmega168a as current;
/// The ATmega88P. /// The ATmega88P.
#[cfg(any(avr_mcu_atmega88p, feature = "all-mcus"))] pub mod atmega88p; #[cfg(any(avr_mcu_atmega88p, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega88p)] pub use self::atmega88p as current; pub mod atmega88p;
#[cfg(avr_mcu_atmega88p)]
pub use self::atmega88p as current;
/// The ATmega168P. /// The ATmega168P.
#[cfg(any(avr_mcu_atmega168p, feature = "all-mcus"))] pub mod atmega168p; #[cfg(any(avr_mcu_atmega168p, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega168p)] pub use self::atmega168p as current; pub mod atmega168p;
#[cfg(avr_mcu_atmega168p)]
pub use self::atmega168p as current;
/// The ATmega88PA. /// The ATmega88PA.
#[cfg(any(avr_mcu_atmega88pa, feature = "all-mcus"))] pub mod atmega88pa; #[cfg(any(avr_mcu_atmega88pa, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega88pa)] pub use self::atmega88pa as current; pub mod atmega88pa;
#[cfg(avr_mcu_atmega88pa)]
pub use self::atmega88pa as current;
/// The ATmega168. /// The ATmega168.
#[cfg(any(avr_mcu_atmega168, feature = "all-mcus"))] pub mod atmega168; #[cfg(any(avr_mcu_atmega168, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega168)] pub use self::atmega168 as current; pub mod atmega168;
#[cfg(avr_mcu_atmega168)]
pub use self::atmega168 as current;
/// The ATmega328P. /// The ATmega328P.
#[cfg(any(avr_mcu_atmega328p, feature = "all-mcus"))] pub mod atmega328p; #[cfg(any(avr_mcu_atmega328p, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega328p)] pub use self::atmega328p as current; pub mod atmega328p;
#[cfg(avr_mcu_atmega328p)]
pub use self::atmega328p as current;
/// The ATmega48PA. /// The ATmega48PA.
#[cfg(any(avr_mcu_atmega48pa, feature = "all-mcus"))] pub mod atmega48pa; #[cfg(any(avr_mcu_atmega48pa, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega48pa)] pub use self::atmega48pa as current; pub mod atmega48pa;
#[cfg(avr_mcu_atmega48pa)]
pub use self::atmega48pa as current;
/// The ATmega168PA. /// The ATmega168PA.
#[cfg(any(avr_mcu_atmega168pa, feature = "all-mcus"))] pub mod atmega168pa; #[cfg(any(avr_mcu_atmega168pa, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega168pa)] pub use self::atmega168pa as current; pub mod atmega168pa;
#[cfg(avr_mcu_atmega168pa)]
pub use self::atmega168pa as current;
/// The ATmega48P. /// The ATmega48P.
#[cfg(any(avr_mcu_atmega48p, feature = "all-mcus"))] pub mod atmega48p; #[cfg(any(avr_mcu_atmega48p, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega48p)] pub use self::atmega48p as current; pub mod atmega48p;
#[cfg(avr_mcu_atmega48p)]
pub use self::atmega48p as current;
/// The ATmega328. /// The ATmega328.
/// ///
/// This device is chosen as the default when the crate is targeting non-AVR devices. /// This device is chosen as the default when the crate is targeting non-AVR devices.
#[cfg(any(avr_mcu_atmega328, feature = "all-mcus", not(target_arch = "avr")))] pub mod atmega328; #[cfg(any(avr_mcu_atmega328, feature = "all-mcus", not(target_arch = "avr")))]
#[cfg(any(avr_mcu_atmega328, not(target_arch = "avr")))] pub use self::atmega328 as current; pub mod atmega328;
#[cfg(any(avr_mcu_atmega328, not(target_arch = "avr")))]
pub use self::atmega328 as current;
/// The ATmega88A. /// The ATmega88A.
#[cfg(any(avr_mcu_atmega88a, feature = "all-mcus"))] pub mod atmega88a; #[cfg(any(avr_mcu_atmega88a, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega88a)] pub use self::atmega88a as current; pub mod atmega88a;
#[cfg(avr_mcu_atmega88a)]
pub use self::atmega88a as current;
/// The ATmega48. /// The ATmega48.
#[cfg(any(avr_mcu_atmega48, feature = "all-mcus"))] pub mod atmega48; #[cfg(any(avr_mcu_atmega48, feature = "all-mcus"))]
#[cfg(avr_mcu_atmega48)] pub use self::atmega48 as current; pub mod atmega48;
#[cfg(avr_mcu_atmega48)]
pub use self::atmega48 as current;
/// The ATmega48.
#[cfg(any(avr_mcu_atmega32u4, feature = "all-mcus"))]
pub mod atmega32u4;
#[cfg(avr_mcu_atmega32u4)]
pub use self::atmega32u4 as current;