[ECOS] ecos-3.0 in linux target segfault

Daniel Widyanto daniel.widyanto@yahoo.com
Wed Feb 3 07:12:00 GMT 2010


Hi all,

I have just downloaded ecos-3.0 using ecos-install.tcl. I want to evaluate ecos in my PC, before committing effort to run it in LPC17xx (ARM Cortex-M3 platform).

I use Ubuntu 9.10, and have managed to recompile the ecosconfig using libstdc++6 (since the supplied ecosconfig can only run with libstdc++5, which is not available in Ubuntu 9.10).

I use these commands to create ecos kernel for linux target:
--------------------------------------------
bash# ecosconfig --prefix=$HOME/projects/x86_ecos/kernel new linux
bash# ecosconfig --prefix=$HOME/projects/x86_ecos/kernel tree
bash# make
--------------------------------------------

The ecos kernel was compiled and installed normally. Then I try to compile the hello world
--------------------------------------------
bash# vi hello.c
#include <stdio.h>
int main(void)
{
 printf("Hello, eCos world!\n");
 return 0;
}
:qw

bash# gcc -g -I$HOME/projects/x86_ecos/kernel/include hello.c \
-L$HOME/projects/x86_ecos/kernel/lib -Ttarget.ld -nostdlib
--------------------------------------------

It also compiled correctly. But when I run the code example, I got SIGSEGV (segmentation fault):
--------------------------------------------
bash# gdb -nw a.out 
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/nxp/projects/x86_ecos/app/hello/a.out...done.
(gdb) run
Starting program: /home/nxp/projects/x86_ecos/app/hello/a.out 

Program received signal SIGSEGV, Segmentation fault.
synth_hardware_init () at /home/nxp/projects/x86_ecos/ecos-3.0/packages/hal/synth/arch/v3_0/src/synth_intr.c:1235
1235	{
(gdb) 
--------------------------------------------

Is there anything that I can do to fix this one ?

Thank you for your help

Regards,
-daniel




      

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list