Gettings started as developer

Started by Strahlex, September 26, 2012, 07:12:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

themichael

I've followed Pelican's post here for Windows (http://www.magiclantern.fm/forum/index.php?topic=2899.msg14021#msg14021)

I get the following no matter which camera I choose, recipe failure. A forum search didn't yield any solutions.

Michael@Desktop2 ~/magic-lantern
$ make 50D V=1
make -C /home/Michael/magic-lantern/platform/50D.109
make[1]: Entering directory `/home/Michael/magic-lantern/platform/50D.109'
../../../arm-toolchain462/bin/arm-none-eabi-gcc-4.6.2.exe -E -Wp,-MMD,./magiclantern.lds  -Wp,-MT,magiclantern.lds  -nostdlib  -fomit-frame-pointer  -fno-strict-aliasing  -DCONFIG_MAGICLANTERN=1  -DCONFIG_50D=1  -DRESTARTSTART=0x0004b000  -DROMBASEADDR=0xFF810000  -DVERSION=\"v2.3.NEXT.2013May08.50D109\"  -DCONFIG_DEBUGMSG=0  -Os  -Wall  -W  -Wno-unused-parameter  -Wno-implicit-function-declaration  -Wno-unused-function  -Wno-missing-field-initializers  -Wno-format  -Wdouble-promotion  -ffast-math  -fno-trapping-math  -fsingle-precision-constant  -fshort-double  -std=gnu99  -D__ARM__  -I.  -I../../src  -I../../picoc  -mthumb-interwork  -DCONFIG_PICOC -DCONFIG_CONSOLE ../../src/magiclantern.lds.S | grep -v ^# > magiclantern.lds
../../../arm-toolchain462/bin/arm-none-eabi-gcc-4.6.2.exe -Wp,-MMD,./entry.d  -Wp,-MT,entry.o  -nostdlib  -fomit-frame-pointer  -fno-strict-aliasing  -DCONFIG_MAGICLANTERN=1  -DCONFIG_50D=1  -DRESTARTSTART=0x0004b000  -DROMBASEADDR=0xFF810000  -DVERSION=\"v2.3.NEXT.2013May08.50D109\"  -DCONFIG_DEBUGMSG=0  -c -o entry.o ../../src/entry.S
../../Makefile.inc:746: recipe for target `entry.o' failed
make[1]: *** [entry.o] Error 1
make[1]: Leaving directory `/home/Michael/magic-lantern/platform/50D.109'
Makefile:44: recipe for target `50D' failed
make: *** [50D] Error 2

7D, AE-1P, 4x5 and GAS

necronomfive

Just a quick question:

is it safe to compile the latest contributions with GCC 4.7.2 from the Windows Yagarto Toolchain? It seems that currently, 4.7.3 is used, but didn't find a precompiled build for Windows (yeah, I know I'm lazy...  ::) )

Thanks for your help!

RenatoPhoto

Dont know the specific errors but here are some pointers:

You must use gcc 4.7.3 to make for raw_rec modules

Must always do a "make clean" before you "make"

Here is a list of just a few of the existing threads were you can get more information:

Questions regarding compilation, TCC
http://www.magiclantern.fm/forum/index.php?topic=5324.0

Linux & compiling code
http://www.magiclantern.fm/forum/index.php?topic=5317.msg33445#msg33445
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

necronomfive

Thank you very much! Seems that Pelican's guide many people are using as a reference for Windows compilation is out of date.

primeone

Just an update because the existing instructions left me with a couple of errors.

This is what I did for Windows 7 64bit

I've followed Pelican's directions (http://www.magiclantern.fm/forum/index.php?topic=2899.msg14021#msg14021) except that:

1. I used the latest version of gcc-arm-embedded 32 bit that I could find (https://launchpad.net/gcc-arm-embedded/+download) and installed it into $HOME/arm-toolchain474

2. I modified  magic-lantern/src/Makefile.src by adding edmac-memcpy.o

ML_SRC_OBJS = \
boot-hack.o \
ico.o \
edmac.o \
menu.o \
edmac-memcpy.o \
debug.o \


3. I modified Makefile.user to this:


CONFIG_TCC          = y
CONFIG_MEMCHECK     = n
CONFIG_MODULES      = y
GCC_VERSION=-4.7.4
ARM_PATH=~/arm-toolchain474
ARM_ABI=none-eabi
ARM_LIBC_A=~/arm-toolchain474/arm-none-eabi/lib/libc.a
CONFIG_PICOC = n
PYTHON=python2.6


Notice how I needed to add the - to the GCC version. Otherwise it wouldn't find the compiler.

Fingers crossed!






Pelican

Quote from: necronomfive on May 31, 2013, 10:03:58 PM
Just a quick question:

is it safe to compile the latest contributions with GCC 4.7.2 from the Windows Yagarto Toolchain? It seems that currently, 4.7.3 is used, but didn't find a precompiled build for Windows (yeah, I know I'm lazy...  ::) )

Thanks for your help!
You can use from 4.7.2 to the latest.
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

Marsu42

Quote from: primeone on August 23, 2013, 02:25:28 PM
Notice how I needed to add the - to the GCC version. Otherwise it wouldn't find the compiler.

If so something seems to be already broken, it should really work as described - here's my Makefile.user, it's simple nowadays since Makefile.user.default has good settings. The /opt/gcc-arm contains the directories extracted from the official distribution: arm-none-eabi, bin, lib, share


SUPPORTED_MODELS:=60D
ARM_PATH=/opt/gcc-arm
GCC_VERSION=-4.7.4
CFLAG_USER = -march=armv5te -mcpu=arm946e-s -g -O2 -DCONFIG_RELEASE_BUILD -w


Btw to compile the raw_rec tools you need to modify that Makefile to read "all: raw2dng.exe" (i.e. add .exe to the end).

a1ex

Just typing "make raw2dng.exe" should do the trick. It's not included in "all" because it needs a Windows compiler too, besides the arm one.

Marsu42

Quote from: a1ex on August 26, 2013, 09:16:24 AM
Just typing "make raw2dng.exe" should do the trick. It's not included in "all" because it needs a Windows compiler too, besides the arm one.

Thing is: If the line stays as "all: raw2dng" it breaks the cygwin compile, so if  I want to make all modules in one go with Makefile.modules.user I have to modify the raw_rec Makefile - I am just to lazy to submit a patch that auto-detects the compilation environment :-p

primeone

To Marsu42:

Your Makefile.user has the same change mine has : GCC_VERSION=-4.7.4

Pelican's post says GCC_VERSION=4.6.4


Marsu42

Quote from: primeone on August 26, 2013, 04:52:28 PM
Your Makefile.user has the same change mine has : GCC_VERSION=-4.7.4

Well, I'm always using the newest arm-eabi-none toolchain, you never know if it'll save some nanoseconds :->

kihlbahkt

I am slightly interested in setting up my win7 64 bit for development but reading thru the win based threads makes it sound like a huge pain in the ass to setup. Or am I just too cynical and its is not really that bad?  My plan is to follow the  "best " instruction I can find and move forward. If I can get it running then I will create a Win7 64bit tutorial. The first decision I need to make is... do I run virtual linux or cygwin? Does anyone have an opinion on that? If you read this and are doing dev on windows, speak up. Peace, Out.
600D x2

dpjpandone

I have the toolchain setup on my windows machine now, using gcc 4.8.3, and Cygwin.
When I make 7D.203 it compiles, and ML boots on the camera, but as soon as I try to use the raw module, the camera freezes and I have to pull the battery. Has anyone else experienced this? What was the solution?

I am a little unclear about which files I need to copy to my card, I don't see all the same stuff that comes packed in the nightly builds.... I have tried just keeping the files from nightlies on my card and just replacing the autoexec and .fir, but this results in freezing when a module is activated.

philmoz

Quote from: dpjpandone on August 14, 2014, 02:14:09 AM
I have the toolchain setup on my windows machine now, using gcc 4.8.3, and Cygwin.
When I make 7D.203 it compiles, and ML boots on the camera, but as soon as I try to use the raw module, the camera freezes and I have to pull the battery. Has anyone else experienced this? What was the solution?

I am a little unclear about which files I need to copy to my card, I don't see all the same stuff that comes packed in the nightly builds.... I have tried just keeping the files from nightlies on my card and just replacing the autoexec and .fir, but this results in freezing when a module is activated.

I had this at first on my 5DIII - until I updated the .sym file in the modules directory.

When you rebuild, it should create a 7D_203.sym file in the platform directory, copy this to the modules directory on the card and see if it helps.

Phil.

dmilligan

You can also just do 'make install' from platform/xxxD.xxx/  (if you setup your card directory paths correctly).

ayshih

Quote from: kihlbahkt on June 18, 2014, 01:47:42 AM
The first decision I need to make is... do I run virtual linux or cygwin? Does anyone have an opinion on that?
On Windows, I use a Linux VM in VirtualBox, and it works fine.  I haven't tried any other approach.

Quote from: philmoz on August 14, 2014, 02:36:43 AM
I had this at first on my 5DIII - until I updated the .sym file in the modules directory.

When you rebuild, it should create a 7D_203.sym file in the platform directory, copy this to the modules directory on the card and see if it helps.
I recommend running "make zip" from the appropriate platform directory, which will create a nightly-build-like zip file which has the correct directory structure with files in the right places.  You don't want to be in a situation where you can inadvertently mix files from different builds.

(Alternatively, do "make install", as @dmilligan suggests.)
Canon EOS 50D | 17–40mm f/4L & 70–300mm f/4.5–5.6 DO IS | Lexar 1066x

dpjpandone

Thanks so much for helping me with this guys!
I do make clean, then make zip from the 7d.203 folder, and I get:

"hg: command not found" every time it tries to build a module... each module does this and then leaves the directory and deletes itself. Here is an example:

Building module mlv_snd...
make[4]: hg: Command not found
REBUILDING
[ README   ]   module_strings.h
cat README.rst | grep -v -E "^:([^:])+:.+$" | rst2html --no-xml-declaration | py                                                                                                                                                 thon ../html2text.py -b 700



/bin/sh: rst2html: command not found

(<type 'exceptions.SystemExit'>, SystemExit(1,), <traceback object at 0x6ffffd97                                                                                                                                                 b90>)
../../modules/Makefile.modules:39: recipe for target 'module_strings.h' failed
make[4]: *** [module_strings.h] Error 1

********************************************************
WARNING: module mlv_snd failed to build, deleting
********************************************************

make[4]: Entering directory '/cygdrive/c/ml/modules/mlv_snd'
make[4]: hg: Command not found
[ RM ]  mlv_snd.o mlv_snd.mo mlv_snd.sym mlv_snd.dep module_strings.h *.o *.d *.                                                                                                                                                 dep *.sym hgstamp
make[4]: Leaving directory '/cygdrive/c/ml/modules/mlv_snd'
make[3]: Leaving directory '/cygdrive/c/ml/modules/mlv_snd'
make[2]: Leaving directory '/cygdrive/c/ml/modules'
mkdir -p /cygdrive/c/ml/platform/7d.203/zip/ML/modules || echo "no problem"
cp ../modules/*/*.mo /cygdrive/c/ml/platform/7d.203/zip/ML/modules/ || echo "no                                                                                                                                                  problem"
cp: cannot stat `../modules/*/*.mo': No such file or directory
no problem
make[1]: Leaving directory '/cygdrive/c/ml/modules'
mkdir -p /cygdrive/c/ml/platform/7d.203/zip/ML/doc
cp -v ../../doc/cam/* /cygdrive/c/ml/platform/7d.203/zip/ML/doc
cp: cannot stat `../../doc/cam/*': No such file or directory
../../Makefile.inc:71: recipe for target 'installdoc' failed
make: [installdoc] Error 1 (ignored)
cp ../../doc/README.user /cygdrive/c/ml/platform/7d.203/zip/ML/README
cp ../../doc/INSTALL.pdf /cygdrive/c/ml/platform/7d.203/zip || echo "warning Una                                                                                                                                                 ble to copy INSTALL.pdf"
cp: cannot stat `../../doc/INSTALL.pdf': No such file or directory
warning Unable to copy INSTALL.pdf
cp ../../doc/UserGuide.pdf /cygdrive/c/ml/platform/7d.203/zip || echo "warning U                                                                                                                                                 nable to copy UserGuide.pdf"
cp: cannot stat `../../doc/UserGuide.pdf': No such file or directory
warning Unable to copy UserGuide.pdf
cp ../../src/logo.bmp /cygdrive/c/ml/platform/7d.203/zip/ML/docs || echo "warnin                                                                                                                                                 g Unable to copy logo.bmp"
[ LD       ]   autoexec-fir
[ OBJCOPY  ]   autoexec-fir.bin
[ STAT     ]   autoexec-fir.bin
autoexec-fir.bin: 473584 bytes
python ../../../dumper/build_fir.py -r ../../../dumper/7D000203.FIR autoexec-fir                                                                                                                                                 .bin 7D_203.fir
python: can't open file '../../../dumper/build_fir.py': [Errno 2] No such file o                                                                                                                                                 r directory
../../platform/Makefile.platform.extras:5: recipe for target 'build_fir' failed
make: [build_fir] Error 2 (ignored)
[ RM ]  magiclantern-Nightly.2014Aug13.7D203.zip
chmod -x /cygdrive/c/ml/platform/7d.203/zip/autoexec.bin
cd /cygdrive/c/ml/platform/7d.203/zip; zip -z ../magiclantern-Nightly.2014Aug13.                                                                                                                                                 7D203.zip < \
        ../../../src/zip.txt -r .\
        @printf "[ RM dir ] %s\n" " /cygdrive/c/ml/platform/7d.203/zip/";
        zip warning: name not matched: @printf
cygwin warning:
  MS-DOS style path detected: [ RM dir ] %s\n
  Preferred POSIX equivalent is: [ RM dir ] %s/n
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
        zip warning: name not matched: [ RM dir ] %s\n
        zip warning: name not matched:  /cygdrive/c/ml/platform/7d.203/zip/
  adding: 7D_203.fir (deflated 1%)
  adding: autoexec.bin (deflated 49%)
  adding: ML/ (stored 0%)
  adding: ML/cropmks/ (stored 0%)
  adding: ML/cropmks/CineSco2.bmp
zip warning: Permission denied
        zip warning: could not open for reading: ML/cropmks/CineSco2.bmp
  adding: ML/cropmks/CrssMtr2.bmp
zip warning: Permission denied
        zip warning: could not open for reading: ML/cropmks/CrssMtr2.bmp
  adding: ML/cropmks/Passport.bmp
zip warning: Permission denied
        zip warning: could not open for reading: ML/cropmks/Passport.bmp
  adding: ML/cropmks/PhiPhoto.bmp
zip warning: Permission denied
        zip warning: could not open for reading: ML/cropmks/PhiPhoto.bmp
  adding: ML/cropmks/PhiVideo.bmp
zip warning: Permission denied
        zip warning: could not open for reading: ML/cropmks/PhiVideo.bmp
  adding: ML/data/ (stored 0%)
  adding: ML/data/apsc8p.lut
zip warning: Permission denied
        zip warning: could not open for reading: ML/data/apsc8p.lut
  adding: ML/data/apsc8r.lut
zip warning: Permission denied
        zip warning: could not open for reading: ML/data/apsc8r.lut
  adding: ML/data/ff8p.lut
zip warning: Permission denied
        zip warning: could not open for reading: ML/data/ff8p.lut
  adding: ML/data/ff8r.lut
zip warning: Permission denied
        zip warning: could not open for reading: ML/data/ff8r.lut
  adding: ML/doc/ (stored 0%)
  adding: ML/docs
zip warning: Permission denied
        zip warning: could not open for reading: ML/docs
  adding: ML/fonts/ (stored 0%)
  adding: ML/fonts/arghlf22.rbf
zip warning: Permission denied
        zip warning: could not open for reading: ML/fonts/arghlf22.rbf
  adding: ML/fonts/argnor23.rbf
zip warning: Permission denied
        zip warning: could not open for reading: ML/fonts/argnor23.rbf
  adding: ML/fonts/argnor28.rbf
zip warning: Permission denied
        zip warning: could not open for reading: ML/fonts/argnor28.rbf
  adding: ML/fonts/argnor32.rbf
zip warning: Permission denied
        zip warning: could not open for reading: ML/fonts/argnor32.rbf
  adding: ML/fonts/term12.rbf
zip warning: Permission denied
        zip warning: could not open for reading: ML/fonts/term12.rbf
  adding: ML/fonts/term20.rbf
zip warning: Permission denied
        zip warning: could not open for reading: ML/fonts/term20.rbf
  adding: ML/logs/ (stored 0%)
  adding: ML/modules/ (stored 0%)
  adding: ML/modules/7D_203.sym (deflated 64%)
  adding: ML/README
zip warning: Permission denied
        zip warning: could not open for reading: ML/README
  adding: ML/scripts/ (stored 0%)
  adding: ML/scripts/brack.c
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/brack.c
  adding: ML/scripts/clock.c
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/clock.c
  adding: ML/scripts/dump.lua
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/dump.lua
  adding: ML/scripts/dumpcfg.lua
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/dumpcfg.lua
  adding: ML/scripts/hello.c
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/hello.c
  adding: ML/scripts/hello.py
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/hello.py
  adding: ML/scripts/img.c
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/img.c
  adding: ML/scripts/keys.c
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/keys.c
  adding: ML/scripts/print.lua
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/print.lua
  adding: ML/scripts/sokoban.c
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/sokoban.c
  adding: ML/scripts/test.c
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/test.c
  adding: ML/scripts/wb_shoot.lua
zip warning: Permission denied
        zip warning: could not open for reading: ML/scripts/wb_shoot.lua
  adding: ML/settings/ (stored 0%)

zip warning: Not all files were readable
  files/entries read:  12 (536K bytes)  skipped:  29 (1.5M bytes)
enter new zip file comment (end with .):
../../Makefile.inc:90: recipe for target 'magiclantern-Nightly.2014Aug13.7D203.z                                                                                                                                                 ip' failed
make: *** [magiclantern-Nightly.2014Aug13.7D203.zip] Error 18













ayshih

"hg: command not found" means that either Mercurial is not installed, or it's not in the path.  Mercurial is invoked when building a module because information about the last change to the module is added to the module's help screen.
Canon EOS 50D | 17–40mm f/4L & 70–300mm f/4.5–5.6 DO IS | Lexar 1066x

dpjpandone

Quote from: ayshih on August 14, 2014, 05:54:20 AM
"hg: command not found" means that either Mercurial is not installed, or it's not in the path.  Mercurial is invoked when building a module because information about the last change to the module is added to the module's help screen.

oh crap, I forgot to reinstall it...  I'm cloning the repository now!

also, what do you use to edit the code? I've just been making small changes with windows write or wordpad, but I's like to use something like the arduino environment which has formatting and shows keywords in different colors and etc...

dpjpandone

Now I'm seeing this a lot:

/bin/sh: rst2html: command not found


I googled this and it looks like I need to install rst2html in my arm path, was this supposed to be included with mercurial? or with the arm gcc 4.8.3?



nikfreak

can you try reinstall (1st sudo apt-get remove then install...) package docutils??? This solved it for me when I got that error
[size=8pt]70D.112 & 100D.101[/size]

Audionut

Do an advanced search in this dev section for rst2html with my username.

I'd do it myself but I only have phone access.

dpjpandone

Audionut - an advanced search only turns up this thread....

I downloaded docutils 0.12 and followed the instructions on the sourceforge page here: http://docutils.sourceforge.net/README.html#installation


here is how I installed it:

Jon@Jon-PC ~
$ cd c:/cygwin64/bin/docutils-0.12

Jon@Jon-PC /usr/bin/docutils-0.12
$ python setup.py install
running install
running build
running build_py
running build_scripts
running build_data
running install_lib
running install_scripts
changing mode of /usr/bin/rst2html.py to 755
changing mode of /usr/bin/rst2latex.py to 755
changing mode of /usr/bin/rst2man.py to 755
changing mode of /usr/bin/rst2odt.py to 755
changing mode of /usr/bin/rst2odt_prepstyles.py to 755
changing mode of /usr/bin/rst2pseudoxml.py to 755
changing mode of /usr/bin/rst2s5.py to 755
changing mode of /usr/bin/rst2xetex.py to 755
changing mode of /usr/bin/rst2xml.py to 755
changing mode of /usr/bin/rstpep2html.py to 755
running install_data
running install_egg_info
Removing /usr/lib/python2.7/site-packages/docutils-0.12-py2.7.egg-info
Writing /usr/lib/python2.7/site-packages/docutils-0.12-py2.7.egg-info


can you see where I made a mistake?


btw, here is my makefile.user (in case the problem is there) : http://www.filedropper.com/makefile_1







dmilligan

ln -s /usr/bin/rst2html.py /usr/bin/rst2html