Hi,
     I am trying to run C++ TOSSIM simulations in order to use the gdb
debugger to examine my code and the TinyOS library code. I have
followed the TOSSIM tutorial 11, at
http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson11.html
     I saved the suggested C++ file as Driver.c and the makefile driver as
Makefile.Driver. Then I complied to TOSSIM by running
make micaz sim
(for python)
and
make -f Makefile.Driver
(for C++)
     Then I run gdb. To begin, I simply wanted to run the program to
completion, so I entered "run" 7.04 at the GDB plot. Whenever I try
to run the program in this way, I get the following error message
after the program runs for several minutes:

Program received signal SIGSEGV, Segmentation fault.
0x0804dfe2 in sim_noise_trace_add (node_id=0, noiseVal=-60 '�')
    at /opt/tinyos-2.x/tos/lib/tossim/sim_noise.c:88
88          memcpy(data, noiseData[node_id].noiseTrace,
noiseData[node_id].noiseTraceLen);

     It may be applicable to note that the program took up an increasing
amount or RAM space on Ubuntu 7.04. It used up 98.0% of the 1 GB RAM
(minus about 230 MB for the OS, ect) and, in one case, 51% of the my
4.6 GB swap partition (increased from 1 GB specifically for the
purpose of running this program). In most subsequent runs, however,
swap usage was lower.
     Is there some sort of stack or heap overflow occurring due to lack of
memory?
     I tried to optimize the file by reducing the number of motes to 2 and
the noise traces to 100 (the minimum allowed). However, memory usage
was similar to the above and the error still occurred.

     Are there any ideas about how I can resolve this issue? By the way,
are the memory values that I cite reasonable? If so, is it possible
to optimize the C++ somehow so it runs on computers with about 1 GB
of RAM?
     Any help is appreciated in advance.

Tal

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to