Changeset 955

Show
Ignore:
Timestamp:
10/14/10 09:12:26 (19 months ago)
Author:
fe50
Message:

* Fixes by ultimA from  http://chdk.setepontos.com/index.php/topic,650.msg55640.html#msg55640
- Make the A2000, G11 and ixus100_sd780 ports compatible with GCC 4.5. Apparently GCC 4.4 was too forgiving and still built the code, but GCC 4.5.1 errored out on them. This patch fixes the ASM so that these cams can be built successfully. The changes were not actually tested, but the fixes are trivial. As a result, all stable ports can be built using GCC 4.5.1 now. Credit also goes to whim who noticed these cams failing to build and he also suggested the first set of fixes.
- Shut up some (not all) warnings from ixus100_sd780, ixus40_sd300, ixus65_sd630, s5is, ixus60_sd600
- Make edge overlay respect OPT_EDGEOVERLAY. Previously, generated binary size did not get significantly smaller even when OPT_EDGEOVERLAY was undefined, because undefining it only resulted in the overlay being excluded from the menu, but still being built. Excluding edge overlay now saves appr. 3Kbytes.
- Edge overlay erroneously depended on OPT_DEBUGGING. Builds failed when OPT_DEBUGGING was not defined previously.

Location:
trunk
Files:
15 modified

Legend:

Unmodified
Added
Removed
  • trunk/core/edgeoverlay.c

    r931 r955  
     1#include "platform.h" 
     2 
     3#ifdef OPT_EDGEOVERLAY 
    14#include "edgeoverlay.h" 
    2 #include "platform.h" 
    35#include "conf.h" 
    46#include "keyboard.h" 
     
    765767 
    766768}   // function 
     769 
     770#endif 
     771 
  • trunk/core/gui.c

    r931 r955  
    4343        #include "curves.h" 
    4444#endif 
    45 #include "edgeoverlay.h" 
     45#ifdef OPT_EDGEOVERLAY 
     46        #include "edgeoverlay.h" 
     47#endif 
    4648//------------------------------------------------------------------- 
    4749 
     
    159161static void gui_draw_load_lang(int arg); 
    160162static void gui_menuproc_mkbootdisk(int arg); 
    161 static void gui_menuproc_edge_save(int arg); 
    162 static void gui_menuproc_edge_load(int arg); 
    163163#ifdef OPT_DEBUGGING 
    164164void gui_compare_props(int arg); 
     
    256256#endif 
    257257 
     258#ifdef OPT_EDGEOVERLAY 
     259static void gui_menuproc_edge_save(int arg); 
     260static void gui_menuproc_edge_load(int arg); 
    258261static const char* gui_edge_pano_enum(int change, int arg); 
     262#endif 
    259263 
    260264void rinit(); 
     
    20462050//              if (conf.zoom_override) shooting_set_zoom(conf.zoom_override_value); 
    20472051#endif 
    2048 } 
    2049  
    2050 static void gui_load_edge_selected( const char* fn ) { 
    2051     if( fn ) 
    2052         load_edge_overlay(fn); 
    20532052} 
    20542053 
     
    32053204} 
    32063205 
     3206#ifdef OPT_EDGEOVERLAY 
     3207static void gui_load_edge_selected( const char* fn ) { 
     3208    if( fn ) 
     3209        load_edge_overlay(fn); 
     3210} 
     3211 
    32073212void gui_menuproc_edge_save(int arg) { 
    32083213    save_edge_overlay(); 
     
    32243229    gui_fselect_init(LANG_MENU_EDGE_LOAD, path, gui_load_edge_selected); 
    32253230} 
     3231#endif 
    32263232 
    32273233//------------------------------------------------------------------- 
     
    33643370        } 
    33653371} 
     3372 
     3373#ifdef OPT_EDGEOVERLAY 
     3374static const char* gui_edge_pano_enum(int change, int arg) 
     3375{ 
     3376    static const char* modes[]={ "Off", "Right", "Down", "Left", "Up", "Free"}; 
     3377 
     3378    conf.edge_overlay_pano+=change; 
     3379    if (conf.edge_overlay_pano<0)  
     3380        conf.edge_overlay_pano=(sizeof(modes)/sizeof(modes[0]))-1;  
     3381    else if (conf.edge_overlay_pano>=(sizeof(modes)/sizeof(modes[0])))  
     3382        conf.edge_overlay_pano=0;  
     3383    return modes[conf.edge_overlay_pano];  
     3384} 
     3385#endif 
    33663386 
    33673387#ifdef OPT_DEBUGGING 
     
    34153435} 
    34163436 
    3417 static const char* gui_edge_pano_enum(int change, int arg) 
    3418 { 
    3419     static const char* modes[]={ "Off", "Right", "Down", "Left", "Up", "Free"}; 
    3420  
    3421     conf.edge_overlay_pano+=change; 
    3422     if (conf.edge_overlay_pano<0)  
    3423         conf.edge_overlay_pano=(sizeof(modes)/sizeof(modes[0]))-1;  
    3424     else if (conf.edge_overlay_pano>=(sizeof(modes)/sizeof(modes[0])))  
    3425         conf.edge_overlay_pano=0;  
    3426     return modes[conf.edge_overlay_pano];  
    3427 } 
    3428  
    3429 #endif 
     3437#endif 
  • trunk/platform/a2000/sub/100c/capt_seq.c

    r797 r955  
    2222"                LDR     R1, =0x539\n" 
    2323"                LDR     R0, =0xFFC4AA98\n"                     // "SsShootTask.c" 
    24 "                BL      0xFFC0BD98\n"                          // DebugAssert 
    25 "                BL      0xFFC0BB50\n"                          // eventproc_export_ExitTask ; LOCATION: KerTask.c:0 
     24"                BL      =0xFFC0BD98\n"                         // DebugAssert 
     25"                BL      =0xFFC0BB50\n"                         // eventproc_export_ExitTask ; LOCATION: KerTask.c:0 
    2626"                LDMFD   SP!, {R3-R7,PC}\n" 
    2727"loc_FFC4AEB8:\n" 
  • trunk/platform/g11/sub/100f/boot.c

    r871 r955  
    773773               "BL      sub_FF8398B4\n" 
    774774             //"ADR     R2, sub_FF860490\n" 
    775                "ADR     R2, sub_FF860490_my\n" //+ 
     775               "ADRL     R2, sub_FF860490_my\n" //+ 
    776776               "MOV     R1, R2\n" 
    777777               "ORR     R3, R4, #0x200\n" 
     
    892892               "BEQ     loc_FF860810\n" 
    893893            // "ADR     R2, sub_FF860490\n" 
    894                "ADR     R2, sub_FF860490_my\n" //+ 
     894               "ADRL     R2, sub_FF860490_my\n" //+ 
    895895               "MOV     R1, R2\n" 
    896896               "ORR     R3, R4, #0x400\n" 
  • trunk/platform/g11/sub/100j/boot.c

    r871 r955  
    491491               "LDMEQFD SP!, {R4-R8,LR}\n" 
    492492               "LDREQ   R0, =0xFF86F9A8\n" 
    493                            "BEQ     0xFF81175C\n" //qPrintf 
     493                           "BEQ     =0xFF81175C\n" //qPrintf 
    494494               "LDMFD   SP!, {R4-R8,PC}\n" 
    495495 ); 
     
    682682                 "LDR     R0, =0xFF86F378\n" 
    683683                  
    684                                  "BL   0xFF81E88C\n" 
     684                                 "BL      =0xFF81E88C\n" 
    685685 
    686686"loc_FF86F340:\n" 
     
    779779               "LDR     R0, [R5,R4,LSL#2]\n" 
    780780               "BL      sub_FF8398E4\n" 
    781                "ADR     R2, sub_FF8604E0_my\n" 
     781               "ADRL     R2, sub_FF8604E0_my\n" 
    782782//               "LDR     R2, sub_FF8604E0\n" 
    783783               "ADD     R1, R2, #0\n" 
     
    900900               "BEQ     loc_FF860860\n" 
    901901//               "ADR     R2, loc_FF8604E0\n" 
    902                "ADR     R2,sub_FF8604E0_my\n" 
     902               "ADRL     R2,sub_FF8604E0_my\n" 
    903903               "ADD     R1, R2, #0\n" 
    904904               "ORR     R3, R4, #0x400\n" 
  • trunk/platform/ixus100_sd780/kbd.c

    r881 r955  
    44#include "keyboard.h" 
    55#include "conf.h" 
    6 //#include "stdlib.h" 
     6#include "stdlib.h" 
     7#include "gui.h" 
     8#include "../../core/gui_draw.h" 
    79 
    810typedef struct { 
     
    203205                "stmdb sp!, {r0, r1, lr}\n" 
    204206                "mov r0, sp\n" 
    205                 "BL 0xFF922E14\n"  //GetLogToFile 
     207                "BL =0xFF922E14\n"  //GetLogToFile 
    206208                "ldmia sp!, {r0, r1, lr}\n" 
    207209        ); 
     
    212214        int i; 
    213215        char aStr[50]; 
    214         void* l; 
    215  
    216         l=(void*)Fopen_Fut("A/PropDmp.txt","a"); 
     216        long l; 
     217 
     218        l=Fopen_Fut("A/PropDmp.txt","a"); 
    217219        for (i=0;i<300;i++){ 
    218220                _GetPropertyCase(i, &avv, sizeof(avv)); // 23 for DiGiC III 
     
    229231        #define FWSIZE            0x30 
    230232 
    231         void* l; 
     233        long l; 
    232234        int j,k; 
    233235        int* myPtr, myPtr2; 
     
    245247        j=0; 
    246248 
    247         l=(void*)Fopen_Fut("A/aHookList.txt","ab"); 
     249        l=Fopen_Fut("A/aHookList.txt","ab"); 
    248250 
    249251        while (j<aHookNum) 
  • trunk/platform/ixus100_sd780/sub/100c/boot.c

    r876 r955  
    22#include "platform.h" 
    33#include "core.h" 
     4#include "stdlib.h" 
     5#include "gui.h" 
     6#include "../../../../core/gui_draw.h" 
    47 
    58const char * const new_sa = &_end; 
     
    811extern long wrs_kernel_bss_start; 
    912extern long wrs_kernel_bss_end; 
    10 long aHookList[128]; 
     13int* aHookList[128]; 
    1114long aHookNum=0; 
    1215 
     
    139142int jF; 
    140143 
    141         void* l; 
     144        long l; 
    142145        char filen[32]; 
    143146 
    144         l=(void*)Fopen_Fut("A/0xCF90a.bin","ab"); 
    145         Fwrite_Fut(START_ADDRESS,1,FWSIZE,l); 
     147        l = Fopen_Fut("A/0xCF90a.bin","ab"); 
     148        Fwrite_Fut((void*)(START_ADDRESS),1,FWSIZE,l); 
    146149        Fflush_Fut(l); 
    147150        Fclose_Fut(l); 
    148         l=(void*)Fopen_Fut("A/0xCF90b.bin","ab"); 
    149         Fwrite_Fut(START_ADDRESS2,1,FWSIZE,l); 
     151        l = Fopen_Fut("A/0xCF90b.bin","ab"); 
     152        Fwrite_Fut((void*)(START_ADDRESS2),1,FWSIZE,l); 
    150153        Fflush_Fut(l); 
    151154        Fclose_Fut(l); 
  • trunk/platform/ixus100_sd780/sub/100c/capt_seq.c

    r876 r955  
    685685                        "                MOV     R1, #1\n" 
    686686                        "                BL      sub_FF866178\n" 
    687                         "                BL      0xFF81B23C\n"          //ExitTask 
     687                        "                BL      =0xFF81B23C\n"         //ExitTask 
    688688                        "                ADD     SP, SP, #0x20\n" 
    689689                        "                LDMFD   SP!, {R4-R8,PC}\n" 
     
    738738                        "loc_FF899E10:\n" 
    739739                        "                LDR     R0, =0xFF896C24\n"  //aExpdrv_c 
    740                         "                BL      0xFF81B284\n"          //DebugAssert 
     740                        "                BL      =0xFF81B284\n"                 //DebugAssert 
    741741                        "                B       loc_FF899DB8\n" 
    742742                        "loc_FF899E1C:\n" 
     
    11861186                        "                LDRNE   R1, =0x583\n" 
    11871187                        "                LDRNE   R0, =0xFF896C24\n" //aExpdrv_c 
    1188                         "                BLNE    0xFF81B284\n"  //DebugAssert 
     1188                        "                BLNE    =0xFF81B284\n"  //DebugAssert 
    11891189                        "loc_FF897740:\n" 
    11901190                        "                CMP     R5, #1\n" 
     
    11981198                        "                LDRNE   R0, =0xFF896C24\n" //aExpdrv_c 
    11991199                        "                LDMNEFD SP!, {R4-R8,LR}\n" 
    1200                         "                BNE     0xFF81B284\n"  //DebugAssert 
     1200                        "                BNE     =0xFF81B284\n"  //DebugAssert 
    12011201                        "                LDMFD   SP!, {R4-R8,PC}\n" 
    12021202); 
     
    12161216                        "                MOVNE   R1, #0x140\n" 
    12171217                        "                LDRNE   R0, =0xFF888D10\n"  //aShutter_c 
    1218                         "                BLNE    0xFF81B284\n"  //DebugAssert 
     1218                        "                BLNE    =0xFF81B284\n"  //DebugAssert 
    12191219                        "                CMN     R4, #0xC00\n" 
    12201220                        "                LDREQSH R4, [R5,#2]\n" 
     
    12231223                        "                LDREQ   R0, =0xFF888D10\n"  //aShutter_c 
    12241224                        "                STRH    R4, [R5,#2]\n" 
    1225                         "                BLEQ    0xFF81B284\n"  //DebugAssert 
     1225                        "                BLEQ    =0xFF81B284\n"  //DebugAssert 
    12261226                        "                MOV     R0, R4\n" 
    12271227//                      "                BL      sub_FF9A010C\n" //-- 
     
    12361236                        "                LDMNEFD SP!, {R4-R6,LR}\n" 
    12371237                        "                LDRNE   R0, =0xFF888D10\n"  //aShutter_c 
    1238                         "                BNE     0xFF81B284\n"  //DebugAssert 
     1238                        "                BNE     =0xFF81B284\n"  //DebugAssert 
    12391239                        "                LDMFD   SP!, {R4-R6,PC}\n" 
    12401240); 
  • trunk/platform/ixus100_sd780/wrappers.c

    r876 r955  
    1818} 
    1919 
    20 //VERIFY_SD780 Only one arg? 
    21 long OpLog_Get(long i) 
    22 { 
    23         return _OpLog_Get(i); 
    24 } 
     20// VERIFY_SD780 Only one arg? - unknown 
     21// I dared to comment it out, because it produced 
     22// a warning, but is not called anywhere - ultimA 
     23//long OpLog_Get(long i) 
     24//{ 
     25//      return _OpLog_Get(i); 
     26//} 
  • trunk/platform/ixus40_sd300/kbd.c

    r515 r955  
    4343} SEM_B_STATE; 
    4444 
    45 typedef void *SEM_ID;  
     45typedef int SEM_ID;  
    4646extern SEM_ID _semBCreate(int options, SEM_B_STATE initialState); 
    4747extern STATUS _TakeSemaphore(SEM_ID, int); 
  • trunk/platform/ixus60_sd600/kbd.c

    r515 r955  
    33#include "core.h" 
    44#include "keyboard.h" 
     5#include "stdlib.h" 
    56 
    67#define KEY_MASK 0x17FF 
  • trunk/platform/ixus65_sd630/kbd.c

    r515 r955  
    33#include "core.h" 
    44#include "keyboard.h" 
     5#include "stdlib.h" 
    56 
    67#define KEY_MASK 0x17FF 
  • trunk/platform/ixus65_sd630/sub/100a/lib.c

    r820 r955  
    4040void *vid_get_viewport_fb_d() 
    4141{ 
    42     return 0x104AFCA0; 
     42    return (void*)0x104AFCA0; 
    4343    //return (void*)(*(int*)); 
    4444} 
  • trunk/platform/s5is/sub/101a/boot.c

    r750 r955  
    22#include "platform.h" 
    33#include "core.h" 
     4#include "stdlib.h" 
    45 
    56const char * const new_sa = &_end; 
  • trunk/platform/s5is/sub/101b/boot.c

    r750 r955  
    22#include "platform.h" 
    33#include "core.h" 
     4#include "stdlib.h" 
    45 
    56const char * const new_sa = &_end;