Welcome to mirror list, hosted at ThFree Co, Russian Federation.

main.c « Src « f6 « targets « firmware - github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a546086fdd769e8e8860f6c657defd0e3ba63b62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "main.h"

#include <furi.h>
#include <furi-hal.h>
#include <flipper.h>

#define TAG "Main"

int main(void) {
    // Initialize FURI layer
    furi_init();

    // Initialize ST HAL
    HAL_Init();

    // Flipper FURI HAL
    furi_hal_init();

    // CMSIS initialization
    osKernelInitialize();
    FURI_LOG_I(TAG, "KERNEL OK");

    // Init flipper
    flipper_init();

    // Start kernel
    osKernelStart();

    while (1) {}
}

void Error_Handler(void) {
    asm("bkpt 1");
    while(1) {}
}

#ifdef  USE_FULL_ASSERT
/**
    * @brief  Reports the name of the source file and the source line number
    *         where the assert_param error has occurred.
    * @param  file: pointer to the source file name
    * @param  line: assert_param error line source number
    * @retval None
    */
void assert_failed(uint8_t *file, uint32_t line) {
    furi_crash("HAL assert failed");
}
#endif /* USE_FULL_ASSERT */