Hi,
I am learning TOSSIM thanks to the TOSSIM tutorial and I have a segfault
when running test.py (or python_test.py) in the apps/RadioCountToLeds
directory.
I work on Xubuntu Hardy Heron ($ uname -r => 2.6.24-23-generic)
I use TinyOS 2.1
$ gcc -v => version gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
$ python -V => Python 2.5.2
To successfully built the micaz TOSSIM library I had to add :
$ export CFLAGS="-I/usr/lib/gcc/i486-linux-gnu/4.2/include -I/usr/include"
before
$make micaz sim
But I have warnings with the g++ command, e.g. (maybe its a clue):
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function «PyObject*
_wrap_nesc_app_t_numVariables_set(PyObject*, PyObject*)»:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:1999: attention :
deprecated conversion from string constant to «char*»
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2000: attention :
deprecated conversion from string constant to «char*»
So this is the trace with : $ gdb /usr/bin/python and (gdb) run test.py (the
last lines refer to sim_noise.c)
--------------------
Starting program: /usr/bin/python test.py
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0xb7d8d8c0 (LWP 14155)]
1 2 -54.0
2 1 -55.0
1 3 -60.0
3 1 -60.0
2 3 -64.0
3 2 -64.0
Creating noise model for 1
Creating noise model for 2
Creating noise model for 3
DEBUG (1): Application booted.
DEBUG (2): Application booted.
DEBUG (3): Application booted.
DEBUG (1): RadioCountToLedsC: timer fired, counter is 1.
DEBUG (1): RadioCountToLedsC: packet sent.
DEBUG (2): RadioCountToLedsC: timer fired, counter is 1.
DEBUG (2): RadioCountToLedsC: packet sent.
DEBUG (3): RadioCountToLedsC: timer fired, counter is 1.
DEBUG (3): RadioCountToLedsC: packet sent.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7d8d8c0 (LWP 14155)]
0xb7c33d76 in sim_noise_gen (node_id=1) at
/opt/tinyos-2.1.0/tos/lib/tossim/sim_noise.c:311
311 dbg("HASH", "noise_hash->numElements=%d\n",
noise_hash->numElements);
--------------------
(And $ cat meyer-heavy.txt
-39
-98
-98
-98
-99
-98
-94
-98
-98
-98)
Thanks for your help,
Rémi Villé
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help