initial ML version for 600D/T3i

1,169 views
Skip to first unread message

indy arm

unread,
May 21, 2011, 7:28:47 PM5/21/11
to ml-devel
Hi,

Please find:
- an minimal version of ML that set the bootflag.
- Stubs and Consts files for "autoexec.bin" development

Thanks to Chucho for the very first test!

Most work has been done by Alex and assembled by me.
we used this tag as a starting point: https://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93

Any developer for the 600D/T3i will be helped to port the 550d and 60d features.

Indy (who do not have a 600d ;-)

autoexec.bin
magiclantern.fir
stubs-600d.101.S
consts-600d.101.h

arm.indy

unread,
May 21, 2011, 7:31:46 PM5/21/11
to Magic Lantern firmware development
this is for Canon firmware 1.0.1, so upgrade first !
>  autoexec.bin
> 70KAfficherTélécharger
>
>  magiclantern.fir
> 70KAfficherTélécharger
>
>  stubs-600d.101.S
> 9KAfficherTélécharger
>
>  consts-600d.101.h
> 6KAfficherTélécharger

JaKob

unread,
May 21, 2011, 9:09:48 PM5/21/11
to ml-d...@googlegroups.com
this is so cool the 

~~~poor 7D~~~

- Jakob



--
http://magiclantern.wikia.com/
 
To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

XFracture (aka Herb)

unread,
May 23, 2011, 3:00:23 PM5/23/11
to Magic Lantern firmware development
I installed this on my t3i, per the 550d instructions (using these
files). The ML hook installed (shows in firmware), but ML will not
launch when trashcan button. SD card made bootable with the macboot
utility, camera set to "P" to install, set to "movie" when trying to
activate.
>  autoexec.bin
> 70KViewDownload
>
>  magiclantern.fir
> 70KViewDownload
>
>  stubs-600d.101.S
> 9KViewDownload
>
>  consts-600d.101.h
> 6KViewDownload

erik venhues

unread,
May 23, 2011, 8:16:54 PM5/23/11
to Magic Lantern firmware development
same here, but so far i understoud its

"an minimal version of ML that set only the bootflag."

no other functions yet.

i have a 600d and i am free to test any versions :)

On May 23, 9:00 pm, "XFracture (aka Herb)" <herbhalst...@gmail.com>
wrote:

XFracture (aka Herb)

unread,
May 24, 2011, 10:04:48 AM5/24/11
to Magic Lantern firmware development
me too - eager to test

Brian Berneker

unread,
May 24, 2011, 8:42:12 AM5/24/11
to Magic Lantern firmware development
Hey I do some pretty in depth php programming, and while I realize
it's probably quite different from what you're working with, some of
the code looks very recognizable and like I might even be able to make
sense of it and pitch in. Is there a link to an SDK or something I
could use to help? I'd love to get involved and contribute...

Brian

Chuchin

unread,
May 24, 2011, 2:28:53 PM5/24/11
to Magic Lantern firmware development
Brain, I'm using the 550 build as a starting point, which can be
downloaded here https://bitbucket.org/hudson/magic-lantern/src you
have to update the 5d-hack.c file the new address that can be found in
the consts-600d.101.h. In the gui.c file keep the #include
"consts-550d.109.h" untill the 600d are confrim. In the makefile the
restartstart has to be update which is in the stubs-600d.101.S also
replace the 550d-empty.hdr with the 600d frimware, keep
magiclantern.lds entry.o 5d-hack.o stubs-600d.101.S version.o bmp.o
font-large.o font-med.o font-small.o config.o menu.o debug.o stdio.o
lens.o property.o propvalues.o gui.o chdk-gui_draw.o and try to
activate the other functions one at a time. You will have to rewrite
code as needed but not much.

Chucho
> > 6KViewDownload- Hide quoted text -
>
> - Show quoted text -

XFracture (aka Herb)

unread,
May 24, 2011, 3:51:13 PM5/24/11
to Magic Lantern firmware development
so... Chuchin... do you a compiled version? (grin)

On May 24, 1:28 pm, Chuchin <jlsaldan...@gmail.com> wrote:
> Brain, I'm using the 550 build as a starting point, which can be
> downloaded herehttps://bitbucket.org/hudson/magic-lantern/src  you

arm.indy

unread,
May 24, 2011, 4:08:35 PM5/24/11
to Magic Lantern firmware development
gui.c from 60d can be used.

counter and queue offsets (0xc and 0x30 resp.) are the same.
struct is 0x1C38

600d is closer to 60d than 550d: same DryOS 2.3 version release #47

thanks for your help Chuchin!

Indy

On May 24, 9:51 pm, "XFracture (aka Herb)" <herbhalst...@gmail.com>
wrote:

Brian Berneker

unread,
May 24, 2011, 4:35:27 PM5/24/11
to Magic Lantern firmware development
Ok so where do I get the ARM dev tools/environment to follow up on
this?
Is it available on OSX or just Windows?
If I can get the hang of the codebase I might even develop a new
feature or two!

Brian

"Sztupák Sz. Zsolt"

unread,
May 24, 2011, 4:38:33 PM5/24/11
to ml-d...@googlegroups.com
I only had success running the gnu arm compiler on Ubuntu using this:
http://magiclantern.wikia.com/wiki/Build_instructions/550D

Removing the need to use libc in the source (by replacing the needed
functionality from eg. bionic or uclibc) would make the building a lot
easier though imho.

SztupY

Alex

unread,
May 24, 2011, 4:42:35 PM5/24/11
to ml-d...@googlegroups.com
Right now, the only dependency on libc is memset (and even this one is
optional; my_memset.c seems to work well).

arm.indy

unread,
May 25, 2011, 1:58:52 PM5/25/11
to Magic Lantern firmware development
if we execute this piece of code on the 600d, it should display some
video ram addresses:

int i;
unsigned int *bmp_ram_addr = bmp_vram_info;
for (i=0; i<2; i++)
DebugMsg( DM_MAGIC, 3, "bmp_vram[]=0x%08x, 0x%08x, 0x%08x",
bmp_ram_addr[3*i+0], bmp_ram_addr[3*i+1], bmp_ram_addr[3*i+2] );
unsigned int *vram_info_addr = vram_info;
for (i=0; i<3; i++)
DebugMsg( DM_MAGIC, 3, "vram_info[]=0x%08x, w=%4d, h=%4d, p=%4d, n=
%4d",
vram_info_addr[5*i+0], vram_info_addr[5*i+1],
vram_info_addr[5*i+2], vram_info_addr[5*i+3], vram_info_addr[5*i
+4] );
unsigned int *stateobj_disp = 0x23DC+0xb0; // see FF062CEC
SetBitmapVramAddress
DebugMsg( DM_MAGIC, 3, "stateobj_disp+0xb0[]=0x%08x,0x%08x,0x%08x,",
stateobj_disp[0], stateobj_disp[1], stateobj_disp[2]);

Indy

arm.indy

unread,
May 25, 2011, 2:46:11 PM5/25/11
to Magic Lantern firmware development
I just cloned Alex's branch from this revision
https://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93

and included my diff for 600D / T3i in
https://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/changesets

If someone serious want write access, just ask.

Indy

On May 24, 10:08 pm, "arm.indy" <arm.indi...@gmail.com> wrote:

Piers

unread,
May 25, 2011, 8:29:06 PM5/25/11
to ml-d...@googlegroups.com
The GNU ARM toolchain most definitely works on OSX. I have no recollection of what I did, but I followed instructions either on or pointed to by the wiki, and have built many an ML on OSX

PG

JaKob

unread,
May 27, 2011, 12:45:30 PM5/27/11
to ml-d...@googlegroups.com
so has anyone got the t3i with ML working ?

- Jakob


Vincent Olivier

unread,
May 28, 2011, 4:37:03 PM5/28/11
to Magic Lantern firmware development
Hi Indy,

I looked at both your code and the hudson original master (both
downloaded just a couple of minutes ago).

Your T3i branch seems to be missing some code from the main hudson
branch. Namely, when I search for the string "movie" in all the text
files, there is a "movtweaks.c" file that is returned in hudson's case
but not in your branch. I'm asking because this code contains
something that is of high interest to me possibly, the auto-restart
movie recording function, seen in the hudson movtweaks.c at line 313
(search for "movie_restart").

I'm looking to bypass both the 29m59s and the 4GB limits on movie
recordings. An auto restart whenever the movie recording is non-
interactively stopped will fit the bill for now.

So yeah, I'm just asking why is this code missing from your branch and
if you are planning on reincorporating it, or if I can do it myself,
if I'm on the right track, etc.

Regards,

Vincent

On May 25, 2:46 pm, "arm.indy" <arm.indi...@gmail.com> wrote:
> I just cloned Alex's branch from this revisionhttps://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93
>
> and included my diff for 600D / T3i inhttps://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/changesets

"Sztupák Sz. Zsolt"

unread,
May 28, 2011, 4:41:54 PM5/28/11
to ml-d...@googlegroups.com
Hi!

The 600D branch is based on the 60D branch which is based on the 550D
branch which is based on the original master (5DmkII branch), but is
somewhat different as Alex is actively developing new features primarily
here. Each one has more or less differences from the previous one. If
looking for features you should first check the 550D or 60D branch, as
those contain the most compatible code that should more or less work on
600D too.

SztupY

Vincent Olivier

unread,
May 28, 2011, 5:03:47 PM5/28/11
to ml-d...@googlegroups.com
Hi,

When looking for the "movie_restart" in the t3i branch, it only shows up in the "debug.c" file whereas in the original one, there are around 10 files where it's a hit. So, I might want to import this code in. But I'd need a little guidance…

I'm totally new in this and it's really difficult to get a grasp on the code because the only comments I will find in there are dead lines that have been commented out. ;-)

For instance, everything of interest seems to arise around "call("MovieStart");" statements. I find "4a79d9 FA_MovieStart" in the "fa-functions.txt" file, but no further definition for that. Is that a lower level service in DryOS or something? Can it be overridden/looked at?

And even if I get the whole thing to compile and load on the camera (which seems feasible given the instruction set I found for Mac OS), I'm not sure I will be able to understand what needs to be done to have ML working on the t3i before you guys are done with it… Unless I get a crash course or something…

Anyways, I'm really into bypassing the recording time limits as per my other conversation here : http://groups.google.com/group/ml-devel/browse_thread/thread/9c2b9aece9e459fd

And I'm willing to give a couple of hours every week until we nail it for the T3i, conditionally to some intellectual support on the code structure. ;-)

Anyways, let me know.

Vincent


arm.indy

unread,
May 29, 2011, 1:20:39 PM5/29/11
to Magic Lantern firmware development
Hi Vincent,

The first thing is to activate menu and key events handling (gui.c).
The 60d code can be reused, but key events may differ a little bit.
the 600d is very close to the 60d, which must be taken as model for
the porting process.

Indy

On May 28, 11:03 pm, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> Hi,
>
> When looking for the "movie_restart" in the t3i branch, it only shows up in the "debug.c" file whereas in the original one, there are around 10 files where it's a hit. So, I might want to import this code in. But I'd need a little guidance…
>
> I'm totally new in this and it's really difficult to get a grasp on the code because the only comments I will find in there are dead lines that have been commented out. ;-)
>
> For instance, everything of interest seems to arise around "call("MovieStart");" statements. I find "4a79d9 FA_MovieStart" in the "fa-functions.txt" file, but no further definition for that. Is that a lower level service in DryOS or something? Can it be overridden/looked at?
>
> And even if I get the whole thing to compile and load on the camera (which seems feasible given the instruction set I found for Mac OS), I'm not sure I will be able to understand what needs to be done to have ML working on the t3i before you guys are done with it… Unless I get a crash course or something…
>
> Anyways, I'm really into bypassing the recording time limits as per my other conversation here :http://groups.google.com/group/ml-devel/browse_thread/thread/9c2b9aec...

Vincent Olivier

unread,
May 29, 2011, 2:51:40 PM5/29/11
to ml-d...@googlegroups.com
Hi Indy,

I'd be glad to look into it. I'm trying to compile the ARM toolchain now (from the current esden trunk). It currently crashes at "Configuring openocd-master" with

"checking Build & Link with libftdi...... configure: error: Cannot build & run test program using libftdi"

Contacted Piotr Esden-Tempski about it already.

I think I'm going to look for a version dating back from the time when the ML instructions for Mac OS on the wiki were developed, now.

While it's compiling, I'm looking at "gui.c", guessing that the actual changes need to be done in header file "consts-600d.101.h".

Can you confirm that you are now trying out event constants using "console_printf" (guess from commented out code), which, what, will output on the camera screen? If so, can we separate the workload so that we don't redo the work independently?

Still compiling ARM toolchain…

Vincent

arm.indy

unread,
May 29, 2011, 2:57:30 PM5/29/11
to Magic Lantern firmware development
follow the wiki to create your build toolchain
http://magiclantern.wikia.com/wiki/550d_dev

Alex

unread,
May 29, 2011, 3:09:46 PM5/29/11
to ml-d...@googlegroups.com
Hi,

Do not use other versions of ARM toolchain; use the ones recommended
on the wiki.
http://magiclantern.wikia.com/wiki/Build_instructions/550D

If you don't use console.c (i.e. just bmp_printf), messages will still
appear on the screen, but sometimes they may get erased before you
have a chance to read them. For the first time, I think it's OK to use
this approach.

To use console_printf, you need to include console.c (add console.o in
Makefile at ML_OBJS-y ). This will print messages on the screen; you
have to start it with console_show() first, because the menu is not
working yet. Also make "draw_event = 1" in menu.c.

Relevant pages:
http://magiclantern.wikia.com/wiki/Debugging_Magic_Lantern
http://magiclantern.wikia.com/wiki/GUI_Events/550D

Also see the 60D porting thread for more hints.

arm.indy

unread,
May 29, 2011, 3:23:17 PM5/29/11
to Magic Lantern firmware development
Vincent,

static void gui_main_task_60d() in
https://bitbucket.org/a1ex/magic-lantern/src/93135f58ed93/gui.c
should work "as is", because queue and counter are at the same offsets
as with the 60d.
other changes are handled in consts and stubs files for the 600d.

yes, buttons codes (BGMT_*) must be modified on consts-600d.101.h file

Alex knows this better than me.

Indy


On May 29, 9:09 pm, Alex <broscutama...@gmail.com> wrote:
> Hi,
>
> Do not use other versions of ARM toolchain; use the ones recommended
> on the wiki.http://magiclantern.wikia.com/wiki/Build_instructions/550D
>
> If you don't use console.c (i.e. just bmp_printf), messages will still
> appear on the screen, but sometimes they may get erased before you
> have a chance to read them. For the first time, I think it's OK to use
> this approach.
>
> To use console_printf, you need to include console.c (add console.o in
> Makefile at ML_OBJS-y ). This will print messages on the screen; you
> have to start it with console_show() first, because the menu is not
> working yet. Also make "draw_event = 1" in menu.c.
>
> Relevant pages:http://magiclantern.wikia.com/wiki/Debugging_Magic_Lanternhttp://magiclantern.wikia.com/wiki/GUI_Events/550D

Vincent Olivier

unread,
May 29, 2011, 3:53:14 PM5/29/11
to ml-d...@googlegroups.com
Hi again Alex and Indy,

I recompiled the ARM tool chain from the script provided in the ML forum. Now, I'm getting this upon running "make" in the T3i branch of the code :

######## BEGIN
~/arm-toolchain/bin/arm-elf-ar cr libstdio.a lib_a-setjmp.o lib_a-strlen.o lib_a-strcmp.o lib_a-memcmp.o lib_a-memset.o
[ LD       ]   magiclantern
[ OBJCOPY  ]   magiclantern.bin
[ CC       ]   reboot.o
[ LD       ]   autoexec
[ OBJCOPY  ]   autoexec.bin

Notice: ../dumper/build_fir.py not found; will not build magiclantern.fir. It's okay.
Leaving magiclantern.fir unchanged.

stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
make: *** [magiclantern.fir] Error 1
######## END

Previously, I extracted the 1.0.1 firmware from the Canon-supplied DMG file and renamed it to "dumper/600d_101.fir" I also put the "magiclantern.fir" from the T3i ML forum thread in the build directory.

So, not sure what to do from here. Do you guys have a clue on what I did wrong?

Thanks,

Vincent

arm.indy

unread,
May 29, 2011, 4:02:47 PM5/29/11
to Magic Lantern firmware development

Vincent Olivier

unread,
May 29, 2011, 4:12:05 PM5/29/11
to ml-d...@googlegroups.com
I'm sorry. I read that already. I'm not sure what you are referring to exactly. If it's about the signature thing, I did place the "magiclantern.fir" in the build directory (see bottom of my previous message, after console dump). Is that where it's supposed to go? I'm not sure…

Vincent

Alex

unread,
May 29, 2011, 4:12:33 PM5/29/11
to ml-d...@googlegroups.com
It's okay, it worked. You only need autoexec.bin.

Vincent Olivier

unread,
May 29, 2011, 4:47:55 PM5/29/11
to ml-d...@googlegroups.com
OK, so I upgraded with the provided "magiclantern.fir". I now have "Firmware Ver. 1.0.1-ml-2011May29". I made the SDHC card bootable with MacBoot. I copied the provided "cropmks" folder and the "autoexec.bin" I just compiled.

But I can't seem to be able to trigger anything. Does the code now in version control do anything more than "set the bootflag"? How to I test "gui.c" from the camera? Or confirm that the autoexec.in has loaded properly?

Thanks again guys. I know this is basic stuff, but, well, I think I can contribute if I get these little steps done! ;-)

Vincent

Alex

unread,
May 29, 2011, 5:14:43 PM5/29/11
to ml-d...@googlegroups.com
If you see "Firmware Ver. 1.0.1-ml-2011May29", autoexec.bin is loaded
and running. You don't need the fir any more.

First, you have to enable task override (uncomment line
boot-hack.c:137). There are two tasks started in this way: one in
gui.c (which we want), and one in audio.c (sounddev_task). Make sure
the camera boots with these tasks, and display the events on the
screen. From handle_buttons, comment everything except the block
containing console_printf, and return 1 for all events. This should
let you display button events on the screen.

Next:

Other tasks will be normally started after reading config file. See
the 60D boot-hack to see how it's done:
https://bitbucket.org/hudson/magic-lantern/src/tip/boot-hack.c

I recommend you to block all the tasks (comment all calls to
TASK_CREATE macro) and enable them one by one. The first one will be
the menu.

Vincent Olivier

unread,
May 29, 2011, 5:48:15 PM5/29/11
to ml-d...@googlegroups.com
Hi,

Cool!

So did "make clean". Uncommented  boot-hack.c:137 so it now reads "task_dispatch_hook = my_task_dispatch_hook;". Put newly compiled "autoexec.bin" on card. Put battery back. Turned on. Video mode. Pressed trash can button. Nothing. :-(

Are we absolutely certain the autoexec.bin gets loaded? Did I need to put the console code in to see anything? Hoped to leave it with "bmp_printf" as a first try...

Vincent

"Sztupák Sz. Zsolt"

unread,
May 29, 2011, 5:49:14 PM5/29/11
to ml-d...@googlegroups.com
The version number should get rewritten by the init part too. Check it inside the normal Canon menu.

�SztupY
Hi,

Cool!

So did "make clean".�Uncommented �boot-hack.c:137 so it now reads "task_dispatch_hook = my_task_dispatch_hook;".�Put newly compiled "autoexec.bin" on card. Put battery back. Turned on. Video mode. Pressed trash can button. Nothing. :-(
[ LD � � � ] � magiclantern
[ OBJCOPY �] � magiclantern.bin
[ CC � � � ] � reboot.o
[ LD � � � ] � autoexec
[ OBJCOPY �] � autoexec.bin
Still compiling ARM toolchain�

Vincent

On 2011-05-29, at 1:20 PM, arm.indy wrote:

Hi Vincent,

The first thing is to activate menu and key events handling (gui.c).
The 60d code can be reused, but key events may differ a little bit.
the 600d is very close to the 60d, which must be taken as model for
the porting process.

Indy

On May 28, 11:03 pm, Vincent Olivier <vinc...@nbourbaki.com> wrote:
Hi,

When looking for the "movie_restart" in the t3i branch, it only shows up in the "debug.c" file whereas in the original one, there are around 10 files where it's a hit. So, I might want to import this code in. But I'd need a little guidance�

I'm totally new in this and it's really difficult to get a grasp on the code because the only comments I will find in there are dead lines that have been commented out. ;-)

For instance, everything of interest seems to arise around "call("MovieStart");" statements. I find "4a79d9 FA_MovieStart" in the "fa-functions.txt" file, but no further definition for that. Is that a lower level service in DryOS or something? Can it be overridden/looked at?

And even if I get the whole thing to compile and load on the camera (which seems feasible given the instruction set I found for Mac OS), I'm not sure I will be able to understand what needs to be done to have ML working on the t3i before you guys are done with it� Unless I get a crash course or something�
On May 25, 2:46 pm, "arm.indy"<arm.indi...@gmail.com> �wrote:
I just cloned Alex's branch from this revisionhttps://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93

and included my diff for 600D / T3i inhttps://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/changesets

If someone serious want write access, just ask.

Indy

On May 24, 10:08 pm, "arm.indy"<arm.indi...@gmail.com> �wrote:

gui.c from 60d can be used.
counter and queue offsets (0xc and 0x30 resp.) are the same.
struct is 0x1C38
600d is closer to 60d than 550d: same DryOS 2.3 version release #47
thanks for your help Chuchin!
Indy
On May 24, 9:51 pm, "XFracture (aka Herb)"<herbhalst...@gmail.com>
wrote:
so... Chuchin... do you a compiled version? (grin)