diff options
Diffstat (limited to 'prog')
-rw-r--r-- | prog/src/startup.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/prog/src/startup.c b/prog/src/startup.c index b587a95..ad9b9b6 100644 --- a/prog/src/startup.c +++ b/prog/src/startup.c @@ -5,15 +5,16 @@ extern unsigned int _sbss; // start of .bss section extern unsigned int _ebss; // end of .bss section extern unsigned int _estack; // end of .stack section (stack top) -//void main(void); // main function declaration +extern void main(void); // main function declaration extern void test_prog(void); -void _start(void) __attribute__((section(".text.startup"), naked)); // entry point, cpu starts executing from here - void _start(void) -{ - //test_prog(); + __attribute__((section(".text.startup"), + naked)); // entry point, cpu starts executing from here + +void _start(void) { + // test_prog(); unsigned int *src, *dst; @@ -29,11 +30,12 @@ void _start(void) } // initialize stack pointer - asm volatile ("la sp, _estack"); + asm volatile("la sp, _estack"); // call main function main(); // halt - while (1); + while (1) + ; } |