Magic Lantern Releases > Archived porting threads

Canon 7D ML

(1/11) > >>

Pelican:
Thanks to g3gg0 it's coming soon now, so it's time to open this topic... :-)
I've already built 7D ML from the latest source and started to check the features.
What is the workflow of the developing?

a1ex:
The current problem is how to enable the bootflag without having to distribute Canon code.

Currently, user code runs after loading the FIR, but the camera gets restarted after a very small period of time (g3gg0 estimated 50ms). It's probably not safe to alter the ROM in this situation.

Indy's solution was to post a bspatch. I don't like to use this idea for regular users (for developers may be OK) because:

1) it's not that easy to use
2) it enables other users to do a derivative work from Canon's copyrighted code (the updater); if they post it online, I smell trouble.

Point 2) applies to any program that patches the original firmware IMO.

Pelican:
I see.
I enabled the bootflag on my camera with a patched firmware update too.
Hmm. And we cannot make a magiclantern.fir file as for the other cameras...

g3gg0:

--- Quote from: Pelican on October 02, 2012, 12:41:29 PM ---I see.
I enabled the bootflag on my camera with a patched firmware update too.
Hmm. And we cannot make a magiclantern.fir file as for the other cameras...

--- End quote ---

you enabled the flag on 7D? Or did you enable it on models where we can run our own (not canon patched) updater code?

thats the problem on 7D. we can run our updater code, but it seems we must do some special comm, else the slave cpu gets reset.
i dont know if it is IPC comm with master processor, or if it is some watchdog or whatever.

the "normal" firmware boot with ML enabled is now possible because of the ipc command register, we have to write with 0x80000010. see reboot.c.
if we don't write that command, both digics are out of sync and firmware will halt.
(see http://magiclantern.wikia.com/wiki/Register_Map in section IPC - there is a list of Slave->Master commands
written to that register.

a more cleaner version of that missing piece for 7D looks like that:

--- Code: ---        /* clear IPC interrupt lines */
        *(volatile int*)0xC0A0000C = *(volatile int*)0xC0A00008;
        /* send command to master processor, so it is in right state for rebooting */
        *(volatile int*)0xC0A00024 = 0x80000010;
        /* wait for interrupt */
        asm("MCR p15, 0, R0, c7, c0, 4\n":::"r0");
       
        /* clear IPC interrupt lines */
        *(volatile int*)0xC0A0000C = *(volatile int*)0xC0A00008;

--- End code ---

Pelican:

--- Quote from: g3gg0 on October 02, 2012, 03:04:44 PM ---you enabled the flag on 7D?

--- End quote ---
Yes, I've enabled the bootflag with the original Canon 1.1.0 fw updater patched by TH (or Indy?) wich makes the ROM dumps.

Navigation

[0] Message Index

[#] Next page

Go to full version