]>
Commit | Line | Data |
---|---|---|
6658905f | 1 | //-----------------------------------------------------------------------------\r |
2 | // Just vector to AppMain(). This is in its own file so that I can place it\r | |
3 | // with the linker script.\r | |
4 | // Jonathan Westhues, Mar 2006\r | |
5 | //-----------------------------------------------------------------------------\r | |
6 | #include <proxmark3.h>\r | |
7 | #include "apps.h"\r | |
8 | \r | |
1b2c8936 | 9 | extern char __data_start__, __data_src_start__, __data_end__, __bss_start__, __bss_end__;\r |
e73e7172 | 10 | void __attribute__((section(".startos"))) Vector(void)\r |
6658905f | 11 | {\r |
1b2c8936 | 12 | /* Stack should have been set up by the bootloader */\r |
13 | char *src, *dst, *end;\r | |
14 | \r | |
15 | /* Set up (that is: clear) BSS. */\r | |
16 | dst = &__bss_start__;\r | |
17 | end = &__bss_end__;\r | |
18 | while(dst < end) *dst++ = 0;\r | |
19 | \r | |
20 | /* Set up data segment: Copy from flash to ram */\r | |
21 | src = &__data_src_start__;\r | |
22 | dst = &__data_start__;\r | |
23 | end = &__data_end__;\r | |
24 | while(dst < end) *dst++ = *src++;\r | |
25 | \r | |
6658905f | 26 | AppMain();\r |
27 | }\r |