supplierdeeply

Porting chdk to the G9

  • 245 Replies
  • 61780 Views
  • Publish
    Re: Porting chdk to the G9
    « Reply #160 on: 16 / June / 2008, 01:31:12 »
    Advertisements
    Keep at it guys, I need this for my Photo biz.
     
    Good Luck, and Thank you,

    dan

  • Publish
    Re: Porting chdk to the G9
    « Reply #161 on: 18 / June / 2008, 05:23:46 »
    Ciao a tutti,

    hi dwl, maybe the problem is in

    Code: [Select]
    void boot() { //#fs
        long *canon_data_src = (void*)0xFFE9C5D0;
        long *canon_data_dst = (void*)0x1900;
        long canon_data_len = 0xfc04 - 0x1900; // data_end - data_start
        long *canon_bss_start = (void*)0x140e4; // just after data
        long canon_bss_len = 0xb0b68 - 0x140e4;


    in my dump at FFE9C5D0 I have:

    Code: [Select]
    ROM:FFE9C5D0                 DCB    0
    ROM:FFE9C5D1                 DCB    0
    ROM:FFE9C5D2                 DCB    0
    ROM:FFE9C5D3                 DCB    0
    ROM:FFE9C5D4                 DCB    0
    ROM:FFE9C5D5                 DCB    0
    ROM:FFE9C5D6                 DCB    0

    Can you see what you find in yours?

    The same location for the a720 is:

    Code: [Select]
    ROM:FFE9C5D0 unk_FFE9C5D0    DCB    0                ; DATA XREF: ROM:off_FFC00188o
    ROM:FFE9C5D0                                         ; ROM:off_FFC13794o
    ROM:FFE9C5D1                 DCB    0

    Edit 1:

    I've added FF812D70 to boot.c, then gcc gives a lot of errors like:

    Code: [Select]
    movie_rec.c:(.text+0x934): undefined reference to `sub_FFC661EC'
    ../platform/g9/sub/100f/libplatformsub.a(movie_rec.o): In function `loc_FFC651C4
    « Last Edit: 18 / June / 2008, 05:55:31 by bongo_bingo »

    *

    Offline dlw

    • *
    • 22
  • Publish
    Re: Porting chdk to the G9
    « Reply #162 on: 18 / June / 2008, 19:22:53 »
    Good to hear from you.  My dump has:
    ROM:FFE9C5D0                 DCD 0xC0BFFB03
    ROM:FFE9C5D4                 DCD 0xFE87C37F
    ROM:FFE9C5D8                 DCD 0x7C80033E
    ROM:FFE9C5DC                 DCD 0x800300
    ROM:FFE9C5E0                 DCD 0x140020
    ROM:FFE9C5E4                 DCD 0x20
    ROM:FFE9C5E8                 DCD 0x38000000
    ROM:FFE9C5EC                 DCD 0xFF3F001C
    and more that doesn't seem to convert to sensible ARM instructions.  I made a "full" 8MB dump -- if yours is 4MB, you may be seeing zeroes because of that.  But thanks for a place in boot.c to start looking.

    <I can't seem to get the "insert quote" feature to work today.  But you said:>

    I've added FF812D70 to boot.c, then gcc gives a lot of errors like:

    Code:
    movie_rec.c:(.text+0x934): undefined reference to `sub_FFC661EC'
    ../platform/g9/sub/100f/libplatformsub.a(movie_rec.o): In function `loc_FFC651C4

    which makes it look like boot.c compiled fine and the compiler moved on to movie_rec.c.  If so, you may have solved the boot.c problem!

  • Publish
    Re: Porting chdk to the G9
    « Reply #163 on: 19 / June / 2008, 02:31:13 »
    ...

    which makes it look like boot.c compiled fine and the compiler moved on to movie_rec.c.  If so, you may have solved the boot.c problem!

    I don't think so.


    My dump has:
    ROM:FFE9C5D0                 DCD 0xC0BFFB03
    ROM:FFE9C5D4                 DCD 0xFE87C37F
    ROM:FFE9C5D8                 DCD 0x7C80033E
    ROM:FFE9C5DC                 DCD 0x800300
    ROM:FFE9C5E0                 DCD 0x140020
    ROM:FFE9C5E4                 DCD 0x20
    ROM:FFE9C5E8                 DCD 0x38000000
    ROM:FFE9C5EC                 DCD 0xFF3F001C
    and more that doesn't seem to convert to sensible ARM instructions.  I made a "full" 8MB dump -- if yours is 4MB, you may be seeing zeroes because of that.

    Please take a look on what you have at FFB2E3F4.


    *

    Offline dlw

    • *
    • 22
  • Publish
    Re: Porting chdk to the G9
    « Reply #164 on: 21 / June / 2008, 13:56:02 »
    Looks like the forum website is down.  I'll keep this log going until I can upload it.

    June 19:  You were right.  Good thinking.  I substituted FFB2E3F4 for FFE9C5D0 and sub_FF812D70 executed farther.  uHwSetup_my and CreateTask_Startup_my are entered and exited.  Now processing halts in task_Startup_my.  I'll keep hunting.

    June 20:  Substitute "BL     sub_FF81517C\n" for
                    "BL      sub_FF8151C0\n"  // taskcreate_ClockSave
    and execution continues through the end of task_Startup_my (with CreateTask_Physw() and CreateTask_spytask() commented out).

    So I guess the keyboard is next. . .  I'll look at Physw as I have time.

    edit:  Wait a minute -- if all this startup code works, shouldn't the camera go to a normal start?  Mine doesn't.
    If the camera is supposed to start (using the firmware CreateTask_Physw), then I have some debugging to do.  Any ideas?

    edit again:  Now I'm frustrated.  I do not get through all the startup code.  My LED-blinking register choices are affecting the firmware code execution.  I have to do some more tracing.  But still, the regular software should load and run, right?
    « Last Edit: 21 / June / 2008, 16:56:14 by dlw »

  • Publish
    Re: Porting chdk to the G9
    « Reply #165 on: 21 / June / 2008, 22:37:22 »
    Good work dlw and bongo.

    I know a community of 1000+ G9 owners who don't post here are all anxiously awaiting this :)

  • Publish
    Re: Porting chdk to the G9
    « Reply #166 on: 23 / June / 2008, 03:17:16 »
    ...
    edit:  Wait a minute -- if all this startup code works, shouldn't the camera go to a normal start?  Mine doesn't.
    If the camera is supposed to start (using the firmware CreateTask_Physw), then I have some debugging to do.  Any ideas?

    edit again:  Now I'm frustrated.  I do not get through all the startup code.  My LED-blinking register choices are affecting the firmware code execution.  I have to do some more tracing.  But still, the regular software should load and run, right?


    Hello dlw,
    this is what GrAnd and jeff666 wrote  to be the very first step of the porting.
    In the previous pages of this thread jeff666 wrote about a simple hardware hack to boot the cam, but I can't boot the g9 even if didn't divert the first sub.
    To be more precise: I open the battery cover, press the cover switch with something, press the play button, remove the sd-card, the cam doesn't turn on until I press the play button again.

    News: I've put a debug-led in task_Startup_my, the led blinks one time when I turn on the cam and if I push the power or the play button. Anyway the lcd remain blank.

    Later I'll post my complete source.

    Edit 1: I'm posting my actual boot.c, I cannot trace the code in task_Startup_my after "BL      sub_FF81517C_my\n"  // taskcreate_ClockSave. I've tryed to add that sub (sub_FF81517C_my) which is executed but doesn't turn.

    bye

    Good work dlw and bongo.

    I know a community of 1000+ G9 owners who don't post here are all anxiously awaiting this :)

    1000+? really?  :o
    then it seems that we g9 users are the most unfamiliar with arm'ing and coding.

    Why don't you ask to the real developers to give a stronger hand ? :)
    « Last Edit: 23 / June / 2008, 05:50:04 by bongo_bingo »

    *

    Offline dlw

    • *
    • 22
  • Publish
    Re: Porting chdk to the G9
    « Reply #167 on: 24 / June / 2008, 17:26:18 »
    Thanks for the info and the source, b_b.  I don't have a lot of time this week, but I'll look at the source and try the battery cover as I can -- and post my results.


    *

    Offline dlw

    • *
    • 22
  • Publish
    Re: Porting chdk to the G9
    « Reply #168 on: 26 / June / 2008, 16:06:10 »
    Compiling your source gave this error:

    ../platform/g9/sub/100f/libplatformsub.a(boot.o): In function `loc_FF82D740':
    boot.c:(.text+0x618): undefined reference to `sub_FF8709DC'
    collect2: ld returned 1 exit status
    C:\CHDK\gcc\bin\gmake[1]: *** [main.elf] Error 1
    gmake: *** [all-recursive] Error 1

    which doesn't make sense -- the call is perfectly in order.  Oh well -- I'll keep hunting.

  • Publish
    Re: Porting chdk to the G9
    « Reply #169 on: 28 / June / 2008, 09:15:24 »
    Compiling your source gave this error:

    ../platform/g9/sub/100f/libplatformsub.a(boot.o): In function `loc_FF82D740':
    boot.c:(.text+0x618): undefined reference to `sub_FF8709DC'
    collect2: ld returned 1 exit status
    C:\CHDK\gcc\bin\gmake[1]: *** [main.elf] Error 1
    gmake: *** [all-recursive] Error 1

    which doesn't make sense -- the call is perfectly in order.  Oh well -- I'll keep hunting.
    Hello dlw,
    try to put primary.bin in your platform/sub/100f directory.
    I have no news, don't know how to forward.

    I'm linking the zip ofmy platform/g9 directory, take a look.
    http://www.zshare.net/download/143475462f6c135f/

    bye

     

    Related Topics