45 lines
738 B
C
Executable File
45 lines
738 B
C
Executable File
#include "cmsis_os.h"
|
|
#include "at32f435_437_clock.h"
|
|
#include "delay_sec.h"
|
|
#include "MainModesArbiter.h"
|
|
#include "PeripheralInterfaces.h"
|
|
#include "time.h"
|
|
#include "Rtcs.h"
|
|
#include "CanPorts.h"
|
|
|
|
tMma MAIN_ENV;
|
|
|
|
_Noreturn void stop() {
|
|
while (1) {
|
|
asm("nop");
|
|
asm("nop");
|
|
asm("nop");
|
|
}
|
|
}
|
|
|
|
#define STOP stop();
|
|
|
|
|
|
void reset_hand() {
|
|
asm("nop");
|
|
}
|
|
|
|
// Переполнение стека
|
|
void vApplicationStackOverflowHook(TaskHandle_t xTask, signed char *pcTaskName) {
|
|
STOP
|
|
}
|
|
|
|
int main(void) {
|
|
system_clock_config();
|
|
|
|
osKernelInitialize();
|
|
|
|
Mma_Init(&MAIN_ENV, &GPIOS, &SERIAL_PORTS, &CAN_PORTS, &RTCS);
|
|
|
|
Mma_StartThread(&MAIN_ENV);
|
|
|
|
osKernelStart();
|
|
|
|
while (1) {
|
|
}
|
|
} |