Ixus Wireless - SD430 Porting thread - page 7 - General Help and Assistance on using CHDK stable releases - CHDK Forum

Ixus Wireless - SD430 Porting thread

  • 131 Replies
  • 22490 Views
*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #60 on: 11 / October / 2013, 16:23:43 »
Advertisements
I'll try that.


*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #61 on: 11 / October / 2013, 16:33:07 »
For the record, I changed the code in in my chdk.trunk/platform/generic/main.c as follows.

Code: [Select]
    stop_hooking = 1;
    } else {
    // hook/replace another tasks
    /*
    if (my_ncmp(name, "tPhySw", 6) == 0){
        *entry = (long)physw_hook;
    }

    if (my_ncmp(name, "tInitFileM", 10) == 0){
        init_file_modules_prev = (void*)(*entry);
      #if CAM_MULTIPART
        *entry = (long)init_file_modules_task;
      #else
        *entry = (long)init_file_modules_hook;
      #endif
    }

    if (my_ncmp(name, "tCaptSeqTa", 10) == 0){
        *entry = (long)capt_seq_hook;
    }
    */
    if (my_ncmp(name, "tMovieReco", 10) == 0){
      #if CAM_CHDK_HAS_EXT_VIDEO_MENU


Recompiled, tested...
The problem is still there.

*

Offline srsa_4c

  • ******
  • 4107
Re: Ixus Wireless - SD430 Porting thread
« Reply #62 on: 11 / October / 2013, 16:44:11 »
The problem is still there.
Next: spytask. I could be a problem in boot.c too.

edit:
boot.c: try moving
"    BL      sub_FF812130 \n"
to the next asm volatile block, above
"    LDMDB   R11, {R11,SP,PC} \n"
« Last Edit: 11 / October / 2013, 16:57:36 by srsa_4c »

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #63 on: 11 / October / 2013, 18:03:34 »
Thanks. I'll try that in the morning.


*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #64 on: 12 / October / 2013, 06:33:03 »
Reverting the first change and moving that line crashes the camera instantly when I load CHDK. Power light remains on, power button doesn't work, I need to pull the battery to recover. Did you want me to keep the previous change that commented out the hooks?

 
« Last Edit: 12 / October / 2013, 06:35:51 by ahull »

*

Offline srsa_4c

  • ******
  • 4107
Re: Ixus Wireless - SD430 Porting thread
« Reply #65 on: 12 / October / 2013, 07:57:08 »
Reverting the first change and moving that line crashes the camera instantly when I load CHDK. Power light remains on, power button doesn't work, I need to pull the battery to recover. Did you want me to keep the previous change that commented out the hooks?
Does the changed function now look like this?
Code: [Select]
void __attribute__((naked,noinline)) h_usrRoot() {
asm volatile (
"    MOV     R12, SP \n"
"    STMFD   SP!, {R11,R12,LR,PC} \n"
"    SUB     R11, R12, #4 \n"
"    SUB     SP, SP, #8 \n"
"    STR     R0, [R11, #-0x10] \n"
"    STR     R1, [R11, #-0x14] \n"
"    BL      sub_FF8140B0 \n"
"    LDR     R0, [R11, #-0x10] \n"
"    LDR     R1, [R11, #-0x14] \n"
"    BL      sub_FFC1C448 \n"
"    LDR     R0, [R11, #-0x10] \n"
"    LDR     R1, [R11, #-0x14] \n"
"    BL      sub_FFC1CEC0 \n"
"    BL      sub_FF813C00 \n"
"    BL      sub_FF813B08 \n"
"    MOV     R0, #0x32 \n"
"    BL      sub_FFC1F444 \n"
"    BL      sub_FF814104 \n"
"    BL      sub_FF8140DC \n"
"    BL      sub_FF814138 \n"
"    BL      sub_FF814050 \n"
"    BL      sub_FFC1ED04 \n"
"    BL      sub_FF81409C \n"
);

    _taskCreateHookAdd(createHook);
    _taskDeleteHookAdd(deleteHook);

    drv_self_hide();

// Return from subroutine
asm volatile (
"    BL      sub_FF812130 \n"
"    LDMDB   R11, {R11,SP,PC} \n"
);
}
This should actually be the correct code - all other VxWorks ports do it like this. The subroutine named sub_FF812130 is responsible for starting the startup task, putting the hooks behind it doesn't seem right. It could be that other changes are required too.

Try disabling all task hooks - including spytask, and continue like I wrote earlier (re-enabling other tasks gradually when cam is stable). Also, try diskbooting instead of the fw update way.

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #66 on: 12 / October / 2013, 08:21:05 »
Does the changed function now look like this?

It didn't but it does now, and it is a whole lot more stable.. Thanks.

Let me try a few other things.

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #67 on: 12 / October / 2013, 08:57:28 »
Much better.

Scripting works, camera is stable, no more crashes.

Interval.lua shoots without any trouble, I left it running for a couple of minutes with a 5 seconds interval between shots.
motion.lua motion detection works. I shot multiple times, it picked up the motion from around the edges of the frame without any problems.

Only issue I found, if I use the "Make card bootable" option. When I boot from the locked card,  the card will boot, however I see the Canon  splash, followed by the CHDK splash, followed by "No Memory Card".

I can call up CHDK at this point, but any attempt to save a picture is greeted with "Cannot record" from the Canon firmware.
If we can nail this, I will try running the test suite next.

@nafraf if you could make the above changes to your working copy, I'll rebuild afresh from that just to make sure we have all of the changes up to date.
« Last Edit: 12 / October / 2013, 09:04:48 by ahull »


*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #68 on: 12 / October / 2013, 09:59:14 »
Nafraf updated the working copy, I recompiled and set up a fresh SD card.

The Boot from locked card issue remains, pretty much everything is working as expected.

I did a quick HDR using the hdr.lua script, not the most artistic picture ever, but it works.



Here is a low res version, built from 3 .dng files.


*

Offline srsa_4c

  • ******
  • 4107
Re: Ixus Wireless - SD430 Porting thread
« Reply #69 on: 12 / October / 2013, 10:11:24 »
"No Memory Card".
This is something new, so can you confirm that the message is not something about a write protected card? What happens if you make the card bootable on the PC?

 

Related Topics