public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] i386 problem
@ 2002-05-02  9:04 Roland Caßebohm
  2002-05-14 14:22 ` Jonathan Larmour
  0 siblings, 1 reply; 11+ messages in thread
From: Roland Caßebohm @ 2002-05-02  9:04 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I tried till long ago running an eCos application on the PC target again. 
Everything was working fine, but the application won't run :-(.

- Redboot is starting from floppy.
- gdb connects via net and via serial line.
- The application is builded for startup type RAM

$ ecosconfig new pc
$ ecosconfig tree
$ make
$ cd ex
$ i386-elf-gcc -c -o hello.o -g -Wall -I../install/include 
-ffunction-sections -fdata-sections hello.c
$ i386-elf-gcc -nostartfiles -L../install/lib -Wl,--gc-sections -o hello 
hello.o -Ttarget.ld -nostdlib

- loading the application works
target remote 192.168.1.155:9000
load
b main
c

-->

nothing is happen!

I have set a breakpoint at "hal_platform_init".
I can step till:

    // ISR table setup: plant the default ISR in all interrupt handlers
    // and the default interrupt VSR in the equivalent VSR table slots.
    for (vector = CYGNUM_HAL_ISR_MIN; vector <= CYGNUM_HAL_ISR_MAX; vector++)
    {
        cyg_uint32 index;
        HAL_TRANSLATE_VECTOR( vector, index );
here >> hal_interrupt_handlers[index] = (CYG_ADDRESS) HAL_DEFAULT_ISR;
        HAL_VSR_SET( vector, &__default_interrupt_vsr, NULL );
    }

but after vector is 70, the application stops at this line.

(the same over serial line)

Does anybody know what's going wrong?

Roland

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

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [ECOS] RE: eCos Loader
@ 2005-04-27  0:21 David Bonfrer
  2005-04-27  0:33 ` [ECOS] i386 problem Gonçalo Antunes
  0 siblings, 1 reply; 11+ messages in thread
From: David Bonfrer @ 2005-04-27  0:21 UTC (permalink / raw)
  To: 'Anthony Tonizzo', ecos-discuss

Hi,

I'm using ELF executable and shared libs.

I know that *diag_printf points to the function diag_printf.

The question is: How do I get this in general?

I don't want to fill my own tables with:

If ("printf"){location = *printf}
If ("scanf") {location = *scanf}
Etc. Can I get a symbol table from eCos for these functionsymbols?

Thanks.

P.S. Anthony, I am in a starting stage for this loader. 

I'm not ready to put it here because it's not finished and it's not very
readable source code yet. 

-----Original Message-----
From: Anthony Tonizzo [mailto:atonizzo@lycos.com] 
Sent: dinsdag 26 april 2005 22:45
To: ecos@bonfrer.com
Subject: eCos Loader

Hi:

I am working on an ecos loader too.

Following some conversations with Nick Garnett on the subject,
I wanted to create an interface that was more similar to Linux
insmod() that to a shared library. In this case, your module
gets compiled with a simple 

gcc -c hello.c

and then the loader must act as linker, and resolve relocation
and references.

I am still involved in the project, but I disagree with DeRocco:
Inventing your own linker format is a bad idea. Because you now
have to use special linkers to compile your module, or worse you
have to write one. eCos libraries are ELF modules, and so should
the libraries.

As far as resolving external symbols, the only valid approach is
a table of this type:

struct
{
    char*   symbol_name;
    void (*fp)(void);
} symbol;

symbol symbol_table[] = { { "diag_printf", diag_printf }, ...

which you can then fill up with the values of the functions you need.
Since this table would be in memory all the time, you can selectively
eliminate the functions you do not need via a CDL option or some
other form of compile time option (for example, you only have
pointers for kernel and semaphores, and nothing else). This should
help in getting a handle on an otherwise huge table.

In my application, I do not need to call external functions, but I
definitely need relocation and symbol resolution. How far away is your
code from prime time? Can I take a look at it to see if I can use it
(and act as a beta tester in the process)?

I am sorry if I replied to you personally, but the ecoscentric reflector
does not seem to like my posting when I am behind my company's
firewall.

Regards
Tony
-- 
_______________________________________________
NEW! Lycos Dating Search. The only place to search multiple dating sites at
once.
http://datingsearch.lycos.com



-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.3 - Release Date: 25-4-2005



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-05-03 20:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-02  9:04 [ECOS] i386 problem Roland Caßebohm
2002-05-14 14:22 ` Jonathan Larmour
2005-04-27  0:21 [ECOS] RE: eCos Loader David Bonfrer
2005-04-27  0:33 ` [ECOS] i386 problem Gonçalo Antunes
2005-04-27  6:05   ` Andrew Lunn
2005-04-30  9:57     ` Gonçalo Antunes
     [not found]       ` <20050430171810.GA6601@lunn.ch>
2005-05-02 16:12         ` Gonçalo Antunes
2005-05-02 16:30           ` Andrew Lunn
2005-05-02 16:35             ` Gonçalo Antunes
2005-05-03 10:14       ` Nick Garnett
2005-05-03 10:37         ` Gonçalo Antunes
2005-05-03 20:30         ` Bart Veer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).