Hi Hayet,
>From your message it is not clear which information you want to
retrieve and in which context. If you simply want to have an idea of
the RAM footprint used by your application, this information is
displayed by the build system at the end of the compilation of your
application e.g. with the Blink application:
---
vbox@A05PC01-vb:/cygdrive/t$ cd apps/Blink
vbox@A05PC01-vb:/cygdrive/t/apps/Blink$ make telosb
mkdir -p build/telosb
compiling BlinkAppC to a telosb binary
ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul
-fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb -fnesc
-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22
-DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"vbox\" -D
IDENT_HOSTNAME=\"A05PC01-vb\" -DIDENT_USERHASH=0x27c1a71aL
-DIDENT_TIMESTAMP=0x4db6ab63L -DIDENT_UIDHASH=0xea1c221dL Bl
inkAppC.nc -lm
compiled BlinkAppC to build/telosb/main.exe
2648 bytes in ROM
54 bytes in RAM
<<<<<<<<<<<<<<<<<<<<<<<<< static amount of RAM used by the application
msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex
writing TOS image
---
If you want to retrieve this information from you application code,
you will need some variable to hold this size. Since there is no
dynamic memory allocation in standard TinyOS applications, the amount
of used RAM can be deduced at compile time and will always remain the
same. The simplest way to retrieve such size information is to define
some symbol in the linker script. By default, for telosb motes, the
linker script used is /opt/msp430/msp430/lib/ldscripts/msp430x1611.x
(absolute path may differ on your host).
Small modifications in the linker script should allow you to retrieve
the information you wish (size, base address, ...).
Have a look at the linker script itself and at the GNU ld
documentation ( http://sourceware.org/binutils/docs-2.20/ld/ ). You
should be able to get what you want with two symbols (xxx_start,
xxx_end) or even with one single symbol defined with something like
"used_size = SIZEOF(.data);". You can then access these linker
generated symbols with extern in your C/nesC code.
Hope this helps.
Romain
On Tue, Apr 26, 2011 at 11:16 AM, hayet nasri <[email protected]> wrote:
>
> hello all
> I am working on a project to manage WSN with SNMP. I would know how can i
> get the memory space of RAM of telosb mote. So is there a way to do so?
> thanks
> --
> View this message in context:
> http://old.nabble.com/about-the-RAM-of-telosb-mote-tp31476758p31476758.html
> Sent from the TinyOS - Help mailing list archive at Nabble.com.
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help