3

我首先在 Windows7 上使用 VMWARE 安装 Ubuntu 10.04。我安装了 TinyOS 2.1.2,一切正常。Blink 和其他示例工作正常。Tossim 也在为这些示例工作。命令 make micaz sim 已成功构建。我必须模拟signtaure算法所以我想安装TinyECC-2.0但得到以下错误:

sumi@ubuntu:/opt/tinyos-2.1.2/apps/TinyECC-2.0$ make micaz sim
mkdir -p simbuild/micaz
  placing object files in simbuild/micaz
  writing XML schema to app.xml
  compiling testECDSA to object file sim.o
ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim -fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\) -fnesc-gcc=gcc -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=simbuild/micaz/app.c -board=micasb -DTOSH_DATA_LENGTH=102 -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000 -DSECP160R1 -DBARRETT_REDUCTION   -DHYBRID_MULT   -DHYBRID_SQR   -DCURVE_OPT   -DPROJECTIVE   -DSLIDING_WIN   -DSHAMIR_TRICK   -DIDENT_APPNAME=\"testECDSA\" -DIDENT_USERNAME=\"sumi\" -DIDENT_HOSTNAME=\"ubuntu\" -DIDENT_USERHASH=0x4f41f2b4L -DIDENT_TIMESTAMP=0x5104ea17L -DIDENT_UIDHASH=0x81f6a833L -I/usr/include/python2.6 -Wno-nesc-data-race testECDSA.nc   -fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xml
NNM.nc: In function ‘NNM$NN_SubDigitMult’:
NNM.nc:3278: error: can't find a register in class ‘CLOBBERED_REGS’ while reloading ‘asm’
NNM.nc:3278: error: ‘asm’ operand has impossible constraints
NNM.nc: In function ‘NNM$NN_Sub’:
NNM.nc:367: error: unknown register name ‘r2’ in ‘asm’
NNM.nc:367: error: unknown register name ‘r0’ in ‘asm’
NNM.nc: In function ‘NNM$NN_Sqr’:
NNM.nc:1775: error: unknown register name ‘r29’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r28’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r27’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r26’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r25’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r24’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r19’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r17’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r16’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r15’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r14’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r13’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r12’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r11’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r10’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r9’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r8’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r7’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r6’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r5’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r4’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r3’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r2’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r1’ in ‘asm’
NNM.nc:1775: error: unknown register name ‘r0’ in ‘asm’
secp160r1.nc: In function ‘secp160r1$CurveParam$omega_mul’:
secp160r1.nc:357: error: unknown register name ‘r29’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r28’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r27’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r26’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r25’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r19’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r17’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r16’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r15’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r14’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r13’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r12’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r11’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r10’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r9’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r8’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r7’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r6’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r5’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r4’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r3’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r2’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r1’ in ‘asm’
secp160r1.nc:357: error: unknown register name ‘r0’ in ‘asm’
NNM.nc: In function ‘NNM$NN_Add’:
NNM.nc:273: error: unknown register name ‘r2’ in ‘asm’
NNM.nc:273: error: unknown register name ‘r0’ in ‘asm’
NNM.nc: In function ‘NNM$NN_Mult’:
NNM.nc:875: error: unknown register name ‘r25’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r24’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r22’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r21’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r20’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r19’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r18’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r17’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r16’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r15’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r14’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r13’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r12’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r11’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r10’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r9’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r8’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r6’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r5’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r4’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r3’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r2’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r1’ in ‘asm’
NNM.nc:875: error: unknown register name ‘r0’ in ‘asm’
make: *** [sim-exe] Error 1
sumi@ubuntu:/opt/tinyos-2.1.2/apps/TinyECC-2.0$ 

有没有人在做这个???

4

1 回答 1

0

根据文档(http://discovery.csc.ncsu.edu/software/TinyECC/README.txt):

NNM.nc 中有一些内联汇编代码来加速自然数运算。内联汇编代码是为 Atmega128l(MICAz)、MSP430(TelosB/Tmote Sky) 和 XScale(Imote2) 编写的。如果您想在其他平台上使用 TinyECC,您必须在 NN.h 中注释“#define INLINE_ASM”或实现您自己的内联汇编代码。

除非您准备编写自己的内联汇编,否则我会考虑更改 INLINE_ASM 的定义。

于 2014-07-12T22:34:08.603 回答