mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-25 07:34:05 -06:00
armcm_boot: Use armcm_main() instead of main() to start board code
The main() function has a special meaning to gcc and using it can result in different code generation. Use armcm_main() to avoid that. Also, invoke SystemInit() from the board specific armcm_main() code. This gives the board code more control over board initialization. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
632ff9e55a
commit
faeaa54925
6 changed files with 27 additions and 25 deletions
|
@ -4,15 +4,15 @@
|
|||
//
|
||||
// This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
|
||||
#include "board/armcm_boot.h" // armcm_main
|
||||
#include "internal.h" // clock_setup
|
||||
#include "sched.h" // sched_main
|
||||
|
||||
// Main entry point
|
||||
int
|
||||
main(void)
|
||||
// Main entry point - called from armcm_boot.c:ResetHandler()
|
||||
void
|
||||
armcm_main(void)
|
||||
{
|
||||
SystemInit();
|
||||
clock_setup();
|
||||
|
||||
sched_main();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue