#define BITINIT \
uint8_t clrClkAndData = PORTD & ~0x28
#define BIT(n) \
PORTD = clrClkAndData; \
asm __volatile__ \
( "sbrc %2," #n "\n" \
"\tsbi 18,3\n" \
"\tsbi 18,5\n" \
"\tsbic 16,2\n" \
"\tori %0,1<<" #n "\n" \
: "=d" (spiIn) : "0" (spiIn), "r" (spiOut))
我安裝了Ubuntu並使用了TOSSIM。一切正常編譯並正在運行。但是,當TOSSIM上執行的micaz文件HPLAt45dbIOP.nc,我得到這樣的錯誤使用模擬器將數據寫入閃存TOSSIM
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:
彙編消息:
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:150: Error: no such instruction: `sbrc %cl,7'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:151: Error: no such instruction: `sbi 18,3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:152: Error: no such instruction: `sbi 18,5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:153: Error: no such instruction: `sbic 16,2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:154: Error: no such instruction: `ori %dl,1<<7'
我有一個英特爾機。爲什麼TOSSIM無法運行彙編語言指令?
謝謝。無論如何,彙編代碼改變了 –
你到底想要達到什麼目的? – maral
我希望將傳感器收集的數據寫入閃存。爲此,我使用了BlockStorageC組件,我最初也面臨一個創建StorageVolumes.h文件的問題,我使用tos-storage-at45db命令手動解決了這個問題。我想知道,當TOSSIM模擬傳感器節點時,它是否也允許在模擬傳感器節點中存儲某種形式的數據,以便通過TOSSIM可以實現諸如在閃存上發送和存儲數據等任何實驗。錯誤出現在文件HPLat45dbIOP.nc –