rusEFI
The most advanced open source ECU
main.cpp
Go to the documentation of this file.
1 /**
2  * @file main.cpp
3  * @brief C++ main entry point
4  *
5  * See rusefi.cpp for implementation details notes.
6  *
7  * @date Nov 29, 2012
8  * @author Andrey Belomutskiy, (c) 2012-2023
9  * http://rusefi.com/
10  */
11 
12 #include "pch.h"
13 
14 #include "rusefi.h"
15 #include "mpu_util.h"
16 
17 int main(void) {
18  // Maybe your board needs to do something special before HAL init
19  preHalInit();
20 
21  /*
22  * ChibiOS/RT initialization
23  */
24  halInit();
25  chSysInit();
26 
27  /**
28  * most basic MCU initialization - no configuration access, no external hardware access
29  */
30  baseMCUInit();
31 
32  runRusEfi();
33  return 0;
34 }
35 
36 // Weak linked default implementation (not necessarily required for all boards)
37 __attribute__((weak)) void preHalInit() { }
void baseMCUInit(void)
__attribute__((weak)) void preHalInit()
Definition: main.cpp:37
int main(void)
Definition: main.cpp:17
void preHalInit()
void runRusEfi()
Definition: rusefi.cpp:174