...
- You need to be able to run the OpenVisualizer, so make sure installed the elements necessary for the OpenVisualizer to run.
- Your computer needs to have
gcc
installed to be able to compile the firmware as a Python extension module. On Linux, that should be the case by default. On Windows, we recommend http://www.mingw.org/. To be able to compile the firmware, the compiler will need to have access to the
Python.h
header file. If the compiler cannot find it, you will get the following error:Code Block File "/home/user/Desktop/openWSN-sim/openwsn-fw/SConscript", line 449, in sconscript_scanner scons: done reading SConscript files. scons: Building targets ... Compiling (shared) firmware/openos/projects/common/03oos_openwsn/03oos_openwsn_obj.os In file included from build/python_gcc/bsp/boards/board_obj.h:46:0, from firmware/openos/projects/common/03oos_openwsn/03oos_openwsn_obj.c:15: build/python_gcc/bsp/boards/python/openwsnmodule_obj.h:11:20: fatal error: Python.h: No such file or directory compilation terminated. scons: *** [firmware/openos/projects/common/03oos_openwsn/03oos_openwsn_obj.os] Error 1 scons: building terminated because of errors.
The Python header files should be present by default on Windows. On Linux, you need to install the
python-dev
package:Code Block apt-get install python-dev
In some Linux installations, you might need to install the
python-tk
package:Code Block apt-get install python-tk
Compiling firmware
Before you can run a simulation, you need to compile the OpenWSN firmware as a Python extension module. For that, navigate to the openwsn-fw/
directory, and enter the following command:
...