]> cvs.zerfleddert.de Git - proxmark3-svn/blob - armsrc/start.c
Fixed some compile warnings in client, minor tidy up with some dbprintf statements
[proxmark3-svn] / armsrc / start.c
1 //-----------------------------------------------------------------------------
2 // Just vector to AppMain(). This is in its own file so that I can place it
3 // with the linker script.
4 // Jonathan Westhues, Mar 2006
5 //-----------------------------------------------------------------------------
6 #include <proxmark3.h>
7 #include "apps.h"
8
9 extern char __data_start__, __data_src_start__, __data_end__, __bss_start__, __bss_end__;
10 void __attribute__((section(".startos"))) Vector(void)
11 {
12 /* Stack should have been set up by the bootloader */
13 char *src, *dst, *end;
14
15 /* Set up (that is: clear) BSS. */
16 dst = &__bss_start__;
17 end = &__bss_end__;
18 while(dst < end) *dst++ = 0;
19
20 /* Set up data segment: Copy from flash to ram */
21 src = &__data_src_start__;
22 dst = &__data_start__;
23 end = &__data_end__;
24 while(dst < end) *dst++ = *src++;
25
26 AppMain();
27 }
Impressum, Datenschutz