I Got My 40D's LED to Light Up! - DSLR Hack development - CHDK Forum

I Got My 40D's LED to Light Up!

  • 22 Replies
  • 20383 Views
*

ASalina

I Got My 40D's LED to Light Up!
« on: 02 / June / 2008, 03:47:17 »
Advertisements
YES! The program to generate .fir files is working now and the little LED scanner program loaded (as though it was a firmware updater). It flashed the drive activity LED and the Direct Print button's LED (the button itself has an LED in it that I didn't know about until just now).

I am psyched! Although the LEDs didn't flash out the offset from 0xC0220000 like I had hoped (I think the delay is too short?), it does prove that programs can be run as if they were the firmware updater/flasher.

Now I have to use udumper instead of the LED scanner!

Wish me luck!

*

Offline mx3

  • ****
  • 372
Re: I Got My 40D's LED to Light Up!
« Reply #1 on: 02 / June / 2008, 04:14:17 »
YES! The program to generate .fir files is working now and
please share your packer and LED scanner
attach them to forum
skype: max_dtc. ICQ: 125985663, email: win.drivers(at)gmail, eVB decompiler

*

ASalina

Re: I Got My 40D's LED to Light Up!
« Reply #2 on: 02 / June / 2008, 05:13:36 »
YES! The program to generate .fir files is working now and
please share your packer and LED scanner
attach them to forum

Don't ever type "rm * .zip" when you meant to type "rm *.zip"...
You'll erase all of your work. Like I just did.

I'll have to see if I can pull the files back somehow. and post them when I can

*

ASalina

Re: I Got My 40D's LED to Light Up!
« Reply #3 on: 02 / June / 2008, 06:40:09 »
Ok, I was able to retrieve the files from the partition.

Zip file below contains source for mkfir and scanled plus needed files pheader.tmpl and fheader.tmpl.


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: I Got My 40D's LED to Light Up!
« Reply #4 on: 02 / June / 2008, 06:51:34 »
thats the reason why i aliased
Quote
alias rm 'rm -i'
in my rconfig :D

nice find, thumbs up :)

Re: I Got My 40D's LED to Light Up!
« Reply #5 on: 02 / June / 2008, 07:22:47 »
nice !
now you can grab an old  mouse, pull out the light reciver, connect it to the microphone, and record with something (:Audacity). There you can count easyer.

Usefull thing is also ESD. I used it to make a real-time microphone-console. It transferes the audio data from the mic to stdout. I redirect it to my program. Program analyse it and print out the messages on the screen.

*

Offline mx3

  • ****
  • 372
Re: I Got My 40D's LED to Light Up!
« Reply #6 on: 02 / June / 2008, 07:23:25 »
Zip file below contains source for mkfir and scanled.

why do you need "j" loop?
update: sorry. why to use weird addresses (X1,X2,X3)? (ARM architecture does not support well such data alligments)
I think you scan procedure shoul be something like that

Code: [Select]
scan()
{
long *base = (long*)0xC0220000, *addr;
long k;

for(addr = base; addr < base + 0x100; addr++){
k = *addr;
*addr = 0x46;
delay(1<<15);
*addr = k;
delay(1<<15);
}
}


also I'm not sure about -Ttext,1900
« Last Edit: 02 / June / 2008, 07:33:53 by mx3 »
skype: max_dtc. ICQ: 125985663, email: win.drivers(at)gmail, eVB decompiler

Re: I Got My 40D's LED to Light Up!
« Reply #7 on: 02 / June / 2008, 07:30:32 »
the "j" loop is to blik out the offset. If led is at 0xC02200A0 - it will blink 40 times (40*sizeof(int)=0xA0).

I think it should be -Ttext,0x800000 or -Ttext,0x800030 - I don't know where is code aligned in 40D (in 400D code starts at 0x800030)
« Last Edit: 02 / June / 2008, 07:32:45 by owerlord »

*

ASalina

Re: I Got My 40D's LED to Light Up!
« Reply #8 on: 02 / June / 2008, 07:32:38 »
@mx3

>why do you need "j" loop?

It blinks out the offset from the base address. You count the blinks and add that to the base address to get the LED's address.

>why to use weird addresses (X1,X2,X3)? (ARM architecture >does not support well such data alligments)

I'm not sure what you mean?

>I think you scan procedure shoul be something like that

I'll look at your code and try it.

>also I'm not sure about -Ttext,1900

Nor am I. I got that from udumper. It seems to work, though.

Re: I Got My 40D's LED to Light Up!
« Reply #9 on: 02 / June / 2008, 07:36:59 »
I spend a bit of IDA analysing code from my compilations, and ended with something like that:

entryadr=0x800030

CFLAGS=-nostdlib -march=armv5te -fno-builtin
LDFLAGS=-Wl,-Ttext,$(entryadr)

You can add -O2 if you want - but it is no fun when you analyse the code, becose it just erase all the code that don't do anything. - it can erase your delay also !!

 

Related Topics


SimplePortal © 2008-2014, SimplePortal