]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - bootrom/fromflash.c
Add -O3 on the client's side and fix yielding warnings
[proxmark3-svn] / bootrom / fromflash.c
index 6b41c408c3a6968711675ac0a343100a578f5f2e..81501fd03516f61602c3e57f47fed04534d1ef93 100644 (file)
@@ -1,13 +1,21 @@
-#include <proxmark3.h>\r
-\r
-extern char __bootphase2_src_start__, __bootphase2_start__, __bootphase2_end__;\r
-void __attribute__((section(".bootphase1"))) CopyBootToRAM(void)\r
-{\r
-       int i;\r
-\r
-       volatile DWORD *s = (volatile DWORD *)&__bootphase2_src_start__;\r
-       volatile DWORD *d = (volatile DWORD *)&__bootphase2_start__;\r
-       unsigned int l = (int)&__bootphase2_end__ - (int)&__bootphase2_start__;\r
-\r
-       for(i = 0; i < l/sizeof(DWORD); i++) *d++ = *s++;\r
-}\r
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Helper function for launching the bootloader from FLASH
+//-----------------------------------------------------------------------------
+
+#include <proxmark3.h>
+
+extern char __bootphase2_src_start__, __bootphase2_start__, __bootphase2_end__;
+void __attribute__((section(".bootphase1"))) CopyBootToRAM(void)
+{
+       int i;
+
+       volatile uint32_t *s = (volatile uint32_t *)&__bootphase2_src_start__;
+       volatile uint32_t *d = (volatile uint32_t *)&__bootphase2_start__;
+       unsigned int l = (int)&__bootphase2_end__ - (int)&__bootphase2_start__;
+
+       for(i = 0; i < l/sizeof(uint32_t); i++) *d++ = *s++;
+}
Impressum, Datenschutz