Author Topic: Porting ML to 1000D (AKA Compiling for 1000D/XS)  (Read 11133 times)

SysCall

  • New to the forum
  • *
  • Posts: 33
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #50 on: December 06, 2016, 08:59:36 PM »
Sorry for the confusion, for me the latest is the last release from coutts is:

https://bitbucket.org/coutts/1000d_dev/src

Ant123

  • Freshman
  • **
  • Posts: 68
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #51 on: December 06, 2016, 09:02:28 PM »
But this is not ML. Are you porting ML or something else?

Levas

  • Hero Member
  • *****
  • Posts: 873
  • 6d - Nightly build user
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #52 on: December 06, 2016, 09:19:13 PM »
Quote
Now I see. But why you are playing with LEDs and don't modifying VxWorks branch

We're gonna use our 1000D as christmass decoration this year, hanging in a tree with blinking leds ;D

SysCall

  • New to the forum
  • *
  • Posts: 33
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #53 on: December 06, 2016, 09:22:20 PM »
I know it is not ML, I was using it as base to get into ML development.

I totally new to this.

Since I couldn't find a description about the workflow on how to port ML to a camera, I tried to understand everything first.

If you look at the date of this thread, you would realize that we just started.

It helps that we just have a basic project like the one from coutts to play with.

Also it is the only project of the canon 1000D that I know or could find.

How can I start porting something if I don't understand the basics?

Yesterday we didn't have a boot flag that was set.

Ant123

  • Freshman
  • **
  • Posts: 68
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #54 on: December 06, 2016, 09:24:18 PM »
We're gonna use our 1000D as christmass decoration this year, hanging in a tree with blinking leds ;D
So you need to rename this topic again - and you will celebrate till 2018.  ;D

shmadul

  • New to the forum
  • *
  • Posts: 28
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #55 on: December 06, 2016, 09:25:49 PM »
I am hoping to port ML, but at this point any custom firmware like chdk or ML works :)

shmadul

  • New to the forum
  • *
  • Posts: 28
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #56 on: December 06, 2016, 09:37:52 PM »
OHhhh so the autoexec.bin file is if you already have ML installed,
The .fir file gotten from the assemble_fw file patches the script into the .fir file !!!

Levas

  • Hero Member
  • *****
  • Posts: 873
  • 6d - Nightly build user
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #57 on: December 06, 2016, 09:40:28 PM »
Good work by the way, Syscall.
You now a lot more about the technical side then I do.

So you set the bootflag, can you share the FIR file you did it with?
This way we could just run autoexec.bin at startup, no more firmware updates.
I'm just new to the magic lantern source files and finding my way to find addresses in firmware.
So I hope I can help when you're a little further in finding your way in magic lantern.

Levas

  • Hero Member
  • *****
  • Posts: 873
  • 6d - Nightly build user
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #58 on: December 06, 2016, 09:43:10 PM »
@shmadul
You're right.
Normally to run ML you don't need the fir file.
Once you enabled the bootflag, ML runs with autoexec bin file and the ML files in the ML directory on your SD card

shmadul

  • New to the forum
  • *
  • Posts: 28
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #59 on: December 06, 2016, 10:09:03 PM »
any ideas ? I found this on the web :)
" I finally figured out why my code did not work with autoboot before, one tweak should fix things:
in link.script, change:
Quote
first 0x800120 :
to:
Quote
first 0x7F0000 :

Also, add this function to main.c:
Quote
void COPY() {
        int i;
       
        long *from = (long*) 0x800000;
        long *to   = (long*) 0x7F0000;
       
        for (i = 0; i < 0x100000; i++) {
                to = from;
        }
}

and in entry.S modify it to look like this(I have bolded the one addition):
Quote
.text
.org 0
.globl _start, start

start:
_start:
        BL    COPY
        BL    my_LedBlueOn
        B      loc_FF810054


The problem was that before, the link script said to link the code to 0x800120, but the makefile linked it to 0x7F0000. This doesn't work because the code is actually loaded to 0x800000 by the bootloader. We first need to copy our code from 0x800000 to 0x7F0000 (a safe spot in memory, 0x800000 will be overwritten by the canon firmware during the boot process). Then our code will be executed from there.
"

Ant123

  • Freshman
  • **
  • Posts: 68
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #60 on: December 08, 2016, 08:58:02 PM »
I'm not able to set the boot flag each time I disable it. Sometime it works, sometime it does not.

Try to use modified 5DC installer. Maybe it will be more stable...

shmadul

  • New to the forum
  • *
  • Posts: 28
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #61 on: December 08, 2016, 10:18:39 PM »
@Ant123 Where's that located ??

SysCall

  • New to the forum
  • *
  • Posts: 33
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #62 on: December 08, 2016, 10:25:47 PM »
I'm out of the game.

I just successfully bricked my camera.

I managed to enable and disable the boot flag a few times in row without any issues and then ...

Now the boot flag says BOOT=-348549156

Camera can still read the autoexec.bin after removing the battery and put it back.

Black screen when no SD card or none bootable SD card is inserted.

Picture:
https://1drv.ms/f/s!AsC1K_kH7N9pbYhpDPUbSuC8Iss

shmadul

  • New to the forum
  • *
  • Posts: 28
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #63 on: December 08, 2016, 10:28:17 PM »
@Syscall
"Funktion" is German for Function (2 years of German finally paying off LOL)
unless i'm mistaken Canon is a Japanese company.... Not sure why German is being used here, Could be part of the issue ??

shmadul

  • New to the forum
  • *
  • Posts: 28
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #64 on: December 08, 2016, 10:30:27 PM »
@syscall :'(
Have you checked ur battery, Sounds Stupid, but its been my battery many many times just try plugging your battery in for 20-30 mins and then try and boot up your camera
(Try without SD)

Ant123

  • Freshman
  • **
  • Posts: 68
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #65 on: December 08, 2016, 10:31:11 PM »
@Ant123 Where's that located ??
On your computer.
But first you need to modify and complie this code

I'm out of the game.

I just successfully bricked my camera.

I managed to enable and disable the boot flag a few times in row without any issues and then ...
http://www.magiclantern.fm/forum/index.php?board=45.0

Levas

  • Hero Member
  • *****
  • Posts: 873
  • 6d - Nightly build user
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #66 on: December 08, 2016, 10:32:51 PM »
Wow, you bricked your 1000d camera ?

I just wanted to post that I want to check out setting the bootflag this weekend, but now I'm scared :o
Anything here:
http://www.magiclantern.fm/forum/index.php?board=45.0

SysCall

  • New to the forum
  • *
  • Posts: 33
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #67 on: December 08, 2016, 10:33:45 PM »
@shmadul

Quote
"Funktion" is German for Function (2 years of German finally paying off LOL)

It has nothing to do with the naming.

Coutts was german himself that is why he named it "Funktion", you can name it whatever you want even Ffuisdb() would work. 

shmadul

  • New to the forum
  • *
  • Posts: 28
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #68 on: December 08, 2016, 10:36:09 PM »
@Syscall
Did Some Digging Try these


Re: How do disable Bootdisk flag on a 5D Mk III
« Reply #36 on: September 24, 2013, 04:12:57 PM »
Hi all.
First of all, Thank you all developer.

I'm thinking about this problem. And yesterday, I built magiclantern compiling system.
I modified latest source code, and made special autoexec.bin.
This modification is calling "Disalbebootdisk" at auto save toggle.
I was dumping address at before and after modification, call"Disablebootdisk"
I checked these dumping result. Offset+4 address from 0xF8000000 is changing from 0xFFFFFFFF
to 0x00000000. This is clearing boot flag. But, I found some different point at other address. woo... :'(
May be, some developer is thinking that this result is occerd a bad influence on camera function.

After disable boot flag, I updated canon firm V1.2.1.
At present, I can't find a problem.
System boot time become so fast. and Eye-fi card is enable.

void
config_autosave_toggle(void* priv)
{
#if 0
    config_flag_file_setting_save(CONFIG_AUTOSAVE_FLAG_FILE, !!config_autosave);
    msleep(50);
    config_autosave = !config_flag_file_setting_load(CONFIG_AUTOSAVE_FLAG_FILE);
#endif
    bmp_printf(FONT_LARGE, 50, 50, "disable flag start");
    call( "DisableBootDisk" );

    bmp_printf(FONT_LARGE, 50, 50, "disable flag end");
}

Good Luck also Source :https://www.magiclantern.fm/forum/index.php?topic=6035.25

SysCall

  • New to the forum
  • *
  • Posts: 33
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #69 on: December 08, 2016, 10:41:41 PM »
Interesting, if I set the dial to macro mode and push the shutter button the flash opens XD

Levas

  • Hero Member
  • *****
  • Posts: 873
  • 6d - Nightly build user
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #70 on: December 08, 2016, 10:43:42 PM »
 :o  :D
@Syscall
Just wondering, is the 1000d your main camera, your one and only camera?

SysCall

  • New to the forum
  • *
  • Posts: 33
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #71 on: December 08, 2016, 10:50:31 PM »
@Levas

It was my backup, time lapse and magic lantern dev camera.

My main camera is the Canon 80D, maybe I should hang the 1000d on my tripod now to stabilize it :P

Levas

  • Hero Member
  • *****
  • Posts: 873
  • 6d - Nightly build user
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #72 on: December 08, 2016, 10:55:58 PM »
Ah, good it was not your main camera 8)
But you need to unbrick it, otherwise I don't dare to try more stuff on the 1000d

My main camera is a 6d, but I'd rather have my 1000d as a backup cam instead of a brick to stabilize my tripod :P

SysCall

  • New to the forum
  • *
  • Posts: 33
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #73 on: December 08, 2016, 11:11:28 PM »
I just removed my instruction on how to set the boot flag to prevent others from bricking their cameras.

shmadul

  • New to the forum
  • *
  • Posts: 28
Re: Porting ML to 1000D (AKA Compiling for 1000D/XS)
« Reply #74 on: December 08, 2016, 11:17:01 PM »
Wait so Did anything above help ?
also what bricked it ? was it the fact that you set the bootdisk to a - value or the fact that you enabled it at all ?