IXUS 1000 HS Porting Thread - page 8 - DryOS Development - CHDK Forum supplierdeeply

IXUS 1000 HS Porting Thread

  • 437 Replies
  • 99909 Views
*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #70 on: 01 / November / 2010, 05:16:22 »
Advertisements
bernd did you comment all the lines at  core\main.c  in function core_spytask() to see where it fails?

Re: IXUS 1000 HS Porting Thread
« Reply #71 on: 01 / November / 2010, 05:28:11 »
currently not, no time to do until now,  i only want report about the dump, because this cost not so much time
Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #72 on: 01 / November / 2010, 05:44:10 »
I have a first test do.I find not the crash, but i notice what cause the 4 sec wait.seem spytask_can_start is for about 4 sec always 0.and when the 4 sec are over the chdk continue if all is ok or not.

I think something miss to call this function

void core_spytask_can_start() {
        spytask_can_start = 1;
}

Or is this 4 sec delay ok ?

    spytask_can_start=0;

#ifdef CAM_CHDK_PTP
   init_chdk_ptp_task();
#endif

    while((i++<400) && !spytask_can_start) msleep(10);
    blink(); // is called after 4 sec


I see also this Is it possible that i can switch this on, and if so how can it switch on ?

#if CAM_CONSOLE_LOG_ENABLED
....
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #73 on: 01 / November / 2010, 07:09:03 »
but do you reach this function
void core_spytask()
{
...


Re: IXUS 1000 HS Porting Thread
« Reply #74 on: 01 / November / 2010, 07:21:02 »
>but do you reach this function
>void core_spytask()
>{
>...

yes above was a snippet, see here the full code i can execute.but it execute more, question is too if i should search more, or when the wait for spytask_can_start take to long, on other place there is something wrong ?

void core_spytask()
{
    int cnt = 1;
    int i=0;

    raw_need_postprocess = 0;

    spytask_can_start=0;

#ifdef CAM_CHDK_PTP
   init_chdk_ptp_task();
#endif

    while((i++<400) && !spytask_can_start) msleep(10);
    blink(); // blink after 4 sec
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #75 on: 01 / November / 2010, 07:27:00 »
yes you should test down this function to see if all the code inside the while gets executed

    started();
    msleep(50);
    finished();
    drv_self_unhide();

    conf_restore();
    gui_init();

....

usually in some of this functions it could fail due to wrong stubs or other things

and if one of this fails, the next step will be to do the same inside this functions usually     conf_restore(); or     gui_init();
« Last Edit: 01 / November / 2010, 07:34:49 by asm1989 »

Re: IXUS 1000 HS Porting Thread
« Reply #76 on: 01 / November / 2010, 10:13:14 »
it crashes in the function conf_restore();

in the conf_load_defaults func.see here my testcode

void conf_restore() {
    int fd, rcnt, i;
    unsigned short id, size;
    char *buf;
    int offs;
    struct stat st;

    conf_init_defaults();

//blink(); //work
    conf_load_defaults();

blink(); //not work

EDIT:

Is the camera now enough init, so i can add a printf command to print to display ?

so i can add in the funtions something as this

printf("mark 1 reach\n);

....
printf("mark 2 reach\n);

?
« Last Edit: 01 / November / 2010, 10:16:14 by Bernd R »
Ixus 1000 HS

*

Offline reyalp

  • ******
  • 12306
Re: IXUS 1000 HS Porting Thread
« Reply #77 on: 01 / November / 2010, 12:25:35 »
you could write to a file. You'll want to open and close it for each write, otherwise some will be lost when the camera crashes.

You can also right to the cameras log or write to the cameras console and redirect it with uart.req (described in the canon basic docs)
Don't forget what the H stands for.


Re: IXUS 1000 HS Porting Thread
« Reply #78 on: 01 / November / 2010, 14:40:45 »
I find now whats wrong.seem the call address to the stat function is wrong.after some init crash happen in this function in file script.c


void script_load(const char *fn, int saved_params) {

.....

//blink(); //work
    // zero size = default script
    if(stat(fn,&st) != 0 || st.st_size == 0) {
      blink(); // not work
        conf.script_file[0]=0;
        update_vars = 1;
        if(fd) {
            fclose(fd);
            fd=0;
        }
    }
    blink();  // not work


Edit:

 this is call over this conf_change_script_file

CONF_INFO( 38, conf.reader_file,            CONF_DEF_PTR,   ptr:"A/README.TXT", conf_change_script_file),

and this func is call from that code

void conf_load_defaults() {
    register int i;

    for (i=0; i<CONF_NUM; ++i) {
        switch (conf_info.type) {
            case CONF_DEF_VALUE:
                memcpy(conf_info.var, &(conf_info.i), conf_info.size);

                break;
            case CONF_DEF_PTR:

                memcpy(conf_info.var, conf_info.ptr, conf_info.size);
                break;
        }
        //if ( i == 39)blink();  //not work
        if (conf_info.func) {

            conf_info.func();

        }
    }
    //blink();
}
« Last Edit: 01 / November / 2010, 15:28:29 by Bernd R »
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #79 on: 02 / November / 2010, 02:07:25 »
Bernd R , this long loop is where most of the fails are due to incorrect sutbs,

take care because the list in conf dont allway match the number of the index CONF_INFO( 38 ...  may not be the 38 in the loop.

any way comment all the lines that fail for example this one
Code: [Select]
//CONF_INFO( 38, conf.reader_file,            CONF_DEF_PTR,   ptr:"A/README.TXT", conf_change_script_file),
and keep testing, and post all the lines that fail, and I will check the stubs related.

 

Related Topics