1 //! Implementations for the TI-MSP430 family of MCUs. 2 3 use gdbstub::arch::Arch; 4 5 pub mod reg; 6 7 /// Implements `Arch` for standard 16-bit TI-MSP430 MCUs. 8 pub struct Msp430 {} 9 10 impl Arch for Msp430 { 11 type Usize = u16; 12 type Registers = reg::Msp430Regs<u16>; 13 type RegId = reg::id::Msp430RegId<u16>; 14 type BreakpointKind = usize; 15 target_description_xml() -> Option<&'static str>16 fn target_description_xml() -> Option<&'static str> { 17 Some(r#"<target version="1.0"><architecture>msp430</architecture></target>"#) 18 } 19 } 20 21 /// Implements `Arch` for 20-bit TI-MSP430 MCUs (CPUX). 22 pub struct Msp430X {} 23 24 impl Arch for Msp430X { 25 type Usize = u32; 26 type Registers = reg::Msp430Regs<u32>; 27 type RegId = reg::id::Msp430RegId<u32>; 28 type BreakpointKind = usize; 29 target_description_xml() -> Option<&'static str>30 fn target_description_xml() -> Option<&'static str> { 31 Some(r#"<target version="1.0"><architecture>msp430x</architecture></target>"#) 32 } 33 } 34