public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot.
@ 2003-04-30 10:50 QiangHuang
  2003-04-30 11:03 ` Andrew Lunn
  0 siblings, 1 reply; 8+ messages in thread
From: QiangHuang @ 2003-04-30 10:50 UTC (permalink / raw)
  To: nickg; +Cc: Ecos-Discuss

Thanks a lot. I just download the ecos repository via CVS,  I got the
cxxsupp.cxx file in the ecos repository. I am based on the Altera excalibur
platform. Any specify setting need to be done for the platform? when I try
to link my program with ecos library I still have the same problem.
while I try to build the test program I got the following error:

arm-elf-gcc -c  -I/ecos-e/epxa1_new_net/epxa1_new_net_install/include -I/eco
s-c/ecoscvs/ecos/packages/infra/current -I/ecos-c/ecoscvs/ecos/packages/infr
a/current/src -I/ecos-c/ecoscvs/ecos/packages/infra/current/tests -I. -I/eco
s-c/ecoscvs/ecos/packages/infra/current/tests/ -mcpu=arm9 -Wall -Wpointer-ar
ith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunct
ion-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-pr
iority -Wp,-MD,tests/cxxsupp.tmp -o tests/cxxsupp.o
/ecos-c/ecoscvs/ecos/packages/infra/current/tests/cxxsupp.cxx
/ecos-c/ecoscvs/ecos/packages/infra/current/tests/cxxsupp.cxx: In function
`void cyg_start ()':
/ecos-c/ecoscvs/ecos/packages/infra/current/tests/cxxsupp.cxx:71: warning:
can't inline call to `void Pure::inline_fun1 ()'
/ecos-c/ecoscvs/ecos/packages/infra/current/tests/cxxsupp.cxx:134: warning:
called from here
arm-elf-gcc --no-target-default-spec -Wl,-static -g -O2 -nostdlib -Wl,--fata
l-warnings -L/ecos-e/epxa1_new_net/epxa1_new_net_install/lib -Ttarget.ld -o
/ecos-e/epxa1_new_net/epxa1_new_net_install/tests/infra/current/tests/cxxsup
p tests/cxxsupp.o
/ecos-c/altera/EXCALI~1/SOPC_B~1/bin/ARM-GN~1/ARM9-0~1/bin/../lib/gcc-lib/ar
m-elf/2.96-arm9-020528/../../../../arm-elf/bin/ld: unrecognized option
`--fatal-warnings'
collect2: ld returned 1 exit status
make[1]: ***
[/ecos-e/epxa1_new_net/epxa1_new_net_install/tests/infra/current/tests/cxxsu
pp] Error 1
make[1]: Leaving directory
`/ecos-e/epxa1_new_net/epxa1_new_net_build/infra/current'
make: *** [tests] Error 2

when linking with user application:

 warning: no memory region specified for section `.eh_frame'
./arm-elf/bin/ld: section .eh_frame [0009967c -> 00099f03] overlaps section
.rodata [00094df0 -> 00116077]

BTW does this means the en_frame section is missing from being defined?
shoud I define it? maybe I am wrong.

Thanks a lot.

> Thank you very much for your help.
> Maybe I was not doing in the right way. The problem is I can use new to
> create a class object when building the eCOS library. but when linking
with
> my application I got the following error:
>
> warning: no memory  region specified for section `.eh_frame'
> section .eh_frame [00092508 -> 00092d8f] overlaps section .text
[00040040 ->
> 00093287].
>

Which platform are you using? and what version of eCos? I recently
checked in a lot of fixes for exactly this problem. Either you are
using an older version of eCos, or there was a bug in the change for
your platform. Does the infra package cxxsupp.cxx test program build
in your configuration?



-- 
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] 8+ messages in thread

* Re: [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot.
  2003-04-30 10:50 [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot QiangHuang
@ 2003-04-30 11:03 ` Andrew Lunn
  2003-04-30 11:15   ` QiangHuang
  2003-04-30 16:12   ` Nick Garnett
  0 siblings, 2 replies; 8+ messages in thread
From: Andrew Lunn @ 2003-04-30 11:03 UTC (permalink / raw)
  To: QiangHuang; +Cc: Ecos-Discuss

On Wed, Apr 30, 2003 at 11:43:11AM +0100, QiangHuang wrote:
> Thanks a lot. I just download the ecos repository via CVS,  I got the
> cxxsupp.cxx file in the ecos repository. I am based on the Altera excalibur
> platform. Any specify setting need to be done for the platform? when I try
> to link my program with ecos library I still have the same problem.
> while I try to build the test program I got the following error:
[..] 

> arm-elf-gcc --no-target-default-spec -Wl,-static -g -O2 -nostdlib -Wl,--fata
> l-warnings -L/ecos-e/epxa1_new_net/epxa1_new_net_install/lib -Ttarget.ld -o
> /ecos-e/epxa1_new_net/epxa1_new_net_install/tests/infra/current/tests/cxxsup
> p tests/cxxsupp.o
> /ecos-c/altera/EXCALI~1/SOPC_B~1/bin/ARM-GN~1/ARM9-0~1/bin/../lib/gcc-lib/ar
> m-elf/2.96-arm9-020528/../../../../arm-elf/bin/ld: unrecognized option
> `--fatal-warnings'
> collect2: ld returned 1 exit status
> make[1]: ***
> [/ecos-e/epxa1_new_net/epxa1_new_net_install/tests/infra/current/tests/cxxsu
> pp] Error 1
> make[1]: Leaving directory
> `/ecos-e/epxa1_new_net/epxa1_new_net_build/infra/current'
> make: *** [tests] Error 2
> 
> when linking with user application:
> 
>  warning: no memory region specified for section `.eh_frame'
> ./arm-elf/bin/ld: section .eh_frame [0009967c -> 00099f03] overlaps section
> .rodata [00094df0 -> 00116077]

What toolchain are you using?

/ecos-c/altera/EXCALI~1/SOPC_B~1/bin/ARM-GN~1/ARM9-0~1/bin/../lib/gcc-lib/ar
 m-elf/2.96-arm9-020528/../../../../arm-elf/bin/ld: unrecognized option

This suggests its not the recommended one. Get the upto date
toolchain. Look at http://sources.redhat.com/ecos/getstart.html.

           Andrew

-- 
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] 8+ messages in thread

* RE: [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot.
  2003-04-30 11:03 ` Andrew Lunn
@ 2003-04-30 11:15   ` QiangHuang
  2003-04-30 12:04     ` Andrew Lunn
  2003-04-30 18:24     ` [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot Nick Garnett
  2003-04-30 16:12   ` Nick Garnett
  1 sibling, 2 replies; 8+ messages in thread
From: QiangHuang @ 2003-04-30 11:15 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Ecos-Discuss

Thank you.
from the command I can see:
/c/altera/excalibur/sopc_builder/bin/arm-gnupro/arm9-020528/bin/../lib/gcc-l
ib/arm-elf/2.96-arm9-020528/../../../../arm-elf/bin/ld:
is this not the right one? (This is the toolchain shipped with the Altera
Excalibur board for ARM9)

BTW what is the eh_frame section used for? After saving the ecos
configuration I looked into the *.ldi file and found that eh_frame section
is not created by the macro define in arm.ld: #define
SECTION_eh_frame(_region_, _vma_, _lma_) .
here is the *.ldi file:

MEMORY
{
    ram : ORIGIN = 0, LENGTH = 0x2000000
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
    SECTION_rom_vectors (ram, 0x40000, LMA_EQ_VMA)
    SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}


Or is the eh_frame is a pre-defined section according to the compiler or
already included as subsection in any above section?
Thanks a lot.



-----Original Message-----
From: Andrew Lunn [mailto:andrew.lunn@ascom.ch]
Sent: 30 April 2003 11:50
To: QiangHuang
Cc: Ecos-Discuss
Subject: Re: [ECOS] Can I use the dynamic memory allocation on the class
object? Thanks a lot.


On Wed, Apr 30, 2003 at 11:43:11AM +0100, QiangHuang wrote:
> Thanks a lot. I just download the ecos repository via CVS,  I got the
> cxxsupp.cxx file in the ecos repository. I am based on the Altera
excalibur
> platform. Any specify setting need to be done for the platform? when I try
> to link my program with ecos library I still have the same problem.
> while I try to build the test program I got the following error:
[..]

>
arm-elf-gcc --no-target-default-spec -Wl,-static -g -O2 -nostdlib -Wl,--fata
>
l-warnings -L/ecos-e/epxa1_new_net/epxa1_new_net_install/lib -Ttarget.ld -o
>
/ecos-e/epxa1_new_net/epxa1_new_net_install/tests/infra/current/tests/cxxsup
> p tests/cxxsupp.o
>
/ecos-c/altera/EXCALI~1/SOPC_B~1/bin/ARM-GN~1/ARM9-0~1/bin/../lib/gcc-lib/ar
> m-elf/2.96-arm9-020528/../../../../arm-elf/bin/ld: unrecognized option
> `--fatal-warnings'
> collect2: ld returned 1 exit status
> make[1]: ***
>
[/ecos-e/epxa1_new_net/epxa1_new_net_install/tests/infra/current/tests/cxxsu
> pp] Error 1
> make[1]: Leaving directory
> `/ecos-e/epxa1_new_net/epxa1_new_net_build/infra/current'
> make: *** [tests] Error 2
>
> when linking with user application:
>
>  warning: no memory region specified for section `.eh_frame'
> ./arm-elf/bin/ld: section .eh_frame [0009967c -> 00099f03] overlaps
section
> .rodata [00094df0 -> 00116077]

What toolchain are you using?

/ecos-c/altera/EXCALI~1/SOPC_B~1/bin/ARM-GN~1/ARM9-0~1/bin/../lib/gcc-lib/ar
 m-elf/2.96-arm9-020528/../../../../arm-elf/bin/ld: unrecognized option

This suggests its not the recommended one. Get the upto date
toolchain. Look at http://sources.redhat.com/ecos/getstart.html.

           Andrew


-- 
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] 8+ messages in thread

* Re: [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot.
  2003-04-30 11:15   ` QiangHuang
@ 2003-04-30 12:04     ` Andrew Lunn
  2003-04-30 12:38       ` [ECOS] Mounting rootfs Rupesh S
  2003-04-30 18:24     ` [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot Nick Garnett
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Lunn @ 2003-04-30 12:04 UTC (permalink / raw)
  To: QiangHuang; +Cc: Ecos-Discuss

On Wed, Apr 30, 2003 at 12:08:26PM +0100, QiangHuang wrote:
> Thank you.
> from the command I can see:
> /c/altera/excalibur/sopc_builder/bin/arm-gnupro/arm9-020528/bin/../lib/gcc-l
> ib/arm-elf/2.96-arm9-020528/../../../../arm-elf/bin/ld:
> is this not the right one? (This is the toolchain shipped with the Altera
> Excalibur board for ARM9)

Compilers are not my specialty, but ecos2.0 has been tested using the
compilers that come with the ecos 2.0 distribution and not the Altera
compiler.
 
> BTW what is the eh_frame section used for?

No idea. 

>  After saving the ecos
> configuration I looked into the *.ldi file and found that eh_frame section
> is not created by the macro define in arm.ld: #define
> SECTION_eh_frame(_region_, _vma_, _lma_) .
> here is the *.ldi file:
 
Which probably means the recommended compiler does not need this section.

      Andrew

-- 
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] 8+ messages in thread

* [ECOS] Mounting rootfs
  2003-04-30 12:04     ` Andrew Lunn
@ 2003-04-30 12:38       ` Rupesh S
  2003-04-30 14:34         ` [ECOS] " Daniel Néri
  0 siblings, 1 reply; 8+ messages in thread
From: Rupesh S @ 2003-04-30 12:38 UTC (permalink / raw)
  To: Ecos-Discuss

Hi,

I don't know if this is the right place to post this querry,

I  have a specific doubt about  mounting rootfs at boot up of linux-sh.

I link my linux-sh kernel at address 0x8c100000,
Download the same to my RAM,
give a jump using Redboot to 0x8c200000,
The kernel boots up !!! but without any rootfs..

To add rootfs, I created an ext2 file in my Host machine, and downloaded the
same(binary) to RAM location at 0x8ca00000.

Using the kernel comand line parameters, I have specified the INITRD Address
as 0x8ca00000.and also the size,...and the root=/dev/ram0,,..

Still the kernel is not able to mount the rootfilesystem

please advice where I went wrong...

Note:
I work with MS7729SE01 board.
Bootloader I use is Redboot.
I don't intend to use PCMCIA on board.

Rupesh




-- 
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] 8+ messages in thread

* [ECOS] Re: Mounting rootfs
  2003-04-30 12:38       ` [ECOS] Mounting rootfs Rupesh S
@ 2003-04-30 14:34         ` Daniel Néri
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Néri @ 2003-04-30 14:34 UTC (permalink / raw)
  To: ecos-discuss

"Rupesh S" <rupeshs@myw.ltindia.com> writes:

> I don't know if this is the right place to post this querry,

Please, when you want to post a new question, do not simply reply to a
unrelated message; start a new thread instead.

Thank you.

Regards,
   --Daniel


-- 
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] 8+ messages in thread

* Re: [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot.
  2003-04-30 11:03 ` Andrew Lunn
  2003-04-30 11:15   ` QiangHuang
@ 2003-04-30 16:12   ` Nick Garnett
  1 sibling, 0 replies; 8+ messages in thread
From: Nick Garnett @ 2003-04-30 16:12 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: QiangHuang, Ecos-Discuss

Andrew Lunn <andrew.lunn@ascom.ch> writes:

> 
> /ecos-c/altera/EXCALI~1/SOPC_B~1/bin/ARM-GN~1/ARM9-0~1/bin/../lib/gcc-lib/ar
>  m-elf/2.96-arm9-020528/../../../../arm-elf/bin/ld: unrecognized option
> 
> This suggests its not the recommended one. Get the upto date
> toolchain. Look at http://sources.redhat.com/ecos/getstart.html.
> 

Yep. That's the problem, upgrade to to the GCC 3.2.1 toolchain from
that link. I've just built the excalibur_arm9 target from anoncvs with
that toolchain, and it builds just fine.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
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] 8+ messages in thread

* Re: [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot.
  2003-04-30 11:15   ` QiangHuang
  2003-04-30 12:04     ` Andrew Lunn
@ 2003-04-30 18:24     ` Nick Garnett
  1 sibling, 0 replies; 8+ messages in thread
From: Nick Garnett @ 2003-04-30 18:24 UTC (permalink / raw)
  To: QiangHuang; +Cc: Andrew Lunn, Ecos-Discuss

"QiangHuang" <jameshq@liverpool.ac.uk> writes:

> Thank you.
> from the command I can see:
> /c/altera/excalibur/sopc_builder/bin/arm-gnupro/arm9-020528/bin/../lib/gcc-l
> ib/arm-elf/2.96-arm9-020528/../../../../arm-elf/bin/ld:
> is this not the right one? (This is the toolchain shipped with the Altera
> Excalibur board for ARM9)

It is probably the right one for the tools and libraries shipped with
the board. But 2.96 is now very old. For eCos we have moved on to a
3.2.1 based GCC. There are a number of significant changes between
the compilers such that it is very difficult to accomodate both at the
same time -- especially in toolchain-specific things like linker
scripts.


> 
> BTW what is the eh_frame section used for?

It is part of the compiler's C++ exception handling mechanism.

> 
> Or is the eh_frame is a pre-defined section according to the compiler or
> already included as subsection in any above section?
> Thanks a lot.
>

What actually happens is that the .eh_frame section gets garbage
collected out of the final link since there are no references to
it. This was not the case with the 2.96 compiler.


-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
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] 8+ messages in thread

end of thread, other threads:[~2003-04-30 17:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-30 10:50 [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot QiangHuang
2003-04-30 11:03 ` Andrew Lunn
2003-04-30 11:15   ` QiangHuang
2003-04-30 12:04     ` Andrew Lunn
2003-04-30 12:38       ` [ECOS] Mounting rootfs Rupesh S
2003-04-30 14:34         ` [ECOS] " Daniel Néri
2003-04-30 18:24     ` [ECOS] Can I use the dynamic memory allocation on the class object? Thanks a lot Nick Garnett
2003-04-30 16:12   ` Nick Garnett

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).