This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error ina dding a packeg: only .h visible!


Thnaks, now rollback.c and rollback.h are both in the "source file list"!
Anyway I still have a problema with ddd: when I launch it I get the following error message:

(gdb) tar extended-remote localhost:2222
Remote debugging using localhost:2222
0x00000000 in ?? () at d:/cygwin/opt/ecos-gaisler/ecos-rep/packages/language/c/libc/stdio/current/src/common/ungetc.cxx:70
/opt/ecos-gaisler/ecos-rep/packages/language/c/libc/stdio/current/src/common/ungetc.cxx:70:2695:beg:0x0
(gdb) No source file named d.


I can anyway link to my target and download the program. Anyway f =I try openign a source I get the following errors: (exampls for sched.cxx and rollback.c):

Line 1 of "d:/cygwin/opt/ecos-gaisler/ecos-rep/packages/kernel/current/src/sched/sched.cxx" is at address 0x4002041c <_Z41__static_initialization_and_destruction_0ii+4> but contains no code.
/opt/ecos-gaisler/ecos-rep/packages/kernel/current/src/sched/sched.cxx:1:0:beg:0x4002041c
(gdb) No source file named d.
(gdb) list rollback.c:1
Line number 1 is out of range for "d:/cygwin/opt/ecos-gaisler/ecos-rep/packages/tima_ft/current/src/rollback.c".
(gdb) No source file named d.
(gdb)


Any Idea of the reason?
Thanks,

Michele

Gary Thomas wrote:
Michele Portolan wrote:
I try once more because I am really stuck and my deadline is....tomorrow!!!!
I still cannot use the functions I added in a new package: I will try to be as clear as possible:
-- when building eCos my .c file is compiled
-- when I compile e progrma linking on ecos libraries everything is fine too (I can call my functions)
-- when executing I get error


If I debug with DDD I notice that the function defined in my packages are empty! Looking up the souirce list I can find the .h, but not the .c!! I think that is the problem, I charge only the prototype and not the real functions...But where I am wrong? The file is compiled? Maybe something amiss in the cdl file?

Please someone help me, I cannto really go any further by myself!!!

Michele

Ps: here is the cdl file for my package:

cdl_package CYGPKG_TIMA_FT {
    display    "Tima funtionalities"
    description "   Blah blah blah 1"
# ====================================================================
# OPTIONS


cdl_component CYGPKG_TIMA_FT {
display "Blah blah 2"
flavor bool
compile rollback.c intr_rollback.S
default_value 1
requires CYGPKG_LIBC_SETJMP
description " Blah blah blah 2.1"
cdl_option CYGPKG_TIMA_FT_TRACE {
display "Enables Trace assertions"
default_value 0
description "
Blah blah 3"
}


}
}

And here how I call it up from ecos.db

package CYGPKG_TIMA_FT {
   alias         { "blah blah 0" tima_ft rollback }
   directory    tima_ft
   script        tima_ft.cdl
       description  "Blah blah 0.1"
}



Are your functions ending up in the final eCos application? Do you have an applications that calls [at least one] directly? If not, the linker may be throwing them out.

Try changing your "compile" directive to look like this:

compile -library=libextras.a rollback.c intr_rollback.S

Then

  ecosconfig tree
  make clean; make

Query: what's up with the "intr_rollback.S" file?  eCos is designed
such that it's *very* rare to ever need to write anything in assembly.




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]