[En-Nut-Discussion] Installing the Unix emulation of Ethernut HOWTO

Ovidiu ovidiu256 at gmail.com
Tue Apr 17 21:26:38 CEST 2007


In Ubuntu Feisty (gcc4.1.3) is not working, i have done those corrections
but it seems that there are more errors, I don't think that anyone need unix
emulation (is not worth the time) for more than a simple terminal test
program, better use some JTAG debugging.

On 4/13/07, Michael Müller <mmueller at se.eecs.uni-kassel.de> wrote:
>
> Hi Ethernut users,
>
> some time ago I already tried out the Unix emulation of Ethernut but
> with littel success. Now I searched the web and also the Ethernut
> website but only found very few information about the state and how to
> build such a system. As the compile process failed with my configuration
> I began to write little step by step instructions with fixes etc. which
> maybe is also useful for the community.
>
> Have fun
> Michael
>
>
> Installing the Unix emulation of Ethernut
>
> Software versions:
> - GCC 4.03 (Ubuntu Dapper)
> - Ethernut 4.2.1
>
> 1) Extract the source code of the Ethernut OS
>    tar xvfj ethernut-4.2.1.tar.bz2
>
> 2) Enter the new folder and prepare the system for Unix emulation
>    cd ethernut-4.2.1
>    ./nutsetup
> Enter 5 for Unix Emulation
>
> 3) Fix some trouble makers
>
> The 4.x version of the GCC compiler seems to be more sensitive to C-Code
> correctness than former versions. This results in error messages while
> trying to compile the NutOS directly.
>
> Found issues in the sourcecode and fixes to make it run:
>
> - arch/unix/dev/ostimer.c
>    missing return at the end of function NutTimerEmulation - solution:
>    add
>     return(NULL);
>    at the end of this function
>
> - arch/unix/os/nutinit.c
>    another missing return at the end of function NutTimerEmulation -
>    solution:
>    again add
>     return(NULL);
>    at the end of this function
>
> - the missing return at some functions error also appears at some
>    example applications. Eg. with many THREAD definitions it is
>    necessary to add a - useless because actually never reached -
>    return value to the end of concerning functions.
>
> - error messages at different device drivers with unsupported direct
>    hardware access - quick and dirty solution:
>    remove the following files (line beginning with SRCS = )from the
>    makefile in the dev/ folder and prevent the compilation of the -
>    in this environment - useless drivers
>     twbbif.c npl.c nplmmc.c sbimmc.c
>
> 4) Compile the sources and install the libraries
>
>     cd lib
>     make
>     make install
>
> 5) Adaptations at the example applications
>
>    By default hex-files for usage with mikrocontroller hardware
>    are built. For Unix emulation this hardly makes sense so
>    change the target definition of the application Makefile
>    from .hex to .elf
>     TARG =  $(PROJ).elf
>
> 6) Run the application
>
>    The built application can directly be executed
>     ./application.elf
>    and should be debuggable this way more easily than with the
>    embedded hardware.
>
>
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>



More information about the En-Nut-Discussion mailing list