ELPH300HS aka IXUS220HS - Porting Thread - page 15 - DryOS Development - CHDK Forum  

ELPH300HS aka IXUS220HS - Porting Thread

  • 899 Replies
  • 399465 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #140 on: 19 / November / 2011, 15:35:57 »
Advertisements
@philmoz :   is there an echo in here ?  :P


Odd, I'm sure the post I responded to was showing as the last post when I replied.
Oh well - probably a brain f..t at my end.

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)

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #141 on: 19 / November / 2011, 15:38:47 »
Wondered if you had me "blocked" = not even sure its possible to do that.

I also noticed that I just started getting DSLR postings again - the "ignore boards" option has been really good about getting rid of that until today.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #142 on: 20 / November / 2011, 13:22:42 »
After putting DISKBOOT.BIN to bootable SDCard and starting camera nothing happens (Screen stays black and no LED is turned on).

Afterwards camera can only be activated again after disabling write-protection on SDCard (to disable autoboot of DISKBOOT.BIN) and remove battery for a short time.

It seems that DISKBOOT.BIN is loaded and executed but probably a wrong address/code is called and that's why the camera doesn't show any reaction.

I already adapted boot.c according to the disassembled firmware (like described here: http://chdk.wikia.com/wiki/Adding_support_of_a_new_firmware_version).

Files capt_seq.c and movie_rec.c still need to be adapted. But I'm wondering if this is really necessary to just see something happen during startup. For me it would be enough if the camera would send me any "life sign" to keep my motivation up.  :)

Currently I don't know what should be my next step!?

Any advice is welcome.  :)

I attached latest version of my boot.c file from today.


Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #143 on: 20 / November / 2011, 13:31:10 »
It seems that DISKBOOT.BIN is loaded and executed but probably a wrong address/code is called and that's why the camera doesn't show any reaction.
This is actually encouraging - you have it so that CHDK's DISKBOOT.BIN is being loaded.  That's often a tough step for people to get to.

Quote
Files capt_seq.c and movie_rec.c still need to be adapted. But I'm wondering if this is really necessary to just see something happen during startup. For me it would be enough if the camera would send me any "life sign" to keep my motivation up.  :)
As long as you don't start them in boot.c,  you don't need working code in either file.

Quote
Currently I don't know what should be my next step!?
Inserting LED blinking code into the loader and then boot.c is the usual next step.  Scan through some different camera loader files for examples ....


Ported :   A1200    SD940   G10    Powershot N    G16


Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #144 on: 20 / November / 2011, 13:33:21 »
Make this change in boot.c to comment out the other tasks :
Code: [Select]
void taskHook(context_t **context)
{
task_t *tcb=(task_t*)((char*)context-offsetof(task_t, context));

// Replace firmware task addresses with ours
// if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
// if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
//if(tcb->entry == (void*)task_PhySw) tcb->entry = (void*)JogDial_task_my;
// if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
// if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;
}
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #145 on: 20 / November / 2011, 14:05:38 »
waterwingz, thanks for the hints!

The loader? Hmm, until now I didn't change anything inside loader folder!? I totally forgot about the loader folder. Are there changes necessary (e.g. in entry.S)?

I adapted main.c in loader folder (attached to this message) with code I found in main.c from loader of ixus200_sd980. Result: I was able to let flash both LEDs (1 on front of camera and 1 on back of camera).  8)





Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #146 on: 20 / November / 2011, 14:29:52 »
I adapted main.c in loader folder (attached to this message) with code I found in main.c from loader of ixus200_sd980. Result: I was able to let flash both LEDs (1 on front of camera and 1 on back of camera).  8)
Walk that code forward through the loader code and then try it at the start of the second function module ( sub_FFC00358_my() )  in boot.c ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #147 on: 20 / November / 2011, 14:52:11 »
I did what you told me, and the following functions have been entered in boot.c (verified by LED on/off):
boot()
sub_FFC00358_my()
sub_FFC011B0_my()

 :)

Functions that are currently not entered yet:
sub_FF815EE0_my()
taskcreate_Startup_my()
task_Startup_my()
taskcreatePhySw_my()

Assumption: Somewhere in function sub_FFC011B0_my() the execution stops or fails. Will try to investigate.

Attached: new version of boot.c with LED test sequences.


Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #148 on: 20 / November / 2011, 14:59:19 »
I did what you told me, and the following functions have been entered in boot.c (verified by LED on/off):
boot()

Warning :  almost everyone gets a little "happy" with fancy LED blinking at this point.  Which tends to clobber registers and create timing problems.  Stick to :

Code: [Select]
"LDR     R1, =0xC0220130\n" // Back LED
"MOV     R0, #0x44\n"
"STR     R0, [R1]\n"

If you can get connected to IRC,  you can usually get more real-time help ( if reyalp,  philmoz or I are there -  response varies the rest of the time.

http://webchat.freenode.net/
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #149 on: 20 / November / 2011, 16:55:16 »
Thanks, I understand that using loops will probably have big influence on timing or generate other issues. Lessons learned: No more loops. ;)

I also tried to avoid register conflicts and I was able to reach code line 263 in attached boot.c.

But function sub_FF815EE0_my() seems not to be reached. Maybe this has to do with call of sub_FFC034C4?

@Sush, how about you? Any progress on your side?

BR,
tommi



 

Related Topics