]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/appmain.c
Fix data segement. You may now use stuff like int foo = 1; in global context (as...
[proxmark3-svn] / armsrc / appmain.c
index 78ab86912c779eb5b4b2db6cc182f3a4a439fea0..23046b4d03b644e618976adfecef0e06fa4c6cea 100644 (file)
@@ -239,7 +239,7 @@ void ReadMem(int addr)
 /* osimage version information is linked in */
 extern struct version_information version_information;
 /* bootrom version information is pointed to from _bootphase1_version_pointer */
-extern char _bootphase1_version_pointer, _flash_start, _flash_end;
+extern char *_bootphase1_version_pointer, _flash_start, _flash_end;
 void SendVersion(void)
 {
        char temp[48]; /* Limited data payload in USB packets */
@@ -249,8 +249,8 @@ void SendVersion(void)
         * symbol _bootphase1_version_pointer, perform slight sanity checks on the
         * pointer, then use it.
         */
-       void *bootrom_version = *(void**)&_bootphase1_version_pointer;
-       if( bootrom_version < (void*)&_flash_start || bootrom_version >= (void*)&_flash_end ) {
+       char *bootrom_version = *(char**)&_bootphase1_version_pointer;
+       if( bootrom_version < &_flash_start || bootrom_version >= &_flash_end ) {
                DbpString("bootrom version information appears invalid");
        } else {
                FormatVersionInformation(temp, sizeof(temp), "bootrom: ", bootrom_version);
@@ -692,9 +692,8 @@ void UsbPacketReceived(BYTE *packet, int len)
        }
 }
 
-void AppMain(void)
+void  __attribute__((noreturn)) AppMain(void)
 {
-       memset(BigBuf,0,sizeof(BigBuf));
        SpinDelay(100);
        
        if(common_area.magic != COMMON_AREA_MAGIC || common_area.version != 1) {
@@ -734,14 +733,14 @@ void AppMain(void)
        LCDInit();
 
        // test text on different colored backgrounds
-       LCDString(" The quick brown fox  ",     &FONT6x8,1,1+8*0,WHITE  ,BLACK );
-       LCDString("  jumped over the     ",     &FONT6x8,1,1+8*1,BLACK  ,WHITE );
-       LCDString("     lazy dog.        ",     &FONT6x8,1,1+8*2,YELLOW ,RED   );
-       LCDString(" AaBbCcDdEeFfGgHhIiJj ",     &FONT6x8,1,1+8*3,RED    ,GREEN );
-       LCDString(" KkLlMmNnOoPpQqRrSsTt ",     &FONT6x8,1,1+8*4,MAGENTA,BLUE  );
-       LCDString("UuVvWwXxYyZz0123456789",     &FONT6x8,1,1+8*5,BLUE   ,YELLOW);
-       LCDString("`-=[]_;',./~!@#$%^&*()",     &FONT6x8,1,1+8*6,BLACK  ,CYAN  );
-       LCDString("     _+{}|:\\\"<>?     ",&FONT6x8,1,1+8*7,BLUE  ,MAGENTA);
+       LCDString(" The quick brown fox  ",     (char *)&FONT6x8,1,1+8*0,WHITE  ,BLACK );
+       LCDString("  jumped over the     ",     (char *)&FONT6x8,1,1+8*1,BLACK  ,WHITE );
+       LCDString("     lazy dog.        ",     (char *)&FONT6x8,1,1+8*2,YELLOW ,RED   );
+       LCDString(" AaBbCcDdEeFfGgHhIiJj ",     (char *)&FONT6x8,1,1+8*3,RED    ,GREEN );
+       LCDString(" KkLlMmNnOoPpQqRrSsTt ",     (char *)&FONT6x8,1,1+8*4,MAGENTA,BLUE  );
+       LCDString("UuVvWwXxYyZz0123456789",     (char *)&FONT6x8,1,1+8*5,BLUE   ,YELLOW);
+       LCDString("`-=[]_;',./~!@#$%^&*()",     (char *)&FONT6x8,1,1+8*6,BLACK  ,CYAN  );
+       LCDString("     _+{}|:\\\"<>?     ",(char *)&FONT6x8,1,1+8*7,BLUE  ,MAGENTA);
 
        // color bands
        LCDFill(0, 1+8* 8, 132, 8, BLACK);
Impressum, Datenschutz