<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wikilegacy.armadeus.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AlainP</id>
	<title>ArmadeusWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wikilegacy.armadeus.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AlainP"/>
	<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Special:Contributions/AlainP"/>
	<updated>2026-04-27T20:08:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=HelloWorld&amp;diff=6358</id>
		<title>HelloWorld</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=HelloWorld&amp;diff=6358"/>
		<updated>2009-04-26T07:59:57Z</updated>

		<summary type="html">&lt;p&gt;AlainP: /* Compilation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page you will learn how to create your first C application for your Armadeus board&lt;br /&gt;
&lt;br /&gt;
==Source code==&lt;br /&gt;
First take your favorite editor/IDE and create the following program:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    printf( &amp;quot;APF9328 says: Hello World ! ;-)\n&amp;quot; );&lt;br /&gt;
    exit(0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save it as hello.c&lt;br /&gt;
&lt;br /&gt;
==Compilation==&lt;br /&gt;
The C cross compiler is installed in &#039;&#039;armadeus/buildroot/build_armv4t/staging_dir/bin/&#039;&#039; and is named &#039;&#039;arm-linux-gcc&#039;&#039;&lt;br /&gt;
There are 2 possibilities to use it:&lt;br /&gt;
* either add &#039;&#039;armadeus/buildroot/build_armv4t/staging_dir/usr/bin/&#039;&#039; to your &#039;&#039;PATH&#039;&#039; environment variable and then call &#039;&#039;arm-linux-gcc&#039;&#039; instead of &#039;&#039;gcc&#039;&#039;&lt;br /&gt;
* or call directly &#039;&#039;armadeus/buildroot/build_armv4t/staging_dir/usr/bin/arm-linux-gcc&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
So to compile your small program do (here hello.c was saved in armadeus/target/demos/ directory):&lt;br /&gt;
 [host demos]$ ../../buildroot/build_armv4t/staging_dir/usr/bin/arm-linux-gcc -mcpu=arm920t -o hello hello.c&lt;br /&gt;
&lt;br /&gt;
==Running==&lt;br /&gt;
Copy your &#039;&#039;hello&#039;&#039; executable on your board either through TFTP or NFS&lt;br /&gt;
===TFTP===&lt;br /&gt;
Be sure to have TFTP server installed, [[Connection_with_U-Boot_on_Linux#TFTP_server| if not it&#039;s explained here]]&amp;lt;br&amp;gt;&lt;br /&gt;
Copy &#039;&#039;hello&#039;&#039; to TFTP directory:&lt;br /&gt;
 [host demos]$ cp hello /tftpboot/&lt;br /&gt;
Load your executable on the target (here my host IP is 192.168.0.2):&lt;br /&gt;
 # tftp -g -r hello -l /usr/bin/hello 192.168.0.2&lt;br /&gt;
Give it executable rights, if lost during TFTP transfer:&lt;br /&gt;
 # chmod a+x /usr/bin/hello&lt;br /&gt;
Launch it:&lt;br /&gt;
 # /usr/bin/hello&lt;br /&gt;
 APF9328 says: Hello World ! ;-)&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s up to you ! ;-)&lt;br /&gt;
&lt;br /&gt;
===NFS===&lt;br /&gt;
Be sure to have NFS server installed, [[Network_Configuration| if not it&#039;s explained here]]&amp;lt;br&amp;gt;&lt;br /&gt;
I assume that your NFS drive is accessible from &#039;&#039;/mnt/host&#039;&#039;&lt;br /&gt;
Launch your prog:&lt;br /&gt;
 [target]# /mnt/host/hello&lt;br /&gt;
&lt;br /&gt;
==Putting it all together in a Makefile==&lt;br /&gt;
You can put your program compiling and copying in a &#039;&#039;Makefile&#039;&#039; to make things cleaner:&lt;br /&gt;
 CC=arm-linux-gcc&lt;br /&gt;
 CFLAGS=-W -Wall&lt;br /&gt;
 LDFLAGS=&lt;br /&gt;
 EXEC=hello&lt;br /&gt;
 SRC= $(wildcard *.c)&lt;br /&gt;
 OBJ= $(SRC:.c=.o)&lt;br /&gt;
 &lt;br /&gt;
 all: $(EXEC)&lt;br /&gt;
 &lt;br /&gt;
 hello: $(OBJ)&lt;br /&gt;
     $(CC) -o $@ $^ $(LDFLAGS)&lt;br /&gt;
 &lt;br /&gt;
 %.o: %.c&lt;br /&gt;
     $(CC) -o $@ -c $&amp;lt; $(CFLAGS)&lt;br /&gt;
 &lt;br /&gt;
 .PHONY: clean install&lt;br /&gt;
 &lt;br /&gt;
 clean:&lt;br /&gt;
     rm -rf *.o&lt;br /&gt;
     rm -f $(EXEC)&lt;br /&gt;
 &lt;br /&gt;
 install: all&lt;br /&gt;
     cp -f $(EXEC) /tftpboot/&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;!! If you do a cut &amp;amp; paste with previous commands, don&#039;t forget to check TABS for each target (Makefiles are using TABS and not SPACES) !! In that case make will complains about a missing separator line 11&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then, just do:&lt;br /&gt;
 [host demos]$ make clean install&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://www.handhelds.org/minihowto/porting-software.html Things to know when porting x86 software to ARM]&lt;br /&gt;
* [http://gl.developpez.com/tutoriel/outil/makefile/ Les Makefiles, comment ça marche ?] &lt;br /&gt;
* [http://www.advancedlinuxprogramming-fr.org/doku.php Livre en ligne: Programmation Linux Avancée] &lt;br /&gt;
&lt;br /&gt;
{{LanguageBar|HelloWorld|HelloWorld|HelloWorld}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Programming language]]&lt;/div&gt;</summary>
		<author><name>AlainP</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Virtualbox_2.1.0_Ubuntu_8.04_guest_Windows_Host&amp;diff=5451</id>
		<title>Virtualbox 2.1.0 Ubuntu 8.04 guest Windows Host</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Virtualbox_2.1.0_Ubuntu_8.04_guest_Windows_Host&amp;diff=5451"/>
		<updated>2009-01-03T22:23:26Z</updated>

		<summary type="html">&lt;p&gt;AlainP: New page: Under construction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Under construction&lt;/div&gt;</summary>
		<author><name>AlainP</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Project_Management&amp;diff=5450</id>
		<title>Project Management</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Project_Management&amp;diff=5450"/>
		<updated>2009-01-03T22:17:38Z</updated>

		<summary type="html">&lt;p&gt;AlainP: /* Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ben va falloir s&#039;y mettre cette fois ! ;-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Work in progress==&lt;br /&gt;
===Software===&lt;br /&gt;
* [[Fr:Integration ipkg | ipkg integration]] (French) -&amp;gt; contact JulienB / artemys&lt;br /&gt;
* Article for GNU Linux Magazine France (French): will explain how to use touchscreen and alsa in embedded devices -&amp;gt; contact JulienB / artemys&lt;br /&gt;
* Domotic application&#039;s base elements definitions -&amp;gt; [[Domos_Project]]&lt;br /&gt;
* Support for other build systems (like Scratchbox) -&amp;gt; contact JiBee&lt;br /&gt;
* [[Linux 2.6.24 integration | Integration of Linux 2.6.24 kernel]] -&amp;gt; contact JulienB / artemys&lt;br /&gt;
* [[Linux 2.6.27 integration | Integration of Linux 2.6.27 kernel]] -&amp;gt; contact JulienB / Jorasse&lt;br /&gt;
* [[EFL | Enlightment]] -&amp;gt; contact JulienN / jujun&lt;br /&gt;
* [[buildroot-20081103 integration]] -&amp;gt; contact Jorasse/JulienB&lt;br /&gt;
* [[u-boot-1.3.4 integration]] -&amp;gt; contact Jorasse&lt;br /&gt;
* [[Armadeus Integration Test]] -&amp;gt; contact Jorasse&lt;br /&gt;
* [[Armadeus 3]]&lt;br /&gt;
* [[Virtualbox 2.1.0 Ubuntu 8.04 guest Windows Host]]-&amp;gt; contact Alarm&lt;br /&gt;
&lt;br /&gt;
===Hardware===&lt;br /&gt;
* IR Receiver IP for FPGA -&amp;gt; contact benoit&lt;br /&gt;
* CMOS capter integration -&amp;gt; contact JulienB&lt;br /&gt;
&lt;br /&gt;
==Recently released==&lt;br /&gt;
===Armadeus release 2.2/2.3===&lt;br /&gt;
* [[buildroot-20071027 integration]] -&amp;gt; contact Jorasse&lt;br /&gt;
* [[Linux 2.6.23 integration | Update to Linux 2.6.23 kernel]]  -&amp;gt; contact JulienB&lt;/div&gt;</summary>
		<author><name>AlainP</name></author>
	</entry>
</feed>