SX160 IS porting thread - page 2 - DryOS Development - CHDK Forum

SX160 IS porting thread

  • 101 Replies
  • 56059 Views
Re: SX160 IS porting thread
« Reply #10 on: 06 / March / 2013, 16:43:24 »
Advertisements
Is this behavior expected for a starting port?
Anything can , and usually does, happen with a starting port.   If this was a completed port,  what you see is normally the result of trying to load CHDK for the wrong firmware version for your camera.  But with a new port,  it probably means your loader code,  or boot.c code is not right.   One common technique at this point is to add a little code to turn on one of the camera LED's during the boot process to help you figure out where things are crashing.

At least you know the camera is recognizing the bootable card so its probably formatted correctly.



« Last Edit: 06 / March / 2013, 16:49:51 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14128
Re: SX160 IS porting thread
« Reply #11 on: 06 / March / 2013, 17:35:30 »
Anything can , and usually does, happen with a starting port.   If this was a completed port,  what you see is normally the result of trying to load CHDK for the wrong firmware version for your camera.  But with a new port,  it probably means your loader code,  or boot.c code is not right.crashing.
Also just to be clear, when the camera "doesn't start" this usually means it crashed very early in the boot processes, before any LEDs were turned on.

Depending where the crash is, it's possible you will get a camera crash romlog. The debugging page on the the wiki http://chdk.wikia.com/wiki/Debugging has some tips various debugging techniques, and also describes how to download the romlog.

Since you don't yet have a working port, you'd need to use the canon basic script method to get the romlog.

One other thing that happens: The camera can hang instead of crashing. This will make it appear to be completely dead, and it won't power on again until you've disconnected and reconnected the battery.
Don't forget what the H stands for.

Re: SX160 IS porting thread
« Reply #12 on: 08 / March / 2013, 15:39:10 »
Green Led: 0xC0220048

Re: SX160 IS porting thread
« Reply #13 on: 11 / March / 2013, 14:36:53 »
Green Led: 0xC0220048

Tested this address for the Green Led on my Canon SX160 IS and didn't work.

Re: SX160 IS porting thread
« Reply #14 on: 11 / March / 2013, 15:59:18 »
Green Led: 0xC0220048

Tested this address for the Green Led on my Canon SX160 IS and didn't work.

Sorry about that. The correct is 0xC0220120

Re: SX160 IS porting thread
« Reply #15 on: 11 / March / 2013, 16:31:56 »
SX160 LEDs:

GREEN: 0xC0220120
AF: 0xC0223030


Re: SX160 IS porting thread
« Reply #16 on: 13 / March / 2013, 09:19:23 »
SX160 LEDs:

GREEN: 0xC0220120
AF: 0xC0223030

Great EYScudeler, just tested these values with my sx160 and it's correct! Thanks

Re: SX160 IS porting thread
« Reply #17 on: 14 / March / 2013, 11:15:59 »
Guys, how stubs_auto.S and stubs_entry.S are related? It looks like one is generated from the code ( boot.c capt_seq.c movie_rec.c -> stubs_auto.S is printed in the console and I've confirmed this ) and the other is generated from PRIMARY.BIN.

stubs_auto.S should describe both address from the code (boot.c) and from PRIMARY.BIN?

Maybe this is happening because I started my port from another? If so how to correct this?



*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: SX160 IS porting thread
« Reply #18 on: 14 / March / 2013, 14:57:56 »
Guys, how stubs_auto.S and stubs_entry.S are related? It looks like one is generated from the code ( boot.c capt_seq.c movie_rec.c -> stubs_auto.S is printed in the console and I've confirmed this ) and the other is generated from PRIMARY.BIN.

stubs_auto.S should describe both address from the code (boot.c) and from PRIMARY.BIN?

Maybe this is happening because I started my port from another? If so how to correct this?


So long as the correct PRIMARY.BIN is in the platform/CAMERA/sub/FIRMWARE directory then stubs_entry.S will be generated automatically (unless you disabled OPT_GEN_STUBS in buildconf.inc).

Stubs_auto.S is created from the assembly code in boot.c, capt_seq.c and movie_rec.c so that any references to firmware addresses (sub_XXXXXXXX) are correctly compiled).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline jer

  • *
  • 10
Re: SX160 IS porting thread
« Reply #19 on: 15 / March / 2013, 07:57:26 »
Hi all ...

since a few weeks I own an SX160IS camera, and I am quite interested in this CHDK port as well.
I managed to set up the arm toolchain, and am able to compile boot images for
existing ports (sx130is, a430).

Using nafraf's blind port as a starting point, and the green LED address provided by EYScudeler my boot process stops here:

Code: [Select]
boot.c, nafraf's blind port, boot.c (line 402):

// LED ok!
      "BL      sub_004327E8 \n"
// LED not ok!

// LED ok?
// [ 130315-jer start
// http://chdk.wikia.com/wiki/Debugging
// http://chdk.setepontos.com/index.php?topic=9523.15
      "STMFD   SP!, {R0,R1} \n"
      "LDR     R0, =0xC0220120 \n"   // sx160is green LED
//    "LDR     R0, =0xC0223030 \n"   // sx160is AF    LED
      "MOV     R1, #0x46 \n"
      "STR     R1, [R0] \n"
      "LDMFD   SP!, {R0,R1} \n"
// ] 130315-jer end 

      "ADD     SP, SP, #0x74 \n"
      "LDR     PC, [SP], #4 \n"
I);

I know there is lots of good documentation around, but still the task is challenging. Thus, any hints how to proceed from here would be much appreciated ...
Thanks!


sx160is

 

Related Topics


SimplePortal © 2008-2014, SimplePortal