38 #include "rosflight.h" 43 if (rosflight_ptr !=
nullptr)
64 " ldr r1, [r0, #24] \n" 65 " ldr r2, handler2_address_const \n" 67 " handler2_address_const: .word prvGetRegistersFromStack \n");
80 volatile uint32_t r12;
83 volatile uint32_t psr;
85 r0 = pulFaultStackAddress[0];
86 r1 = pulFaultStackAddress[1];
87 r2 = pulFaultStackAddress[2];
88 r3 = pulFaultStackAddress[3];
90 r12 = pulFaultStackAddress[4];
91 lr = pulFaultStackAddress[5];
92 pc = pulFaultStackAddress[6];
93 psr = pulFaultStackAddress[7];
98 rosflight_firmware::StateManager::BackupData::DebugInfo
debug = {r0, r1, r2, r3, r12, lr, pc, psr};
147 rosflight_ptr = &firmware;
void HardFault_Handler(void) __attribute__((naked))
void write_backup_data(const BackupData::DebugInfo &debug)
Write recovery data to backup memory in the case of a hard fault.
rosflight_firmware::ROSflight * rosflight_ptr
void prvGetRegistersFromStack(uint32_t *pulFaultStackAddress)
void init_board() override
__STATIC_INLINE void NVIC_SystemReset(void)
System Reset.
void run()
Main loop for the ROSflight autopilot flight stack.
void UsageFault_Handler()
void write_backup_data(const rosflight_firmware::StateManager::BackupData::DebugInfo &debug)
struct __attribute__((packed))
StateManager state_manager_
void init()
Main initialization routine for the ROSflight autopilot flight stack.