]> git.zerfleddert.de Git - proxmark3-svn/blame - armsrc/start.c
small updates to hf mf restore1k
[proxmark3-svn] / armsrc / start.c
CommitLineData
e30c654b 1//-----------------------------------------------------------------------------
bd20f8f4 2// Jonathan Westhues, Mar 2006
3//
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
6// the license.
7//-----------------------------------------------------------------------------
e30c654b 8// Just vector to AppMain(). This is in its own file so that I can place it
9// with the linker script.
e30c654b 10//-----------------------------------------------------------------------------
bd20f8f4 11
e30c654b 12#include "proxmark3.h"
13#include "apps.h"
14
15extern char __data_start__, __data_src_start__, __data_end__, __bss_start__, __bss_end__;
16void __attribute__((section(".startos"))) Vector(void)
17{
18 /* Stack should have been set up by the bootloader */
19 char *src, *dst, *end;
20
21 /* Set up (that is: clear) BSS. */
22 dst = &__bss_start__;
23 end = &__bss_end__;
24 while(dst < end) *dst++ = 0;
25
26 /* Set up data segment: Copy from flash to ram */
27 src = &__data_src_start__;
28 dst = &__data_start__;
29 end = &__data_end__;
30 while(dst < end) *dst++ = *src++;
31
32 AppMain();
33}
Impressum, Datenschutz