Porting chdk to the G9 - page 6 - DryOS Development - CHDK Forum supplierdeeply

Porting chdk to the G9

  • 245 Replies
  • 126167 Views
Re: Porting chdk to the G9
« Reply #50 on: 22 / April / 2008, 14:59:57 »
Advertisements
I'm surely not a programmer,
added the following code at the beginning of \resetcode\main.c

long* led=(long*)0xC0220094;

void on(void)
{
 *led=0x46;
}

But nothing happens

Is it possible to control if this led addresses are correct looking at the dump?
« Last Edit: 22 / April / 2008, 15:02:57 by bongo_bingo »

*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Porting chdk to the G9
« Reply #51 on: 22 / April / 2008, 15:27:30 »
I'm surely not a programmer,
added the following code at the beginning of \resetcode\main.c

long* led=(long*)0xC0220094;

void on(void)
{
 *led=0x46;
}

But nothing happens

Did you call this function at least?
CHDK Developer.

Re: Porting chdk to the G9
« Reply #52 on: 22 / April / 2008, 15:39:34 »
I'm surely not a programmer,

Well, I'm not a programmer, neither.  ;)


added the following code at the beginning of \resetcode\main.c

long* led=(long*)0xC0220094;

void on(void)
{
 *led=0x46;
}

But nothing happens

This code worked for me well when I dumped the firmware by "g7_blinker"

Is it possible to control if this led addresses are correct looking at the dump?

The LED addresses shuold be correct (I've discovered them when I was working on blinking the firmware)

Probably your code those not  arrive to that point when you try to turn on the led.
Try to place it in an erarlier point. (I think)

Cheers

Edit1: The led addresses refer to 1.00D, but I think (hope) they are the same in 1.00D and 1.00F .
« Last Edit: 22 / April / 2008, 15:42:21 by Titan_G9 »

Re: Porting chdk to the G9
« Reply #53 on: 22 / April / 2008, 15:52:58 »
Isn't \resetcode\main.c the first thing wich loads?

How to use gensig.exe?

GrAnd you suggested to compare the g9 and the a720 diskboot.bin in ida, can you, please, suggest  even the addresses?


Re: Porting chdk to the G9
« Reply #54 on: 22 / April / 2008, 16:01:25 »
bongo:

http://chdk.wikia.com/wiki/G9 section "How to dump the G9 firmware" there are 3 diskboot.bin files
(AF beam, Blue led, ISO Led) If you try each one you can be sure the led blinking working.  :)


*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Porting chdk to the G9
« Reply #55 on: 22 / April / 2008, 16:02:09 »
How to use gensig.exe?

It's used automatically in some cases. Your case does not need it.


GrAnd you suggested to compare the g9 and the a720 diskboot.bin in ida, can you, please, suggest  even the addresses?

Not DISKBOOT.BIN, but PRIMARY.BIN.



And again: In which function you calls the 'on()' function?
« Last Edit: 22 / April / 2008, 16:05:20 by GrAnd »
CHDK Developer.

Re: Porting chdk to the G9
« Reply #56 on: 22 / April / 2008, 17:29:36 »
A very dirty thing in \loader\resetcode\main.c

Edit 1:

ops, wrong file I've sended
« Last Edit: 22 / April / 2008, 17:48:22 by bongo_bingo »

Re: Porting chdk to the G9
« Reply #57 on: 23 / April / 2008, 06:16:16 »
The light works with the diskboot on the g9 wiki.

I'm posting the actual modified sources.

It wont compile anymore, don't know what I've changed. :'(

-> main.elf
../platform/g9/sub/100f/libplatformsub.a(stubs_entry_2.o): In function `_taskSus
pend':
stubs_entry_2.S:(.text+0x358): undefined reference to `FFC00958'
collect2: ld returned 1 exit status
c:\CHDK\gcc\bin\gmake[1]: *** [main.elf] Error 1
gmake: *** [all-recursive] Error 1

Edit 1:

- I'll upload my primary.bin when zshare back on line

« Last Edit: 23 / April / 2008, 06:43:54 by bongo_bingo »


*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Porting chdk to the G9
« Reply #58 on: 23 / April / 2008, 06:48:52 »
It wont compile anymore, don't know what I've changed. :'(
stubs_entry_2.S:(.text+0x358): undefined reference to `FFC00958'

It looks like you modified something in stubs_entry_2.S and wrote the FFC00958 (instead of 0xFFC00958 ?).
CHDK Developer.

Re: Porting chdk to the G9
« Reply #59 on: 23 / April / 2008, 14:24:27 »
It wont compile anymore, don't know what I've changed. :'(
stubs_entry_2.S:(.text+0x358): undefined reference to `FFC00958'

It looks like you modified something in stubs_entry_2.S and wrote the FFC00958 (instead of 0xFFC00958 ?).

You were right!

Anyway, I fixed the error but there's a little something that wont work.

GrAnd, I want to try to analyze the a720 dump, which are the addresses to load it in Ida?

Observation:

Last night I forgot the sd with the diskboot I've compiled in the cam, thi morning the battery were down.

 

Related Topics