public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] the freebsd stack influence the program"hello world"?
@ 2008-03-17 18:25 venice
  2008-03-17 19:00 ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: venice @ 2008-03-17 18:25 UTC (permalink / raw)
  To: ecos-discuss

Hi, my board is sam7x256ek; I take the redboot off and when I build the 
program "hello world" without any network configuration it gets the right 
result.
        the hello.c :
#include <stdio.h>

int main(void)
{
  printf("Hello, eCos world!\n");
  return 0;
}

     But if I joined the three packages "Common ethernet support." "FreeBSD 
Stack." and "Networking." I get the following messages:

arm-elf-gcc -I/d/ecos/project/sam7x/system/at91sam7x256_sys_network_01_install/include 
hello.c -L/d/ecos/project/sam7x/system/at91sam7x256_sys_network_01_install/lib 
 -Ttarget.ld -nostdlib
/ecos-d/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld: 
address 0x143f64 of a.out section .text is not within region rom
/ecos-d/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld: 
address 0x143f64 of a.out section .fini is not within region rom
/ecos-d/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld: 
address 0x14630c of a.out section .rodata is not within region rom
/ecos-d/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld: 
address 0x14630c of a.out section .rodata1 is not within region rom
/ecos-d/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld: 
address 0x14630c of a.out section .fixup is not within region rom
/ecos-d/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld: 
address 0x14630c of a.out section .gcc_except_table is not within region rom
/ecos-d/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld: 
address 0x24dfb8 of a.out section .bss is not within region ram
collect2: ld returned 1 exit status


    The flash address ranges from 0x10000 to 0x14000; but I cannot 
understand the same program which has nothing to do with the network 
interface but get the different results!
    So is there anything wrong? thanks!


Regards,
Venice 


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

* Re: [ECOS] the freebsd stack influence the program"hello world"?
  2008-03-17 18:25 [ECOS] the freebsd stack influence the program"hello world"? venice
@ 2008-03-17 19:00 ` Andrew Lunn
       [not found]   ` <BLU108-DS2C0A2C51EC2E9FF09215F9E060@phx.gbl>
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2008-03-17 19:00 UTC (permalink / raw)
  To: venice; +Cc: ecos-discuss

On Mon, Mar 17, 2008 at 02:32:59PM +0800, venice wrote:
> Hi, my board is sam7x256ek; I take the redboot off and when I build the  
> program "hello world" without any network configuration it gets the right 
> result.
>        the hello.c :
> #include <stdio.h>
>
> int main(void)
> {
>  printf("Hello, eCos world!\n");
>  return 0;
> }
>
>     But if I joined the three packages "Common ethernet support." 
> "FreeBSD Stack." and "Networking." I get the following messages:
>
> arm-elf-gcc 
> -I/d/ecos/project/sam7x/system/at91sam7x256_sys_network_01_install/include 
> hello.c 
> -L/d/ecos/project/sam7x/system/at91sam7x256_sys_network_01_install/lib  
> -Ttarget.ld -nostdlib
 
> /ecos-d/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld: 
> address 0x143f64 of a.out section .text is not within region rom

The FreeBSD network stack is big, too big to fit in 256Kbytes of ROM.

Try the lwip stack.

    Andrew

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

* Re: [ECOS] the freebsd stack influence the program"hello world"?
       [not found]   ` <BLU108-DS2C0A2C51EC2E9FF09215F9E060@phx.gbl>
@ 2008-03-18  9:09     ` Andrew Lunn
  2008-03-18 15:10       ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2008-03-18  9:09 UTC (permalink / raw)
  To: venice; +Cc: eCos Disuss

>>    Now I'm using the lwip, but there are still some problems:
>    I replaced the freebsd stack with lwip stack (joined the "lwip" 
> package together with the packages "Common ethernet support." and 
> "Networking." ), but I get messages like that:

The correct way to do this should be:

ecosconfig new at91sam7xek lwip_eth

However, the resulting tree then fails to build. There was a fix to
realloc a while ago which changed a memcpy to a memmove and how there
are undefined symbols. I need to look at this and work out why.

    Andrew

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

* Re: [ECOS] the freebsd stack influence the program"hello world"?
  2008-03-18  9:09     ` Andrew Lunn
@ 2008-03-18 15:10       ` Andrew Lunn
       [not found]         ` <BLU108-DS15E30B412D3BEE9DD82CD9E070@phx.gbl>
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2008-03-18 15:10 UTC (permalink / raw)
  To: venice, eCos Disuss

> The correct way to do this should be:
> 
> ecosconfig new at91sam7xek lwip_eth
> 
> However, the resulting tree then fails to build. There was a fix to
> realloc a while ago which changed a memcpy to a memmove and how there
> are undefined symbols. I need to look at this and work out why.

ecosconfig new at91sam7xek lwip_eth
ecosconfig add libc_string
ecosconfig tree

should work.

       Andrew

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

* Re: [ECOS] the freebsd stack influence the program"hello world"?
       [not found]         ` <BLU108-DS15E30B412D3BEE9DD82CD9E070@phx.gbl>
@ 2008-03-19  9:56           ` Andrew Lunn
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2008-03-19  9:56 UTC (permalink / raw)
  To: venice; +Cc: eCos Disuss

On Wed, Mar 19, 2008 at 04:34:46PM +0800, venice wrote:
>
>
> --------------------------------------------------
> From: "Andrew Lunn" <andrew@lunn.ch>
> Sent: Tuesday, March 18, 2008 5:09 PM
> To: "venice" <venice.tu@live.com>; "eCos Disuss"  
> <ecos-discuss@ecos.sourceware.org>
> Subject: Re: [ECOS] the freebsd stack influence the program"hello world"?
>
>>> The correct way to do this should be:
>>>
>>> ecosconfig new at91sam7xek lwip_eth
>>>
>>> However, the resulting tree then fails to build. There was a fix to
>>> realloc a while ago which changed a memcpy to a memmove and how there
>>> are undefined symbols. I need to look at this and work out why.
>>
>> ecosconfig new at91sam7xek lwip_eth
>> ecosconfig add libc_string
>> ecosconfig tree
>>
>> should work.
>>
>>       Andrew
>>
>
>
>
> Actually the building packages include packages begin with "ISO ..."  , 
> so the libc_string package is ready in the building packages and the 
> conflicts are just the same as before.

I suspect you forgot to rm -fr before running the commands i
suggested:

lunn@londo:~/eCos/work$ ecosconfig new at91sam7xek lwip_eth
U CYGHWR_HAL_ARM_AT91, new inferred value AT91SAM7S
U CYGHWR_HAL_ARM_AT91_FIQ, new inferred value 1
U CYGHWR_HAL_ARM_AT91SAM7, new inferred value at91sam7x256
U CYGHWR_DEVS_ETH_PHY_DM9161A, new inferred value 1
lunn@londo:~/eCos/work$ ecosconfig add libc_string
U CYGFUN_LIBC_STRING_BSD_FUNCS, new inferred value 0
U CYGBLD_ISO_STRTOK_R_HEADER, new inferred value <cyg/libc/string/string.h>
U CYGBLD_ISO_STRING_BSD_FUNCS_HEADER, new inferred value <cyg/libc/string/bsdstring.h>
U CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER, new inferred value <cyg/libc/string/string.h>
U CYGBLD_ISO_STRING_MEMFUNCS_HEADER, new inferred value <cyg/libc/string/string.h>
U CYGBLD_ISO_STRING_STRFUNCS_HEADER, new inferred value <cyg/libc/string/string.h>
lunn@londo:~/eCos/work$ ecosconfig tree
lunn@londo:~/eCos/work$ make -s
headers finished
build finished

As for RAM requirements, i don't know. However the Ethernet device
driver was written for the AT91SAM7X256 and the guy who wrote it used
the LWIP stack. So for his application there was sufficient RAM.  So
all i can really say is that it can work.

    Andrew

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

end of thread, other threads:[~2008-03-19  9:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-17 18:25 [ECOS] the freebsd stack influence the program"hello world"? venice
2008-03-17 19:00 ` Andrew Lunn
     [not found]   ` <BLU108-DS2C0A2C51EC2E9FF09215F9E060@phx.gbl>
2008-03-18  9:09     ` Andrew Lunn
2008-03-18 15:10       ` Andrew Lunn
     [not found]         ` <BLU108-DS15E30B412D3BEE9DD82CD9E070@phx.gbl>
2008-03-19  9:56           ` Andrew Lunn

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