code you HAVE RUN on your dslr - page 4 - DSLR Hack development - CHDK Forum supplierdeeply

code you HAVE RUN on your dslr

  • 141 Replies
  • 63650 Views
Re: code you HAVE RUN on your dslr
« Reply #30 on: 18 / May / 2008, 06:45:02 »
Advertisements
function list is attached. I exported it after appling some of yours.

What you all think is the next step?
option a) rewrite the romStart function and modyfie it so it will run some our code?
option b) trie to clear some of the memory before runing romStart and wait if it will restart fully this time?

*

Offline Seklth

  • **
  • 54
  • 400D
Re: code you HAVE RUN on your dslr
« Reply #31 on: 18 / May / 2008, 07:00:11 »
i think, if it possible - need doing dump full ROM&RAM. way a) =)

Re: code you HAVE RUN on your dslr
« Reply #32 on: 18 / May / 2008, 12:14:52 »
After running the romStart I counted to 30 to get the menu back.
Now I'm rewriting the romStart - it have the delay also.

actually: I rewrited the romStart, usrInit, usrKernelInit, usrRoot, AppInit. first two work. I'm now searching for errors in the usrKernelInit - but the 30 sec delay is a real pain.

Re: code you HAVE RUN on your dslr
« Reply #33 on: 18 / May / 2008, 12:58:05 »
romStart, usrInit, usrKernelInit, usrRoot works. usrRoot calls the orginal firmware usrAppInit_0.
when I run it, there is the same efect: back to menu, with only "jump" working.

when I make a fopen("A:\test.txt","w") and fclose - it made a diffrence:
menu apears - but the "jump" button don't work. file isn't writen either :\

I think the best thing now is to find what the firmware does before jumping to 0x800000. I can't find it.

NEW: the test was with an error: \ in place of /. when I made it right - the jump button works. but there is no file created :\

NEW: tested the eventproc_EdLedBlink after AppInit - nothing happened.
« Last Edit: 18 / May / 2008, 14:49:32 by owerlord »


*

Offline Seklth

  • **
  • 54
  • 400D
Re: code you HAVE RUN on your dslr
« Reply #34 on: 18 / May / 2008, 15:28:46 »
>I think the best thing now is to find what the firmware does before jumping to 0x800000. I can't find it.
firmware jump to some "Firmware loader" code)) not to 0x800000.

test run eventproc_GenerateDDD =)

*

Offline Seklth

  • **
  • 54
  • 400D
Re: code you HAVE RUN on your dslr
« Reply #35 on: 18 / May / 2008, 15:47:59 »
>usrRoot calls the orginal firmware usrAppInit_0.
usrAppInit_0 - it is taskcreate_Startup.
.....
FW:FF81134C                 LDR     R3, =task_Startup
FW:FF811350                 LDR     R0, =aStartup
FW:FF811354                 STR     R12, [SP,#4+var_4]
FW:FF811358                 BL      CreateTask
.....

1) maybe create our task with some code instead task_Startup
2) test run code (blink, GenerateDDD, example) in end of task_Startup

Re: code you HAVE RUN on your dslr
« Reply #36 on: 18 / May / 2008, 19:01:12 »
mayby later - I'm now searching for some hints on these things:
1. what cause the delay in the code running.
2. what firmware do before running the code
2.a how it's blocking buttons and how to unblock them
2.b why after running it apears in the same place in menu
3. what exactly camera does when you insert the batteries

*

Offline Seklth

  • **
  • 54
  • 400D
Re: code you HAVE RUN on your dslr
« Reply #37 on: 19 / May / 2008, 02:26:46 »
>3. what exactly camera does when you insert the batteries
firmware not have this information\code. it in bootloader, or some other place. need dump...
if GenerateDDD creating file - it's good, and we can save dump =)


Re: code you HAVE RUN on your dslr
« Reply #38 on: 19 / May / 2008, 08:23:16 »
romStart->...->AppInit rewriten. I registered a modyfied Startup task:

int my_Startup()
{ char* nm = "A:/TST.BIN";
  int fl;
  eventproc_Startup();
  vx_file_unknown(nm);
  fl = vx_creat_(nm);
  vx_close_0(fl);
}

Didn't create the file:\ the fileprocedures are from the generateDDD event.

The frustrating thing is - I can't get any feedback. Anything that would confirm that my code is running properly !
Anybody found where the debug text are going ?
« Last Edit: 19 / May / 2008, 08:30:10 by owerlord »

*

Offline jeff666

  • ****
  • 181
  • A720IS
Re: code you HAVE RUN on your dslr
« Reply #39 on: 19 / May / 2008, 09:20:49 »
The frustrating thing is - I can't get any feedback. Anything that would confirm that my code is running properly !

The traditional method is LED activity. Turn on an LED and you know the code has been executed.

Quote
Anybody found where the debug text are going ?

Usually to the console (which is not available to the end-user). You may be able to redirect stdout/stderr to a file, but this is pure guesswork.

Cheers.

 

Related Topics