33 #include "rosflight.h" 45 if (rosflight==
nullptr)
47 #pragma GCC diagnostic push //Ignore blank fields in struct 48 #pragma GCC diagnostic ignored "-Wmissing-field-initializers" 50 #pragma GCC diagnostic pop 71 " ldr r1, [r0, #24] \n" 72 " ldr r2, handler2_address_const \n" 74 " handler2_address_const: .word prvGetRegistersFromStack \n" 88 volatile uint32_t r12;
91 volatile uint32_t psr;
93 r0 = pulFaultStackAddress[ 0 ];
94 r1 = pulFaultStackAddress[ 1 ];
95 r2 = pulFaultStackAddress[ 2 ];
96 r3 = pulFaultStackAddress[ 3 ];
98 r12 = pulFaultStackAddress[ 4 ];
99 lr = pulFaultStackAddress[ 5 ];
100 pc = pulFaultStackAddress[ 6 ];
101 psr = pulFaultStackAddress[ 7 ];
117 backup_data.
debug_info= {r0,r1,r2,r3,r12,lr,pc,psr};
163 rosflight = &firmware;
void HardFault_Handler(void) __attribute__((naked))
void backup_sram_write(const rosflight_firmware::BackupData &)
void prvGetRegistersFromStack(uint32_t *pulFaultStackAddress)
void init_board() override
__STATIC_INLINE void NVIC_SystemReset(void)
System Reset.
rosflight_firmware::StateManager::State get_state()
void run()
Main loop for the ROSflight autopilot flight stack.
rosflight_firmware::BackupData backup_sram_read()
const State & state() const
rosflight_firmware::ROSflight * rosflight
StateManager::State state
uint32_t generate_backup_checksum(const rosflight_firmware::BackupData &)
void UsageFault_Handler()
struct __attribute__((packed))
StateManager state_manager_
void init()
Main initialization routine for the ROSflight autopilot flight stack.