TinyOS没有编译/上传到TelosB mote

时间:2017-06-07 21:19:05

标签: upload tinyos

我遇到了尝试上传" blink"的问题。应用到motes上。我似乎无法在make telosb reinstall bsl,/dev/ttUSB0目录中运行命令make telosb reinstallapps/Blink,这阻止了我继续使用我的项目。我作为用户,超级用户和root用户尝试过。我在下面概述了变量命令的响应。 [运行Ubuntu 16.04,TinyOS 2.1.2,ncc版本1.4.2,nescc版本1.3.6]

(A)用root和make telosb命令我回来了:

mkdir -p build/telosb compiling BlinkAppC to a telosb binary ncc -o build/telosb/main.exe -Os -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=\"root\" -DIDENT_HOSTNAME=\"liam-Latitude-E\" -DIDENT_USERHASH=0x9236fe46L -DIDENT_TIMESTAMP=0x59384a62L -DIDENT_UIDHASH=0xdc08609fL BlinkAppC.nc -lm compiled BlinkAppC to build/telosb/main.exe 2538 bytes in ROM 56 bytes in RAM msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex writing TOS image

(B)对于普通用户和make telosb命令,我回来了:

mkdir -p build/telosb /bin/sh: 1: cannot create build/telosb/ident_flags.txt: Permission denied /home/liam/tinyos-main/support/make/ident_flags.extra:13: recipe for target 'ident_cache' failed make: *** [ident_cache] Error 2

(C)使用超级用户和sudo make telosb命令,我回来了:

make: *** No rule to make target 'telosb'. Stop.

(D)用root和make telosb reinstall命令我回来了:

cp build/telosb/main.ihex build/telosb/main.ihex.out found mote on /dev/ttyUSB0 (using bsl,auto) installing telosb binary using bsl tos-bsl --telosb -c /dev/ttyUSB0 -r -e -I -p build/telosb/main.ihex.out MSP430 Bootstrap Loader Version: 1.39-goodfet-8 Mass Erase... Transmit default password ... Invoking BSL... Transmit default password ... Current bootstrap loader version: 1.61 (Device ID: f16c) Changing baudrate to 38400 ... MSP430 Bootstrap Loader Version: 1.39-goodfet-8 Mass Erase... Transmit default password ... Invoking BSL... Transmit default password ... Current bootstrap loader version: 1.61 (Device ID: f16c) Changing baudrate to 38400 ... Traceback (most recent call last): File "/usr/bin/tos-bsl", line 1918, in <module> main(0); File "/usr/bin/tos-bsl", line 1843, in main speed=speed, File "/usr/bin/tos-bsl", line 1218, in actionStartBSL self.actionChangeBaudrate(speed) #change baudrate File "/usr/bin/tos-bsl", line 1345, in actionChangeBaudrate self.serialport.setBaudrate(baudrate) AttributeError: 'Serial' object has no attribute 'setBaudrate' /home/liam/tinyos-main/support/make/msp/bsl.extra:45: recipe for target 'program' failed make: *** [program] Error 1

(E)对于普通用户和make telosb reinstall我回来了:

cp build/telosb/main.ihex build/telosb/main.ihex.out cp: cannot create regular file 'build/telosb/main.ihex.out': Permission denied /home/liam/tinyos-main/support/make/msp/msp.rules:92: recipe for target 'setid' failed make: *** [setid] Error 1

我已经遍布互联网和在线论坛,但尚未找到解决方法。我研究了(D)并发现也许python 2可能改变了'setBaudRate&#39;的名称。变量。我也不确定如何改变它。

感谢您的时间和帮助!

编辑:添加了ncc和nescc版本。

1 个答案:

答案 0 :(得分:0)

This堆栈溢出答案适用于TinyOS。

事实证明,pyserial 3.0.1与TinyOS应用程序Blink不兼容。我很确定pyserial 3.0.1附带了TinyOS的软件包。要解决此问题,请使用命令sudo pip install "pySerial>=2.0,<=2.99999"。对我来说,它踢了回来:

The directory '/home/liam/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/liam/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting pySerial<=2.99999,>=2.0 Installing collected packages: pySerial Found existing installation: pyserial 3.0.1 DEPRECATION: Uninstalling a distutils installed project (pySerial) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. Uninstalling pyserial-3.0.1: Successfully uninstalled pyserial-3.0.1 Successfully installed pySerial-2.7

但是眨眼应用程序仍然上传并且工作正常。