Author Topic: Gettings started as developer  (Read 94489 times)

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: Gettings started as developer
« Reply #25 on: October 09, 2012, 10:28:21 PM »
Save headaches and performance issues and just run a VM of 32 bit linux.

https://www.virtualbox.org/wiki/Downloads

Then download pre built arm compiler
https://launchpad.net/gcc-arm-embedded

I think 4.6

Its more shit to download/setup but cygwin always gives me headaches.

Also, do you have 60D? Just do make for your camera. make 60D, make 550D, make 600D, etc

*** il modello dell'obiettivo non contiene alcun "%".  Arresto.

This says some file not found. Do you have all the stuff in ML folder. I know sometimes mercurial just downloads the "source" and not the whole tree. Should be like 16-30mb

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #26 on: October 09, 2012, 10:39:33 PM »
Tried to compile for 50D only but got the same error.
It's not a problem for me to install a linux distro but it would take time to get used to it.
ML folder is 26.6MB so it should be ok.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: Gettings started as developer
« Reply #27 on: October 09, 2012, 10:45:23 PM »
Pastebin your makefile.user.default and makefile.user

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #28 on: October 09, 2012, 10:46:23 PM »
http://dl.dropbox.com/u/1087972/ML/Makefile.user

http://dl.dropbox.com/u/1087972/ML/Makefile.user.default

Ok, found the error, the path was written in a wrong manner. It's compiling now.
ARM_LIBC_A=cygwin/home/Giovanni/arm-toolchain462/arm-none-eabi/lib/libc.a
Got me a little further but i still have some errors. What about the drive letter?
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: Gettings started as developer
« Reply #29 on: October 09, 2012, 10:50:29 PM »
You never set the path to the compiler:

ARM_PATH=~/arm-toolchain462 << wherever that is goes here.

I see... path structure is the same:

~/arm-toolchain462/arm-none-eabi/lib/libc.a

or keep  $(ARM_PATH)/arm-$(ARM_ABI)/lib/libc.a

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #30 on: October 09, 2012, 10:56:38 PM »
You never set the path to the compiler:

ARM_PATH=~/arm-toolchain462 << wherever that is goes here.

I see... path structure is the same:

~/arm-toolchain462/arm-none-eabi/lib/libc.a

or keep  $(ARM_PATH)/arm-$(ARM_ABI)/lib/libc.a
So it's like this

ARM_ABI=none-eabi
$(ARM_PATH)/arm-$(ARM_ABI)/lib/libc.a
ARM_LIBC_A=c/cygwin/homeGiovanni/arm-toolchain462/arm-none-eabi/lib/libc.a
PYTHON=python2.6

But what about the line in red? Is it right given that the path is correct? What's the correct syntax?
I just followed pelican's guidelines. If something is missing, please tell me.
Also, do i have to put the entire directory like C:/....?
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: Gettings started as developer
« Reply #31 on: October 09, 2012, 11:00:31 PM »
Don't set either of those and try it. If it finds the compiler, it should find libc

just do:
ARM_ABI=none-eabi
PYTHON=python2.6

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #32 on: October 09, 2012, 11:03:25 PM »
Nope, it doesn't work.

Giovanni@Giovanni-PC ~/magic-lantern
$ make 50D
make -C /home/Giovanni/magic-lantern/platform/50D.109
make[1]: ingresso nella directory "/home/Giovanni/magic-lantern/platform/50D.109                                                                                                    "
[ VERSION  ]   ../../platform/50D.109/version.c
[ CC       ]   version.o
cd ../../doc; python2.6  menuindex.py
Could not open menuindex.txt
mkdir: impossibile creare la directory "cam": File exists
[ CC       ]   menuindex.o
[ AR       ]   lib_a-setjmp.o
/home/Giovanni/arm-toolchain462/arm-none-eabi/lib/libc.a: No such file or direct                                                                                                    ory
C:\cygwin\home\Giovanni\arm-toolchain462\bin\arm-none-eabi-ar.exe: ../../Makefil                                                                                                    e.inc:259: recipe for target `lib_a-setjmp.o' failed
make[1]: *** [lib_a-setjmp.o] Error 9
make[1]: uscita dalla directory "/home/Giovanni/magic-lantern/platform/50D.109"
Makefile:42: recipe for target `50D' failed
make: *** [50D] Error 2
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: Gettings started as developer
« Reply #33 on: October 09, 2012, 11:06:53 PM »
It looks like its looking in the right folder. But is there a libc.a in that folder?

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #34 on: October 09, 2012, 11:10:19 PM »
Yes, there is, that's why i can't understand it.
:S
http://dl.dropbox.com/u/1087972/ML/libc.jpg
I did a make clean and then a make, it did something then but the same error pops up.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: Gettings started as developer
« Reply #35 on: October 09, 2012, 11:12:33 PM »
Try:

ARM_LIBC_A=/home/Giovanni/arm-toolchain462/arm-none-eabi/lib/libc.a

then

ARM_LIBC_A=../../../arm-toolchain462/arm-none-eabi/lib/libc.a

then

ARM_LIBC_A=../../arm-toolchain462/arm-none-eabi/lib/libc.a

Could also do:

ARM_LIBC_A=../arm-toolchain462/arm-none-eabi/lib/libc.a

if only 1 level deep

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #36 on: October 09, 2012, 11:20:53 PM »
Same stuff, the directories are right but i always end up with

make[1]: ***  Nessuna regola per generare l'obiettivo "../arm-toolchain462/arm-none-eabi/lib/libc.a", necessario per "lib_a-setjmp.o".  Arresto.
make[1]: uscita dalla directory "/home/Giovanni/magic-lantern/platform/50D.109"
Makefile:42: recipe for target `50D' failed
make: *** [50D] Error 2
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #37 on: October 09, 2012, 11:49:36 PM »
Now:

$ make 50D
make -C /home/Giovanni/magic-lantern/platform/50D.109
make[1]: ingresso nella directory "/home/Giovanni/magic-lantern/platform/50D.109                                                                                                    "
[ VERSION  ]   ../../platform/50D.109/version.c
[ CC       ]   version.o
cd ../../doc; python2.6  menuindex.py
Could not open menuindex.txt
mkdir: impossibile creare la directory "cam": File exists
[ CC       ]   menuindex.o
[ AR       ]   lib_a-setjmp.o
[ AR       ]   libstdio.a
[ LD       ]   magiclantern
[ OBJCOPY  ]   magiclantern.bin
[ CC       ]   reboot.o
[ LD       ]   autoexec
stat: impossibile eseguire stat di "autoexec.bin": No such file or directory

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000060 0x0004b000 0x0004b000 0x46931 0x523d4 RWE 0x10

[ OBJCOPY  ]   autoexec.bin
make[1]: uscita dalla directory "/home/Giovanni/magic-lantern/platform/50D.109"

 ???
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #38 on: October 09, 2012, 11:55:42 PM »
Well, looks like it was ok.
Autoexec was generated, i'm running it.
Thanks Pelican and 1% for the support.
If you copy exactly what Pelican posted you should be fine.
;)
What is the command if i just want to update ML folder?
I can't use hg clone again.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: Gettings started as developer
« Reply #39 on: October 10, 2012, 01:29:37 AM »
hg pull (download changes from bitbucket)
then
hg update (merge all changes with your current code)
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #40 on: October 10, 2012, 01:41:06 AM »
Thanks, now i'm perfectly comfortable with building an autoexec.
I should boost my poor knowledge in C and see if i can do someting simple or just understand the code. This whole thing is interesting.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #41 on: October 11, 2012, 02:02:00 PM »
Here i am, bothering you again.
Since i made a bit of a mess with the code yesterday, trying to solve a bug with A1ex, i decided to do a clean copy of the repo. Kept my makefile.user. but now i get quite a few errors at compiling.
They're not strictly related to the compiler, i guess...

http://dl.dropbox.com/u/1087972/ML/compile_errors.jpg
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: Gettings started as developer
« Reply #42 on: October 11, 2012, 02:12:38 PM »
There are no errors in your screen, just warnings (beacuse we are lazy developers)
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #43 on: October 11, 2012, 02:16:47 PM »
There are no errors in your screen, just warnings (beacuse we are lazy developers)
Ok, nice, i shouldn't be worried since it compiled, in fact.
Are those recent stuff? I bet those warnings weren't there yesterday.
:P
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: Gettings started as developer
« Reply #44 on: October 11, 2012, 02:29:53 PM »
They disappear if you don't do a make clean or don't edit the corresponding .c file since Make is smart enough not to recompile them
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #45 on: October 11, 2012, 02:35:05 PM »
Yeah, just noticed that  ;D
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

Pelican

  • Contributor
  • Senior
  • *****
  • Posts: 406
Re: Gettings started as developer
« Reply #46 on: October 13, 2012, 11:09:18 PM »
ilguercio: Sorry, I didn't check this thread... but you finally solved the problem.
(The correct format to the directory drive:\dir1\dir2 => /cygdrive/drive/dir1/dir2)


I have questions too:
Is there any way to copy the autoexec.bin directly to the card inside the camera?
If I change something how can I commit/merge it to the main source?
And what about quality checking? Is there anybody who checks the code? Are there any rules for the developers?

EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: Gettings started as developer
« Reply #47 on: October 13, 2012, 11:18:22 PM »
No problem, Pel, i just copied everything as you posted it and it worked.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12548
Re: Gettings started as developer
« Reply #48 on: October 13, 2012, 11:23:36 PM »
@Pel:

1: http://magiclantern.wikia.com/wiki/PTP-CHDK (there are newer patches on this forum)

2: if you change something, you can create your own fork, and submit pull requests (recommended method - you also get proper credit on the repo).

3: there are built-in tests in debug menu, and anyone can review the code as it's posted. Basically, interfere as little as you can with Canon tasks (don't make them wait, for example), return quickly from prop handlers (don't take semphores and stuff from there), avoid buffer overflows, be careful with properties (they are saved in ROM and could brick the camera - see http://magiclantern.wikia.com/wiki/Unbricking for my mistakes)...

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: Gettings started as developer
« Reply #49 on: October 13, 2012, 11:48:33 PM »
Quote
Is there any way to copy the autoexec.bin directly to the card inside the camera?

Miyake tried to make something like this w/ PTP but it wouldn't transfer everything. Never figured out why, the thread is on here somewhere.