Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX9-L/Development/Hello World example

130 bytes removed, 1 February
no edit summary
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|2024/01/30
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK-MX9-L -5.0.0 release
|-
==Hello word example==
Here below is an example on C code displaying the classic [https://en.wikipedia.org/wiki/%22Hello,_World!%22_program Hello World!] message on the target serial console.
This example shows how to use the arm cross-compiler using the environment configured for this purpose.
=== Setting the cross-compiler ===
It is assumed that the development environment has been set up properly as described [[DESK-MX-L#Quick_start_guide|here]].
* start the Linux development VM and login into the system
* open a terminal window and ''cd'' into your source code directory
</pre>
* invoke the cross-compiler for compiling your source code example: the object file obtained, is a proper ELF 3264-bit for the target microprocessor
<pre class="workstation-terminal">
dvdk@vagrant:~/myproject$ $CC hello.c -o hello
=== Running the example on the target ===
Now it is enough to copy the object file in the <code>/home/root</code> rfs directory and [[AURA SOM/DESK-MX9-L/General/Booting_from_NFS Booting_from_nfs | boot from nfs...]]:
<pre class="workstation-terminal">
8,286
edits