MADDE/FAQ

m (grammar again)
m (Protected "MADDE/FAQ" [edit=autoconfirmed:move=autoconfirmed])
 
(9 intermediate revisions not shown)
Line 1: Line 1:
 +
{{MADDE}}
 +
=== What is MADDE? ===
=== What is MADDE? ===
-
MADDE stands for Maemo Application Development and Debugging Environment. It
+
MADDE stands for Maemo Application Development and Debugging Environment. It is SDK for cross compile, debug and package new application for Maemo. It is not meant to use to build debian packages that use Autotools or anything that aids compilation by figuring out native system information.
-
is SDK for cross compile, debug and package new application for Maemo.  
+
-
It is not meant to use to build debian packages that use Autotools or
+
-
anything that aids compilation by figuring out native system information.
+
=== What platforms are supported? ===
=== What platforms are supported? ===
Line 20: Line 19:
=== How do I setup cross compilation environment? ===
=== How do I setup cross compilation environment? ===
-
Cross compilation environment is created by using 'mad-admin create target'
+
Cross compilation environment is created by using 'mad-admin create target' command. You can list supported targets by using 'mad list targets' command.
-
command. You can list supported targets by using 'mad list targets' command.
+
=== How do I use created cross compilation target? ===
=== How do I use created cross compilation target? ===
-
Usually you compile your program by using Makefile and make command.  
+
Usually you compile your program by using Makefile and make command. Now you can give command 'mad -t <target> make' and compilation is done by using cross compilation environment named <target>.  
-
Now you can give command 'mad -t <target> make' and compilation is  
+
-
done by using cross compilation environment named <target>.  
+
=== Why doesn't the installer come with the toolchains and sysroots for all available targets? ===
=== Why doesn't the installer come with the toolchains and sysroots for all available targets? ===
-
Not every developer needs every target. Installation is faster when  
+
Not every developer needs every target. Installation is faster when no unneeded components come with the installer. Furthermore, this approach makes it easier to provide more targets in the future.
-
no unneeded components come with the installer. Furthermore, this approach  
+
-
makes it easier to provide more targets in the future.
+
=== Can I use several targets simultaneously? ===
=== Can I use several targets simultaneously? ===
-
Yes you can. When you have created several targets use  
+
Yes you can. When you have created several targets use 'mad -t <target>' to cross compile for <target>.
-
'mad -t <target>' to cross compile for <target>.
+
=== How well does MADDE work for GTK+ development (in C)? ===
=== How well does MADDE work for GTK+ development (in C)? ===
-
MADDE works well for GTK+ development (in C).
+
MADDE works well for GTK+ development (in C). At minimum the lines 'pkg-config --cflags gtk+-2.0' (for source to object file compiling) and 'pkg-config --libs gtk+-2.0' (for linking) is needed in your Makefile
-
At minimum the lines 'pkg-config --cflags gtk+-2.0' (for source to object
+
-
file compiling) and 'pkg-config --libs gtk+-2.0' (for linking) is needed
+
-
in your Makefile
+
-
Use 'mad pkg-config --list-all' to see some other (gtk) modules you may
+
Use 'mad pkg-config --list-all' to see some other (gtk) modules you may need.
-
need.
+
-
(Note that if you try to run gcc compilation from command line
+
(Note that if you try to run gcc compilation from command line outside mad environment the line must be like
-
outside mad environment the line must be like
+
mad gcc -o foo foo.c `mad pkg-config --cflags --libs gtk+-2.0'
mad gcc -o foo foo.c `mad pkg-config --cflags --libs gtk+-2.0'
-
to get both gcc and pkg-config be run inside mad environment --
+
to get both gcc and pkg-config be run inside mad environment -- When inside Makefile this is not a problem as whole make is run inside mad environment...).
-
When inside Makefile this is not a problem as whole make is run
+
-
inside mad environment...).
+
=== How about Hildon development (in C)? ===
=== How about Hildon development (in C)? ===
Line 64: Line 50:
=== Is there an emulator for testing? ===
=== Is there an emulator for testing? ===
-
 
+
From the version 0.6.72 there is QEMU based emulator.
-
Not yet. Be patient, its coming soon.
+
=== Where can I get source code? ===
=== Where can I get source code? ===
-
It is not available yet but it will be. Unfortunately I don't know when.
+
The source code is available [http://meego.gitorious.org/meego-developer-tools/madde on gitorious], and can be downloaded using git:
-
By the way, most of code are perl and bourne shell scripts. Look inside directories
+
git clone git://gitorious.org/meego-developer-tools/madde.git
-
{MADDE}/version/bin/
+
-
{MADDE}/version/madlib/
+
-
{MADDE}/version/madbin/
+
=== How does MADDE work? ===
=== How does MADDE work? ===
-
MADDE is basically a cross-compiler. Cross-compilation are done via 'target'.  
+
MADDE is basically a cross-compiler. Cross-compilation are done via 'target'. Without 'target' one cannot compile. 'Target' hides from the end user the fact that she/he is actually cross-compiling. The end user can use same Makefile as in native compilation. Usually no modifications are needed.
-
Without 'target' one cannot compile. 'Target' hides from the end user
+
-
the fact that she/he is actually cross-compiling. The end user can use same
+
-
Makefile as in native compilation. Usually no modifications are needed.
+
-
Traditionally cross-toolchain contains sysroot. MADDE separates toolchain and sysroot into different components, because libraries and header files are updated more often than compilation tools. MADDE supports GNU GCC and binutils
+
Traditionally cross-toolchain contains sysroot. MADDE separates toolchain and sysroot into different components, because libraries and header files are updated more often than compilation tools. MADDE supports GNU GCC and binutils as a toolchain. No others are currently supported. Support for other toolchains is quite easy to add if they offer similar feature than GCC's --sysroot option.  
-
as a toolchain. No others are currently supported. Support for other toolchains is quite easy to add if they offer similar feature than GCC's --sysroot option.  
+
-
Compilation is done through 'target' specific wrappers. GCC wrappers work so that they add --sysroot=$SYSROOT_DIR option (SYSROOT_DIR is absolute path into target specific sysroot) and mangle all absolute paths from arguments to be relative to the $SYSROOT_DIR. After that wrappers call a real GCC binary.  Path mangling is done by changing first '/' character with '='.  
+
Compilation is done through 'target' specific wrappers. GCC wrappers work so that they add --sysroot=$SYSROOT_DIR option (SYSROOT_DIR is absolute path into target specific sysroot) and mangle all absolute paths from arguments to be relative to the $SYSROOT_DIR. After that wrappers call a real GCC binary.  Path mangling is done by changing first '/' character with '='. If path prefix already contains SYSROOT_DIR it is not mangled.
-
If path prefix already contains SYSROOT_DIR it is not mangled.
+
In practice SYSROOT_DIR is patched inside wrapper when target is created.
In practice SYSROOT_DIR is patched inside wrapper when target is created.
Line 96: Line 73:
Under the work. Qt Creator + madde integration is coming soon.
Under the work. Qt Creator + madde integration is coming soon.
 +
 +
=== How do I mount local directory to N900 with MADDE? ===
 +
 +
See instructions from there [[MADDE/Mounting| Mounting]]
 +
 +
[[Category:Development]]

Latest revision as of 11:25, 1 October 2012

Image:Ambox_notice.png
MADDE is currently a technology preview.

These instructions are liable to change as development progresses. If some of the components do not work as expected, please add your question to the MADDE talk thread and follow up the discussion.

tablets-dev.nokia.com is down, see MADDE#Installation for alternatives.


Contents

What is MADDE?

MADDE stands for Maemo Application Development and Debugging Environment. It is SDK for cross compile, debug and package new application for Maemo. It is not meant to use to build debian packages that use Autotools or anything that aids compilation by figuring out native system information.

What platforms are supported?

MADDE supports Windows (XP, Vista, 7), Linux variants, Mac OS X (Snow Leopard). It probably works on other Unix variants too but it is not tested there.

Where can I get MADDE?

You can download the installer from MADDE downloads

How do I install MADDE?

Installation instructions can be found from main page MADDE

How do I setup cross compilation environment?

Cross compilation environment is created by using 'mad-admin create target' command. You can list supported targets by using 'mad list targets' command.

How do I use created cross compilation target?

Usually you compile your program by using Makefile and make command. Now you can give command 'mad -t <target> make' and compilation is done by using cross compilation environment named <target>.

Why doesn't the installer come with the toolchains and sysroots for all available targets?

Not every developer needs every target. Installation is faster when no unneeded components come with the installer. Furthermore, this approach makes it easier to provide more targets in the future.

Can I use several targets simultaneously?

Yes you can. When you have created several targets use 'mad -t <target>' to cross compile for <target>.

How well does MADDE work for GTK+ development (in C)?

MADDE works well for GTK+ development (in C). At minimum the lines 'pkg-config --cflags gtk+-2.0' (for source to object file compiling) and 'pkg-config --libs gtk+-2.0' (for linking) is needed in your Makefile

Use 'mad pkg-config --list-all' to see some other (gtk) modules you may need.

(Note that if you try to run gcc compilation from command line outside mad environment the line must be like

mad gcc -o foo foo.c `mad pkg-config --cflags --libs gtk+-2.0'

to get both gcc and pkg-config be run inside mad environment -- When inside Makefile this is not a problem as whole make is run inside mad environment...).

How about Hildon development (in C)?

Like the above; just replace 'gtk+-2.0' with 'hildon-1 libosso'

Is there an emulator for testing?

From the version 0.6.72 there is QEMU based emulator.

Where can I get source code?

The source code is available on gitorious, and can be downloaded using git:

git clone git://gitorious.org/meego-developer-tools/madde.git

How does MADDE work?

MADDE is basically a cross-compiler. Cross-compilation are done via 'target'. Without 'target' one cannot compile. 'Target' hides from the end user the fact that she/he is actually cross-compiling. The end user can use same Makefile as in native compilation. Usually no modifications are needed.

Traditionally cross-toolchain contains sysroot. MADDE separates toolchain and sysroot into different components, because libraries and header files are updated more often than compilation tools. MADDE supports GNU GCC and binutils as a toolchain. No others are currently supported. Support for other toolchains is quite easy to add if they offer similar feature than GCC's --sysroot option.

Compilation is done through 'target' specific wrappers. GCC wrappers work so that they add --sysroot=$SYSROOT_DIR option (SYSROOT_DIR is absolute path into target specific sysroot) and mangle all absolute paths from arguments to be relative to the $SYSROOT_DIR. After that wrappers call a real GCC binary. Path mangling is done by changing first '/' character with '='. If path prefix already contains SYSROOT_DIR it is not mangled.

In practice SYSROOT_DIR is patched inside wrapper when target is created.

'mad' command finds out the used 'target'. The it adds 'target' specific bin/ (wrappers are there) into PATH environment variable. Now when GCC family is called OS finds out first our wrappers. Process is simple, isn't it?

Where is IDE?

Under the work. Qt Creator + madde integration is coming soon.

How do I mount local directory to N900 with MADDE?

See instructions from there Mounting