1 //-----------------------------------------------------------------------------
2 // Jonathan Westhues, Mar 2006
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
7 //-----------------------------------------------------------------------------
8 // Just vector to AppMain(). This is in its own file so that I can place it
9 // with the linker script.
10 //-----------------------------------------------------------------------------
12 #include "proxmark3.h"
15 extern char __data_start__
, __data_src_start__
, __data_end__
, __bss_start__
, __bss_end__
;
16 void __attribute__((section(".startos"))) Vector(void)
18 /* Stack should have been set up by the bootloader */
19 char *src
, *dst
, *end
;
21 /* Set up (that is: clear) BSS. */
24 while(dst
< end
) *dst
++ = 0;
26 /* Set up data segment: Copy from flash to ram */
27 src
= &__data_src_start__
;
28 dst
= &__data_start__
;
30 while(dst
< end
) *dst
++ = *src
++;