Bypass GCC built-in startup code

Nuvoton's sample startup_M251.S file handles enough initialization for
my purposes, so I can completely bypass _start and jump directly to
main. Note that I also had to add a define to enable clearing of BSS.
This commit is contained in:
Doug Brown 2023-08-06 20:35:27 -07:00 committed by Doug Brown
parent 06f9bbcbe7
commit 2a96427047

View File

@ -204,6 +204,8 @@ Reset_Handler:
#endif /*__STARTUP_COPY_MULTIPLE */
#define __STARTUP_CLEAR_BSS
/* This part of work usually is done in C library startup code. Otherwise,
* define this macro to enable it in this startup.
*
@ -298,6 +300,7 @@ Reset_Handler:
movw r1, 0x00000000
str r1, [r0]
#define __START main
#ifndef __START
#define __START _start
#endif