public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Huge memory footprint for a simple "hello world"
@ 2006-06-06 12:03 Socrates Socrates
  2006-06-06 13:38 ` Andrew Lunn
  0 siblings, 1 reply; 26+ messages in thread
From: Socrates Socrates @ 2006-06-06 12:03 UTC (permalink / raw)
  To: ecos-discuss

Hi All

AIM:
I am using the EB40 board and I am trying to test a simple "hellow
world" application.

Problem:
The memory footprint of the application is too big to fit into the
available RAM. The failure happens during uploading of the
application.

Here's more information of my steps:

1. I used "ecoconfig EB40" to setup and build redboot for the EB40 board.
2. I used "arm-elf-gdb redboot.elf" , tar rdi /dev/ttyS0, set
$cpsr=0xd3, load, cont, Crtl Z, minicom
3. RedBoot> load -b -m xmodem -b 0x02033428             # My notes:
0x02033428 is the lower range of the available RAM as reported by
'version' command on RedBoot
4. I comppile and link my test app
/opt/ecos/gnutools/arm-elf/bin/arm-elf-gcc -c -o test.o -Wall
-I/home/socrates/work/atmel/020606-ARM/install/include test.c
/opt/ecos/gnutools/arm-elf/bin/arm-elf-ld -nostartfiles -nostdlibs
-L/opt/ecos/gnutools/arm-elf/arm-elf/lib
-L/opt/ecos/gnutools/arm-elf/lib/gcc-lib/arm-elf/3.2.1/ -o test test.o
-T/home/socrates/work/atmel/020606-ARM/install/lib/target.ld

socrates@would:~/work/atmel$ ls -l test*
-rwxr-xr-x  1 socrates  socrates  322442 Jun  6 12:06 test
-rw-r--r--  1 socrates  socrates     138 Jun  6 11:35 test.c
-rw-r--r--  1 socrates  socrates     880 Jun  6 12:06 test.o

Here's is my test.c file:
*************************************************************************
#include <cyg/infra/diag.h>

char *RedBoot_version = "aslkjdahlsdfjk";

int main(void)
{
   diag_printf("HELLO WORLD\n");
   return 0;
}
**************************************************************************


I'd really appreciate your help.

Oh, I am very very new to EB40 or ecos for that matter.



Kind regards;

Socrates

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

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-06 12:03 [ECOS] Huge memory footprint for a simple "hello world" Socrates Socrates
@ 2006-06-06 13:38 ` Andrew Lunn
  2006-06-06 13:58   ` Socrates Socrates
  0 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2006-06-06 13:38 UTC (permalink / raw)
  To: Socrates Socrates; +Cc: ecos-discuss

On Tue, Jun 06, 2006 at 02:03:05PM +0200, Socrates Socrates wrote:
> Hi All
> 
> AIM:
> I am using the EB40 board and I am trying to test a simple "hellow
> world" application.
> 
> Problem:
> The memory footprint of the application is too big to fit into the
> available RAM. The failure happens during uploading of the
> application.
> 
> Here's more information of my steps:
> 
> 1. I used "ecoconfig EB40" to setup and build redboot for the EB40 board.
> 2. I used "arm-elf-gdb redboot.elf" , tar rdi /dev/ttyS0, set
> $cpsr=0xd3, load, cont, Crtl Z, minicom
> 3. RedBoot> load -b -m xmodem -b 0x02033428             # My notes:
> 0x02033428 is the lower range of the available RAM as reported by
> 'version' command on RedBoot
> 4. I comppile and link my test app
> /opt/ecos/gnutools/arm-elf/bin/arm-elf-gcc -c -o test.o -Wall
> -I/home/socrates/work/atmel/020606-ARM/install/include test.c
> /opt/ecos/gnutools/arm-elf/bin/arm-elf-ld -nostartfiles -nostdlibs
> -L/opt/ecos/gnutools/arm-elf/arm-elf/lib
> -L/opt/ecos/gnutools/arm-elf/lib/gcc-lib/arm-elf/3.2.1/ -o test test.o
> -T/home/socrates/work/atmel/020606-ARM/install/lib/target.ld
> 
> socrates@would:~/work/atmel$ ls -l test*
> -rwxr-xr-x  1 socrates  socrates  322442 Jun  6 12:06 test
> -rw-r--r--  1 socrates  socrates     138 Jun  6 11:35 test.c
> -rw-r--r--  1 socrates  socrates     880 Jun  6 12:06 test.o
> 
> Here's is my test.c file:
> *************************************************************************
> #include <cyg/infra/diag.h>
> 
> char *RedBoot_version = "aslkjdahlsdfjk";
> 
> int main(void)
> {
>   diag_printf("HELLO WORLD\n");
>   return 0;
> }
> **************************************************************************
> 
> 
> I'd really appreciate your help.
> 
> Oh, I am very very new to EB40 or ecos for that matter.

And also probably very new to embedded systems and how compilers work.
This is a FAQ. Read the documentation about arm-elf-size and what an
ELF file is. The test executable contains all the debugging
information and lots of other things which are not used on the target.
gdb knows this and will download just what is needed. 

Also, don't use -b 0x... eCos is not position independent. The image
has to go where the image expects to go.

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

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-06 13:38 ` Andrew Lunn
@ 2006-06-06 13:58   ` Socrates Socrates
  2006-06-06 14:05     ` Andrew Lunn
  0 siblings, 1 reply; 26+ messages in thread
From: Socrates Socrates @ 2006-06-06 13:58 UTC (permalink / raw)
  To: Socrates Socrates, ecos-discuss

Thanks Andrew,

Certainly I am new to embedded systems indeed.  I now run:
/arm-elf-ld -nostartfiles  -nodefaultlibs  -nostdlib -s  -static
-L/opt/ecos/gnutools/arm-elf/arm-elf/lib
-L/opt/ecos/gnutools/arm-elf/lib/gcc-lib/arm-elf/3.2.1/ -o test test.o
-Ttarget.ld

So the size is now down to (~91k):
-rwxr-xr-x  1 socrates socrates 91364 Jun  6 14:07 test

which I think is still big in my opinion.

-b option: The upload always fails until I use the -r option which
forces me to use the -b option.
How do I go about getting a succesful upload without using the -r and
hence -b option?

Thanks once again.

Regards;
Soc
On 6/6/06, Andrew Lunn <andrew@lunn.ch> wrote:
> On Tue, Jun 06, 2006 at 02:03:05PM +0200, Socrates Socrates wrote:
> > Hi All
> >
> > AIM:
> > I am using the EB40 board and I am trying to test a simple "hellow
> > world" application.
> >
> > Problem:
> > The memory footprint of the application is too big to fit into the
> > available RAM. The failure happens during uploading of the
> > application.
> >
> > Here's more information of my steps:
> >
> > 1. I used "ecoconfig EB40" to setup and build redboot for the EB40 board.
> > 2. I used "arm-elf-gdb redboot.elf" , tar rdi /dev/ttyS0, set
> > $cpsr=0xd3, load, cont, Crtl Z, minicom
> > 3. RedBoot> load -b -m xmodem -b 0x02033428             # My notes:
> > 0x02033428 is the lower range of the available RAM as reported by
> > 'version' command on RedBoot
> > 4. I comppile and link my test app
> > /opt/ecos/gnutools/arm-elf/bin/arm-elf-gcc -c -o test.o -Wall
> > -I/home/socrates/work/atmel/020606-ARM/install/include test.c
> > /opt/ecos/gnutools/arm-elf/bin/arm-elf-ld -nostartfiles -nostdlibs
> > -L/opt/ecos/gnutools/arm-elf/arm-elf/lib
> > -L/opt/ecos/gnutools/arm-elf/lib/gcc-lib/arm-elf/3.2.1/ -o test test.o
> > -T/home/socrates/work/atmel/020606-ARM/install/lib/target.ld
> >
> > socrates@would:~/work/atmel$ ls -l test*
> > -rwxr-xr-x  1 socrates  socrates  322442 Jun  6 12:06 test
> > -rw-r--r--  1 socrates  socrates     138 Jun  6 11:35 test.c
> > -rw-r--r--  1 socrates  socrates     880 Jun  6 12:06 test.o
> >
> > Here's is my test.c file:
> > *************************************************************************
> > #include <cyg/infra/diag.h>
> >
> > char *RedBoot_version = "aslkjdahlsdfjk";
> >
> > int main(void)
> > {
> >   diag_printf("HELLO WORLD\n");
> >   return 0;
> > }
> > **************************************************************************
> >
> >
> > I'd really appreciate your help.
> >
> > Oh, I am very very new to EB40 or ecos for that matter.
>
> And also probably very new to embedded systems and how compilers work.
> This is a FAQ. Read the documentation about arm-elf-size and what an
> ELF file is. The test executable contains all the debugging
> information and lots of other things which are not used on the target.
> gdb knows this and will download just what is needed.
>
> Also, don't use -b 0x... eCos is not position independent. The image
> has to go where the image expects to go.
>
>     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] 26+ messages in thread

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-06 13:58   ` Socrates Socrates
@ 2006-06-06 14:05     ` Andrew Lunn
  2006-06-06 14:19       ` Socrates Socrates
  0 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2006-06-06 14:05 UTC (permalink / raw)
  To: Socrates Socrates; +Cc: ecos-discuss

On Tue, Jun 06, 2006 at 03:57:26PM +0200, Socrates Socrates wrote:
> Thanks Andrew,
> 
> Certainly I am new to embedded systems indeed.  I now run:
> /arm-elf-ld -nostartfiles  -nodefaultlibs  -nostdlib -s  -static
> -L/opt/ecos/gnutools/arm-elf/arm-elf/lib
> -L/opt/ecos/gnutools/arm-elf/lib/gcc-lib/arm-elf/3.2.1/ -o test test.o
> -Ttarget.ld
> 
> So the size is now down to (~91k):
> -rwxr-xr-x  1 socrates socrates 91364 Jun  6 14:07 test
> 
> which I think is still big in my opinion.

and what does arm-elf-size say?

> -b option: The upload always fails until I use the -r option which
> forces me to use the -b option.

> How do I go about getting a succesful upload without using the -r and
> hence -b option?

If you upload the elf file you don't want -r otherwise the raw elf
file will be loaded as is. Redboot knows how to process an elf to
extract the executable code and data.

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

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-06 14:05     ` Andrew Lunn
@ 2006-06-06 14:19       ` Socrates Socrates
  2006-06-06 14:54         ` Andrew Lunn
  0 siblings, 1 reply; 26+ messages in thread
From: Socrates Socrates @ 2006-06-06 14:19 UTC (permalink / raw)
  To: Socrates Socrates, ecos-discuss

~/work/atmel$ arm-elf-size test
   text    data     bss     dec     hex filename
  55855     968   25680   82503   14247 test

I noticed -r was the raw "mode" and just did not know any better.

And one more thing, since I did not edit/change the target.ld (created
by ecosconfig), I suppose will need to change it as well?

I am much appreciating your help Andrew.

Thanks.

On 6/6/06, Andrew Lunn <andrew@lunn.ch> wrote:
> On Tue, Jun 06, 2006 at 03:57:26PM +0200, Socrates Socrates wrote:
> > Thanks Andrew,
> >
> > Certainly I am new to embedded systems indeed.  I now run:
> > /arm-elf-ld -nostartfiles  -nodefaultlibs  -nostdlib -s  -static
> > -L/opt/ecos/gnutools/arm-elf/arm-elf/lib
> > -L/opt/ecos/gnutools/arm-elf/lib/gcc-lib/arm-elf/3.2.1/ -o test test.o
> > -Ttarget.ld
> >
> > So the size is now down to (~91k):
> > -rwxr-xr-x  1 socrates socrates 91364 Jun  6 14:07 test
> >
> > which I think is still big in my opinion.
>
> and what does arm-elf-size say?
>
> > -b option: The upload always fails until I use the -r option which
> > forces me to use the -b option.
>
> > How do I go about getting a succesful upload without using the -r and
> > hence -b option?
>
> If you upload the elf file you don't want -r otherwise the raw elf
> file will be loaded as is. Redboot knows how to process an elf to
> extract the executable code and data.
>
>         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] 26+ messages in thread

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-06 14:19       ` Socrates Socrates
@ 2006-06-06 14:54         ` Andrew Lunn
  2006-06-07  8:50           ` Socrates Socrates
  0 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2006-06-06 14:54 UTC (permalink / raw)
  To: Socrates Socrates; +Cc: ecos-discuss

On Tue, Jun 06, 2006 at 04:16:27PM +0200, Socrates Socrates wrote:
> ~/work/atmel$ arm-elf-size test
>   text    data     bss     dec     hex filename
>  55855     968   25680   82503   14247 test

This seems a little big. Which template are you using? This is an
eb55?  I just build the default configuration. This is the size for
some of the kernel tests:

:~/eCos/work$ arm-elf-size install/tests/kernel/current/tests/*
   text    data     bss     dec     hex filename
  27592     848   17004   45444    b184 install/tests/kernel/current/tests/bin_sem0
  29188     856   22152   52196    cbe4 install/tests/kernel/current/tests/bin_sem1
  29540     868   55644   86052   15024 install/tests/kernel/current/tests/bin_sem2
  29592     856   22132   52580    cd64 install/tests/kernel/current/tests/bin_sem3
  31476     844   16996   49316    c0a4 install/tests/kernel/current/tests/clock0
  27836     848   19576   48260    bc84 install/tests/kernel/current/tests/clock1
  40944    1316   19568   61828    f184 install/tests/kernel/current/tests/clockcnv

> And one more thing, since I did not edit/change the target.ld (created
> by ecosconfig), I suppose will need to change it as well?

Normally no. The RAM startup address map should work correctly with a
ROM redboot.

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

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-06 14:54         ` Andrew Lunn
@ 2006-06-07  8:50           ` Socrates Socrates
  2006-06-07  8:58             ` Andrew Lunn
  0 siblings, 1 reply; 26+ messages in thread
From: Socrates Socrates @ 2006-06-07  8:50 UTC (permalink / raw)
  To: Socrates Socrates, ecos-discuss

Hi Andrew,

The templete is redboot;

From redboot_RAM.ecm

cdl_configuration eCos {
    description "" ;
    hardware    at91 ;
    template    redboot ;
    package -hardware CYGPKG_HAL_ARM v2_0 ;
    package -hardware CYGPKG_HAL_ARM_AT91 v2_0 ;
    package -hardware CYGPKG_DEVS_FLASH_AT91 v2_0 ;
    package -template CYGPKG_HAL v2_0 ;
    package -template CYGPKG_INFRA v2_0 ;
    package -template CYGPKG_REDBOOT v2_0 ;
    package CYGPKG_IO_FLASH v2_0 ;
};

Surprisingly my install directory (from my work space) is different from yours:
~/work/atmel/060606$ ls install/
bin  include  lib

Thanks, sorry for all the trouble.


Regards;
Soc.

On 6/6/06, Andrew Lunn <andrew@lunn.ch> wrote:
> On Tue, Jun 06, 2006 at 04:16:27PM +0200, Socrates Socrates wrote:
> > ~/work/atmel$ arm-elf-size test
> >   text    data     bss     dec     hex filename
> >  55855     968   25680   82503   14247 test
>
> This seems a little big. Which template are you using? This is an
> eb55?  I just build the default configuration. This is the size for
> some of the kernel tests:
>
> :~/eCos/work$ arm-elf-size install/tests/kernel/current/tests/*
>    text    data     bss     dec     hex filename
>   27592     848   17004   45444    b184 install/tests/kernel/current/tests/bin_sem0
>   29188     856   22152   52196    cbe4 install/tests/kernel/current/tests/bin_sem1
>   29540     868   55644   86052   15024 install/tests/kernel/current/tests/bin_sem2
>   29592     856   22132   52580    cd64 install/tests/kernel/current/tests/bin_sem3
>   31476     844   16996   49316    c0a4 install/tests/kernel/current/tests/clock0
>   27836     848   19576   48260    bc84 install/tests/kernel/current/tests/clock1
>   40944    1316   19568   61828    f184 install/tests/kernel/current/tests/clockcnv
>
> > And one more thing, since I did not edit/change the target.ld (created
> > by ecosconfig), I suppose will need to change it as well?
>
> Normally no. The RAM startup address map should work correctly with a
> ROM redboot.
>
>     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] 26+ messages in thread

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-07  8:50           ` Socrates Socrates
@ 2006-06-07  8:58             ` Andrew Lunn
  2006-06-07  9:40               ` Socrates Socrates
  0 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2006-06-07  8:58 UTC (permalink / raw)
  To: Socrates Socrates; +Cc: ecos-discuss

On Wed, Jun 07, 2006 at 10:50:51AM +0200, Socrates Socrates wrote:
> Hi Andrew,
> 
> The templete is redboot;

You should only use the redboot tempate to build redboot. 
To build applications you need to use a different template. 

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

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-07  8:58             ` Andrew Lunn
@ 2006-06-07  9:40               ` Socrates Socrates
  2006-06-07  9:53                 ` Andrew Lunn
  2006-06-07 11:57                 ` Gary Thomas
  0 siblings, 2 replies; 26+ messages in thread
From: Socrates Socrates @ 2006-06-07  9:40 UTC (permalink / raw)
  To: Socrates Socrates, ecos-discuss

Hi Andrew,

Since I have successfully built redboot and uploaded it onto the
board. What steps do I need to get a simple hellow world app running?

I was/am of the impression that from the directory where I built
redboot, the only file I need was the target.ld file? Am I correct?

Better still if you are aware of a website which clearly shows how to
build and upload a simple app could you please point it out?
I have search the websites and the steps I've been following so far is
what others say have done.


Regards;


On 6/7/06, Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, Jun 07, 2006 at 10:50:51AM +0200, Socrates Socrates wrote:
> > Hi Andrew,
> >
> > The templete is redboot;
>
> You should only use the redboot tempate to build redboot.
> To build applications you need to use a different template.
>
>    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] 26+ messages in thread

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-07  9:40               ` Socrates Socrates
@ 2006-06-07  9:53                 ` Andrew Lunn
  2006-06-07 10:28                   ` Socrates Socrates
  2006-06-07 11:57                 ` Gary Thomas
  1 sibling, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2006-06-07  9:53 UTC (permalink / raw)
  To: Socrates Socrates; +Cc: ecos-discuss

On Wed, Jun 07, 2006 at 11:40:54AM +0200, Socrates Socrates wrote:
> Hi Andrew,
> 
> Since I have successfully built redboot and uploaded it onto the
> board. What steps do I need to get a simple hellow world app running?
 
> I was/am of the impression that from the directory where I built
> redboot, the only file I need was the target.ld file? Am I correct?

http://ecos.sourceware.org/docs-latest/user-guide/user-guide-programming.html

You first need to build eCos for real applications.

ecosconfig new eb55
ecosconfig tree
make -s

What ends up in the install directory is what you need for building
applications. You will find all the include files the application
needs, the library containing eCos, the linker file etc.

You can also build the eCos tests

make -s tests

They will then be placed into the install/tests directory tree. The
following page shows you have you can download the test and run it.

http://ecos.sourceware.org/docs-latest/user-guide/using-commandline-testcase.html

Once you have that working try an hello world:

http://ecos.sourceware.org/docs-latest/user-guide/building-and-running-sample-appliations.html

You download and run this in the same way.

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

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-07  9:53                 ` Andrew Lunn
@ 2006-06-07 10:28                   ` Socrates Socrates
  2006-06-07 11:11                     ` Andrew Lunn
  0 siblings, 1 reply; 26+ messages in thread
From: Socrates Socrates @ 2006-06-07 10:28 UTC (permalink / raw)
  To: Socrates Socrates, ecos-discuss

Thank you for all that info you provided me with.

The first 3 steps are fine but "make -s tests" fails:

:~/work/atmel/060606$ make -s tests
headers finished
build finished
/home/socrates/work/atmel/060606/install/lib/libtarget.a(redboot_main.o):
In function `bist':
/opt/ecos/ecos-2.0/packages/redboot/v2_0/src/main.c:626: multiple
definition of `cyg_start'
tests/context.o:/opt/ecos/ecos-2.0/packages/hal/common/v2_0/tests/context.c:116:
first defined here
/opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld:
Warning: size of symbol `cyg_start' changed from 12 to 728 in
/home/socrates/work/atmel/060606/install/lib/libtarget.a(redboot_main.o)
collect2: ld returned 1 exit status
make[1]: *** [/home/socrates/work/atmel/060606/install/tests/hal/common/v2_0/tests/context]
Error 1
make: *** [tests] Error 2




On 6/7/06, Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, Jun 07, 2006 at 11:40:54AM +0200, Socrates Socrates wrote:
> > Hi Andrew,
> >
> > Since I have successfully built redboot and uploaded it onto the
> > board. What steps do I need to get a simple hellow world app running?
>
> > I was/am of the impression that from the directory where I built
> > redboot, the only file I need was the target.ld file? Am I correct?
>
> http://ecos.sourceware.org/docs-latest/user-guide/user-guide-programming.html
>
> You first need to build eCos for real applications.
>
> ecosconfig new eb55
> ecosconfig tree
> make -s
>
> What ends up in the install directory is what you need for building
> applications. You will find all the include files the application
> needs, the library containing eCos, the linker file etc.
>
> You can also build the eCos tests
>
> make -s tests
>
> They will then be placed into the install/tests directory tree. The
> following page shows you have you can download the test and run it.
>
> http://ecos.sourceware.org/docs-latest/user-guide/using-commandline-testcase.html
>
> Once you have that working try an hello world:
>
> http://ecos.sourceware.org/docs-latest/user-guide/building-and-running-sample-appliations.html
>
> You download and run this in the same way.
>
>     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] 26+ messages in thread

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-07 10:28                   ` Socrates Socrates
@ 2006-06-07 11:11                     ` Andrew Lunn
  2006-06-07 11:48                       ` Socrates Socrates
  0 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2006-06-07 11:11 UTC (permalink / raw)
  To: Socrates Socrates; +Cc: ecos-discuss

On Wed, Jun 07, 2006 at 12:27:13PM +0200, Socrates Socrates wrote:
> Thank you for all that info you provided me with.
> 
> The first 3 steps are fine but "make -s tests" fails:
> 
> :~/work/atmel/060606$ make -s tests
> headers finished
> build finished
> /home/socrates/work/atmel/060606/install/lib/libtarget.a(redboot_main.o):

O.K.

I missed a step. you need to first 

rm -fr 

you Redboot tree, or work in a different directory. You cannot convert
a tree from one template to another.

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

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-07 11:11                     ` Andrew Lunn
@ 2006-06-07 11:48                       ` Socrates Socrates
  2006-06-07 11:54                         ` Andrew Lunn
  0 siblings, 1 reply; 26+ messages in thread
From: Socrates Socrates @ 2006-06-07 11:48 UTC (permalink / raw)
  To: Socrates Socrates, ecos-discuss

Correct that's what I needed.  Now problem is the tests work; it just
hangs (or does nothing as seen from the last ine below), I followed
the example from the website you sent.

Here are my steps using the simulator: (The results are the same even
when I connect to the board)

~/work/atmel/060606$ rm -rf *
socrates@would:~/work/atmel/060606$ ecosconfig new eb40
socrates@would:~/work/atmel/060606$ ecosconfig tree
socrates@would:~/work/atmel/060606$ make -s
headers finished
build finished
socrates@would:~/work/atmel/060606$ make -s tests
headers finished
build finished
tests finished
socrates@would:~/work/atmel/060606$ arm-elf-gdb -nw
install/tests/kernel/v2_0/tests/bin_sem0
GNU gdb 5.3 (eCosCentric)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(gdb) target bin
Undefined target command: "bin".  Try "help target".
(gdb) target sim
Connected to the simulator.
(gdb) load
Loading section .rom_vectors, size 0x40 vma 0x2020000
Loading section .text, size 0x6764 vma 0x2020040
Loading section .rodata, size 0x394 vma 0x20267a4
Loading section .data, size 0x2b4 vma 0x2026b38
Start address 0x2020040
Transfer rate: 225120 bits in <1 sec.
(gdb) continue
Continuing.
The program is not being run.
(gdb) run
Starting program:
/home/socrates/work/atmel/060606/install/tests/kernel/v2_0/tests/bin_sem0



On 6/7/06, Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, Jun 07, 2006 at 12:27:13PM +0200, Socrates Socrates wrote:
> > Thank you for all that info you provided me with.
> >
> > The first 3 steps are fine but "make -s tests" fails:
> >
> > :~/work/atmel/060606$ make -s tests
> > headers finished
> > build finished
> > /home/socrates/work/atmel/060606/install/lib/libtarget.a(redboot_main.o):
>
> O.K.
>
> I missed a step. you need to first
>
> rm -fr
>
> you Redboot tree, or work in a different directory. You cannot convert
> a tree from one template to another.
>
>   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] 26+ messages in thread

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-07 11:48                       ` Socrates Socrates
@ 2006-06-07 11:54                         ` Andrew Lunn
  2006-06-08 12:28                           ` Socrates Socrates
  0 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2006-06-07 11:54 UTC (permalink / raw)
  To: Socrates Socrates; +Cc: ecos-discuss

On Wed, Jun 07, 2006 at 01:47:04PM +0200, Socrates Socrates wrote:
> Correct that's what I needed.  Now problem is the tests work; it just
> hangs (or does nothing as seen from the last ine below), I followed
> the example from the website you sent.
> 
> Here are my steps using the simulator: (The results are the same even
> when I connect to the board)
> 
> ~/work/atmel/060606$ rm -rf *
> socrates@would:~/work/atmel/060606$ ecosconfig new eb40
> socrates@would:~/work/atmel/060606$ ecosconfig tree
> socrates@would:~/work/atmel/060606$ make -s
> headers finished
> build finished
> socrates@would:~/work/atmel/060606$ make -s tests
> headers finished
> build finished
> tests finished
> socrates@would:~/work/atmel/060606$ arm-elf-gdb -nw
> install/tests/kernel/v2_0/tests/bin_sem0
> GNU gdb 5.3 (eCosCentric)
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain 
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
> (gdb) target bin
> Undefined target command: "bin".  Try "help target".
> (gdb) target sim
> Connected to the simulator.
> (gdb) load
> Loading section .rom_vectors, size 0x40 vma 0x2020000
> Loading section .text, size 0x6764 vma 0x2020040
> Loading section .rodata, size 0x394 vma 0x20267a4
> Loading section .data, size 0x2b4 vma 0x2026b38
> Start address 0x2020040
> Transfer rate: 225120 bits in <1 sec.
> (gdb) continue
> Continuing.

The arm simulator does not include a simulated serial port, so you
won't see anything.

What happens on the real target which will have a serial port?

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

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-07  9:40               ` Socrates Socrates
  2006-06-07  9:53                 ` Andrew Lunn
@ 2006-06-07 11:57                 ` Gary Thomas
  2006-06-07 12:09                   ` [ECOS] Python under eCos Evgeny Belyanco
  1 sibling, 1 reply; 26+ messages in thread
From: Gary Thomas @ 2006-06-07 11:57 UTC (permalink / raw)
  To: Socrates Socrates; +Cc: ecos-discuss

On Wed, 2006-06-07 at 11:40 +0200, Socrates Socrates wrote:
> Hi Andrew,
> 
> Since I have successfully built redboot and uploaded it onto the
> board. What steps do I need to get a simple hellow world app running?
> 
> I was/am of the impression that from the directory where I built
> redboot, the only file I need was the target.ld file? Am I correct?
> 
> Better still if you are aware of a website which clearly shows how to
> build and upload a simple app could you please point it out?
> I have search the websites and the steps I've been following so far is
> what others say have done.

Try: http://www.mlbassoc.com/examples/

> 
> Regards;
> 
> 
> On 6/7/06, Andrew Lunn <andrew@lunn.ch> wrote:
> > On Wed, Jun 07, 2006 at 10:50:51AM +0200, Socrates Socrates wrote:
> > > Hi Andrew,
> > >
> > > The templete is redboot;
> >
> > You should only use the redboot tempate to build redboot.
> > To build applications you need to use a different template.
> >
> >    Andrew
> >

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* [ECOS] Python under eCos
  2006-06-07 11:57                 ` Gary Thomas
@ 2006-06-07 12:09                   ` Evgeny Belyanco
  2006-06-07 12:15                     ` Gary Thomas
  0 siblings, 1 reply; 26+ messages in thread
From: Evgeny Belyanco @ 2006-06-07 12:09 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Socrates Socrates, ecos-discuss

Wednesday, June 7, 2006, 3:57:01 PM, you wrote:

GT> Try: http://www.mlbassoc.com/examples/

Very nice!

Do you planning to finish Python example?
http://www.mlbassoc.com/examples/build_python.html


Evgeny Belyanco
Chief Designer KB KCC
**********************************
* Phone (cel.): +7 901 510 9046
**********************************


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

* Re: [ECOS] Python under eCos
  2006-06-07 12:09                   ` [ECOS] Python under eCos Evgeny Belyanco
@ 2006-06-07 12:15                     ` Gary Thomas
  0 siblings, 0 replies; 26+ messages in thread
From: Gary Thomas @ 2006-06-07 12:15 UTC (permalink / raw)
  To: Evgeny Belyanco; +Cc: Socrates Socrates, ecos-discuss

On Wed, 2006-06-07 at 16:06 +0400, Evgeny Belyanco wrote:
> Wednesday, June 7, 2006, 3:57:01 PM, you wrote:
> 
> GT> Try: http://www.mlbassoc.com/examples/
> 
> Very nice!
> 
> Do you planning to finish Python example?
> http://www.mlbassoc.com/examples/build_python.html

I actually have (it's just not up yet).  It's vastly more complicated
and takes a lot of resources on the target, so the applicability is
somewhat limited.

Someday, I'll get a chance to update my web page with these details :-)

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-07 11:54                         ` Andrew Lunn
@ 2006-06-08 12:28                           ` Socrates Socrates
  2006-06-08 12:35                             ` Andrew Lunn
  0 siblings, 1 reply; 26+ messages in thread
From: Socrates Socrates @ 2006-06-08 12:28 UTC (permalink / raw)
  To: Socrates Socrates, ecos-discuss

On the target there's no output either. I can give you the steps that
I perform if you require.

On 6/7/06, Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, Jun 07, 2006 at 01:47:04PM +0200, Socrates Socrates wrote:
> > Correct that's what I needed.  Now problem is the tests work; it just
> > hangs (or does nothing as seen from the last ine below), I followed
> > the example from the website you sent.
> >
> > Here are my steps using the simulator: (The results are the same even
> > when I connect to the board)
> >
> > ~/work/atmel/060606$ rm -rf *
> > socrates@would:~/work/atmel/060606$ ecosconfig new eb40
> > socrates@would:~/work/atmel/060606$ ecosconfig tree
> > socrates@would:~/work/atmel/060606$ make -s
> > headers finished
> > build finished
> > socrates@would:~/work/atmel/060606$ make -s tests
> > headers finished
> > build finished
> > tests finished
> > socrates@would:~/work/atmel/060606$ arm-elf-gdb -nw
> > install/tests/kernel/v2_0/tests/bin_sem0
> > GNU gdb 5.3 (eCosCentric)
> > Copyright 2002 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you are
> > welcome to change it and/or distribute copies of it under certain
> > conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for details.
> > This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
> > (gdb) target bin
> > Undefined target command: "bin".  Try "help target".
> > (gdb) target sim
> > Connected to the simulator.
> > (gdb) load
> > Loading section .rom_vectors, size 0x40 vma 0x2020000
> > Loading section .text, size 0x6764 vma 0x2020040
> > Loading section .rodata, size 0x394 vma 0x20267a4
> > Loading section .data, size 0x2b4 vma 0x2026b38
> > Start address 0x2020040
> > Transfer rate: 225120 bits in <1 sec.
> > (gdb) continue
> > Continuing.
>
> The arm simulator does not include a simulated serial port, so you
> won't see anything.
>
> What happens on the real target which will have a serial port?
>
>      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] 26+ messages in thread

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-08 12:28                           ` Socrates Socrates
@ 2006-06-08 12:35                             ` Andrew Lunn
  2006-06-08 12:48                               ` Socrates Socrates
  0 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2006-06-08 12:35 UTC (permalink / raw)
  To: Socrates Socrates; +Cc: ecos-discuss

On Thu, Jun 08, 2006 at 02:28:00PM +0200, Socrates Socrates wrote:
> On the target there's no output either. I can give you the steps that
> I perform if you require.
> 
> On 6/7/06, Andrew Lunn <andrew@lunn.ch> wrote:
> >On Wed, Jun 07, 2006 at 01:47:04PM +0200, Socrates Socrates wrote:
> >> Correct that's what I needed.  Now problem is the tests work; it just
> >> hangs (or does nothing as seen from the last ine below), I followed
> >> the example from the website you sent.
> >>
> >> Here are my steps using the simulator: (The results are the same even
> >> when I connect to the board)
> >>
> >> ~/work/atmel/060606$ rm -rf *
> >> socrates@would:~/work/atmel/060606$ ecosconfig new eb40
> >> socrates@would:~/work/atmel/060606$ ecosconfig tree
> >> socrates@would:~/work/atmel/060606$ make -s
> >> headers finished
> >> build finished
> >> socrates@would:~/work/atmel/060606$ make -s tests
> >> headers finished
> >> build finished
> >> tests finished
> >> socrates@would:~/work/atmel/060606$ arm-elf-gdb -nw
> >> install/tests/kernel/v2_0/tests/bin_sem0
> >> GNU gdb 5.3 (eCosCentric)
> >> Copyright 2002 Free Software Foundation, Inc.
> >> GDB is free software, covered by the GNU General Public License, and you 
> >are
> >> welcome to change it and/or distribute copies of it under certain
> >> conditions.
> >> Type "show copying" to see the conditions.
> >> There is absolutely no warranty for GDB.  Type "show warranty" for 
> >details.
> >> This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
> >> (gdb) target bin
> >> Undefined target command: "bin".  Try "help target".
> >> (gdb) target sim
> >> Connected to the simulator.
> >> (gdb) load
> >> Loading section .rom_vectors, size 0x40 vma 0x2020000
> >> Loading section .text, size 0x6764 vma 0x2020040
> >> Loading section .rodata, size 0x394 vma 0x20267a4
> >> Loading section .data, size 0x2b4 vma 0x2026b38
> >> Start address 0x2020040
> >> Transfer rate: 225120 bits in <1 sec.
> >> (gdb) continue
> >> Continuing.
> >
> >The arm simulator does not include a simulated serial port, so you
> >won't see anything.
> >
> >What happens on the real target which will have a serial port?
> >
> >     Andrew

Please don't top post.

http://www.catb.org/~esr/jargon/html/T/top-post.html

The eb55 has two serial ports i think? Does it output out the other?

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

* Re: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-08 12:35                             ` Andrew Lunn
@ 2006-06-08 12:48                               ` Socrates Socrates
  2006-06-08 12:55                                 ` AW: " Ram Sudhir Tadavarthi
  0 siblings, 1 reply; 26+ messages in thread
From: Socrates Socrates @ 2006-06-08 12:48 UTC (permalink / raw)
  To: Socrates Socrates, ecos-discuss

Sorry about that.

Well the eb40 also has 2 serial ports. Since redboot is uploaded runs
runs (on RAM) well using port A, I imagine the tests applications will
also use the same port. If I recall (from Atmel's docs) well port A is
the one to be used for debugging.

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

* AW: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-08 12:48                               ` Socrates Socrates
@ 2006-06-08 12:55                                 ` Ram Sudhir Tadavarthi
  0 siblings, 0 replies; 26+ messages in thread
From: Ram Sudhir Tadavarthi @ 2006-06-08 12:55 UTC (permalink / raw)
  To: ecos-discuss

> If I recall (from Atmel's docs) well port A is the one to be used for 
> debugging.

[Ram ]Just verify if there is output on the other port as it takes very
little time to check it practically.

Warms Regards,
Ram



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

* Re: AW: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-12 12:49       ` Gary Thomas
@ 2006-06-12 13:15         ` Socrates Socrates
  0 siblings, 0 replies; 26+ messages in thread
From: Socrates Socrates @ 2006-06-12 13:15 UTC (permalink / raw)
  To: Gary Thomas; +Cc: eCos Discussion

> Please keep your replies on the list so that all may benefit (and help).
Being newbie and all...thanks for that advice.

> There are explicit instructions for how to do this in the eCos
> documentation - have you followed them completely?
I am following the instructions
(http://ecos.sourceware.org/docs-latest/redboot/at91.html) to the word
with no sucess. Here are my steps:

1. arm-elf-gdb redboot.elf
~/work/atmel/020606-ARM/install/bin$ arm-elf-gdb redboot.elf
GNU gdb 5.3 (eCosCentric)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(gdb) tar rdi /dev/ttyS0
Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) for
AT91EB40 (2.00)
Angel Debug Monitor rebuilt on Apr 07 2000 at 12:40:31
Serial Rate:   9600
Connected to ARM RDI target.
(gdb) set $cpsr=0xd3
(gdb) load
Loading section .rom_vectors, size 0x40 lma 0x2020000
Loading section .text, size 0xb1bc lma 0x2020040
Loading section .rodata, size 0x1c37 lma 0x202b1fc
Loading section .data, size 0x404 lma 0x202ce34
Start address 0x2020040, load size 53815
Transfer rate: 6425 bits/sec, 498 bytes/write.
(gdb) cont
Continuing.

[3]+  Stopped                 arm-elf-gdb redboot.elf

Here I start minicom so I can load redboot.srec (I even desperately
tried redboot.img/bin)
~/work/atmel/020606-ARM/install/bin$ minicom -o

Welcome to minicom 2.1

OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n
Compiled on Nov  4 2005, 18:10:30.

Press CTRL-A Z for help on special keys

RedBoot> ver

RedBoot(tm) bootstrap and debug environment [RAM]
Non-certified release, version v2_0 - built 13:29:20, Jun  5 2006

Platform: Atmel AT91/EB40 (ARM7TDMI)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x02000000-0x02080000, 0x02033428-0x0207f000 available
FLASH: 0x01010000 - 0x01020000, 256 blocks of 0x00000100 bytes each.

RedBoot> load -m xmodem -b %{FREEMEMLO}

Address offset = 0x00013800
Entry point: 0x02033840, address range: 0x02033800-0x02040a38
xyzModem - CRC mode, 1264(SOH)/0(STX)/0(CAN) packets, 3 retries

RedBoot> fis wr -f 0x01010000 -b %{FREEMEMLO} -l 0xd238

* CAUTION * about to program FLASH

            at 0x01010000..0x0101d2ff from 0x02033800 - continue (y/n)? y

... Erase from 0x01010000-0x0101d300:
............................................................................................................
................................................................................
... Program from 0x02033800-0x02040b00 at 0x01010000:
............................................................................................
................................................................................
RedBoot>

After this step I set SW1 (on the EB40 board) to UPPER MEM then press
restart and nothing happens, meaning no output.


Thanks.

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

* Re: AW: [ECOS] Huge memory footprint for a simple "hello world"
       [not found]     ` <c3d1d81f0606120412k17b9f522td7f101256ae41ed4@mail.gmail.com>
@ 2006-06-12 12:49       ` Gary Thomas
  2006-06-12 13:15         ` Socrates Socrates
  0 siblings, 1 reply; 26+ messages in thread
From: Gary Thomas @ 2006-06-12 12:49 UTC (permalink / raw)
  To: Socrates Socrates; +Cc: eCos Discussion

On Mon, 2006-06-12 at 13:12 +0200, Socrates Socrates wrote:
> > Query: why don't you load RedBoot into the board's FLASH?  If you do,
> > things will probably start working much better for you.
> I've been trying to load and write the redboot.srec file into FLASH.
> But when I select SW1 to UPPER_MEM (on EB40), redboot does not
> startup, infact there's no ouput at all.

Please keep your replies on the list so that all may benefit (and help).

There are explicit instructions for how to do this in the eCos 
documentation - have you followed them completely?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: AW: [ECOS] Huge memory footprint for a simple "hello world"
  2006-06-09 14:24 ` Ram Sudhir Tadavarthi
@ 2006-06-09 14:33   ` Gary Thomas
       [not found]     ` <c3d1d81f0606120412k17b9f522td7f101256ae41ed4@mail.gmail.com>
  0 siblings, 1 reply; 26+ messages in thread
From: Gary Thomas @ 2006-06-09 14:33 UTC (permalink / raw)
  To: Ram Sudhir Tadavarthi; +Cc: 'Socrates Socrates', ecos-discuss

On Fri, 2006-06-09 at 16:23 +0200, Ram Sudhir Tadavarthi wrote:
> > > 1.Instead of using gdb, can you try to load the image through redboot
> > using
> > > "load" command and test?
> > ~/work/atmel/020606-ARM/install/bin$ arm-elf-gdb redboot.elf
> > GNU gdb 5.3 (eCosCentric)
> > Copyright 2002 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you
> > are
> > welcome to change it and/or distribute copies of it under certain
> > conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for
> > details.
> > This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
> > (gdb) tar rdi /dev/ttyS0
> > Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) for
> > AT91EB40 (2.00)
> > Angel Debug Monitor rebuilt on Apr 07 2000 at 12:40:31
> > Serial Rate:   9600
> > Connected to ARM RDI target.
> > (gdb) set $cpsr=0xd3
> > (gdb) load
> > Loading section .rom_vectors, size 0x40 lma 0x2020000
> > Loading section .text, size 0xb1bc lma 0x2020040
> > Loading section .rodata, size 0x1c37 lma 0x202b1fc
> > Loading section .data, size 0x404 lma 0x202ce34
> > Start address 0x2020040, load size 53815
> > Transfer rate: 6331 bits/sec, 498 bytes/write.
> > (gdb) cont
> > Continuing.
> > 
> > [1]+  Stopped                 arm-elf-gdb redboot.elf
> > ~/work/atmel/020606-ARM/install/bin$ minicom
> > RedBoot> AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
> > 
> > ** Error: Illegal command: "AT"
> > RedBoot> load -m xmodem
> > C*** Abort! Attempt to load ELF data to address: 0x02020000 which is not
> > in RAM
> > xyzModem - CRC mode, 257(SOH)/0(STX)/0(CAN) packets, 3 retries
> > RedBoot>

You can't use a RAM RedBoot to load a RAM program - they end up trying
to load in the same memory space.

This is probably your problem - your eCos applications will assume that
they were loaded by RedBoot (or at least RedBoot is present on the board
even if you are using GDB to load the application).  If this isn't the 
case, you need to configure your applications to not "USE_ROM_MONITOR"

Query: why don't you load RedBoot into the board's FLASH?  If you do,
things will probably start working much better for you.

Hint: use 'minicom -o' to prevent the "AT..." modem garbage.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* AW: [ECOS] Huge memory footprint for a simple "hello world"
       [not found] <c3d1d81f0606090707m2949968t275a3363b2a49728@mail.gmail.com>
@ 2006-06-09 14:24 ` Ram Sudhir Tadavarthi
  2006-06-09 14:33   ` Gary Thomas
  0 siblings, 1 reply; 26+ messages in thread
From: Ram Sudhir Tadavarthi @ 2006-06-09 14:24 UTC (permalink / raw)
  To: 'Socrates Socrates'; +Cc: ecos-discuss


> > 1.Instead of using gdb, can you try to load the image through redboot
> using
> > "load" command and test?
> ~/work/atmel/020606-ARM/install/bin$ arm-elf-gdb redboot.elf
> GNU gdb 5.3 (eCosCentric)
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
> (gdb) tar rdi /dev/ttyS0
> Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) for
> AT91EB40 (2.00)
> Angel Debug Monitor rebuilt on Apr 07 2000 at 12:40:31
> Serial Rate:   9600
> Connected to ARM RDI target.
> (gdb) set $cpsr=0xd3
> (gdb) load
> Loading section .rom_vectors, size 0x40 lma 0x2020000
> Loading section .text, size 0xb1bc lma 0x2020040
> Loading section .rodata, size 0x1c37 lma 0x202b1fc
> Loading section .data, size 0x404 lma 0x202ce34
> Start address 0x2020040, load size 53815
> Transfer rate: 6331 bits/sec, 498 bytes/write.
> (gdb) cont
> Continuing.
> 
> [1]+  Stopped                 arm-elf-gdb redboot.elf
> ~/work/atmel/020606-ARM/install/bin$ minicom
> RedBoot> AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
> 
> ** Error: Illegal command: "AT"
> RedBoot> load -m xmodem
> C*** Abort! Attempt to load ELF data to address: 0x02020000 which is not
> in RAM
> xyzModem - CRC mode, 257(SOH)/0(STX)/0(CAN) packets, 3 retries
> RedBoot>
> 


[Ram ] Well!!! This suggests that you might have memory layout problems/
linker script problems. 

1. What is the memory layout of your platform? 

2. Does your linker script correctly reflect the memory layout of your
platform?




> > 2.Can you check if there is any signal movement on your serial port
> using an
> > oscilloscope or similar ?
> I've no access to an oscilloscope

[Ram ] Well!!! If your company doesn't provide you proper tools to debug,
you will take lot of unnecessary time to bring up the board which might be
expensive than the oscilloscope itself. Anyway try to get access to it.

If you can see any signal movement, then most probably, it might be a wrong
baud rate generation or related.

> 
> >
> > 3.Can you verify your virtual vectors configuration?
> I am new to this, so I would not know which is correct or not.
> 
[Ram ] Yep!!! Try to read the documentation and post here what exactly you
don't understand. Maybe someone would help you if they some time.


Warm regards,
ram



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

* AW: [ECOS] Huge memory footprint for a simple "hello world"
       [not found] <c3d1d81f0606090521s668a8624v240905456a81fb6e@mail.gmail.com>
@ 2006-06-09 13:45 ` Ram Sudhir Tadavarthi
  0 siblings, 0 replies; 26+ messages in thread
From: Ram Sudhir Tadavarthi @ 2006-06-09 13:45 UTC (permalink / raw)
  To: 'Socrates Socrates'; +Cc: ecos-discuss

> Hi Ram;
> 
> I checked on Port B there's nothing coming out. The setup is :I have
> Port A connected to one machine from which I upload the application
> (bin_sim0) and port B connected to some other machine to see if
> anything comes out. From both machines nothing comes out. But if the
> application is redboot.elf I do see output on Port A only.

[Ram ] ok!!! 

1.Instead of using gdb, can you try to load the image through redboot using
"load" command and test?

2.Can you check if there is any signal movement on your serial port using an
oscilloscope or similar ?

3.Can you verify your virtual vectors configuration? 

Do these tests and post the results here if you still have problem.

Hope it helps,
ram







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

end of thread, other threads:[~2006-06-12 13:15 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-06 12:03 [ECOS] Huge memory footprint for a simple "hello world" Socrates Socrates
2006-06-06 13:38 ` Andrew Lunn
2006-06-06 13:58   ` Socrates Socrates
2006-06-06 14:05     ` Andrew Lunn
2006-06-06 14:19       ` Socrates Socrates
2006-06-06 14:54         ` Andrew Lunn
2006-06-07  8:50           ` Socrates Socrates
2006-06-07  8:58             ` Andrew Lunn
2006-06-07  9:40               ` Socrates Socrates
2006-06-07  9:53                 ` Andrew Lunn
2006-06-07 10:28                   ` Socrates Socrates
2006-06-07 11:11                     ` Andrew Lunn
2006-06-07 11:48                       ` Socrates Socrates
2006-06-07 11:54                         ` Andrew Lunn
2006-06-08 12:28                           ` Socrates Socrates
2006-06-08 12:35                             ` Andrew Lunn
2006-06-08 12:48                               ` Socrates Socrates
2006-06-08 12:55                                 ` AW: " Ram Sudhir Tadavarthi
2006-06-07 11:57                 ` Gary Thomas
2006-06-07 12:09                   ` [ECOS] Python under eCos Evgeny Belyanco
2006-06-07 12:15                     ` Gary Thomas
     [not found] <c3d1d81f0606090521s668a8624v240905456a81fb6e@mail.gmail.com>
2006-06-09 13:45 ` AW: [ECOS] Huge memory footprint for a simple "hello world" Ram Sudhir Tadavarthi
     [not found] <c3d1d81f0606090707m2949968t275a3363b2a49728@mail.gmail.com>
2006-06-09 14:24 ` Ram Sudhir Tadavarthi
2006-06-09 14:33   ` Gary Thomas
     [not found]     ` <c3d1d81f0606120412k17b9f522td7f101256ae41ed4@mail.gmail.com>
2006-06-12 12:49       ` Gary Thomas
2006-06-12 13:15         ` Socrates Socrates

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