대문 입니다. :D

!


by bruce | 2009/12/31 23:59 | 트랙백 | 덧글(44)

P-NP

P: The set of solvable problem in polynomial time.
NP: The set of verifiable problem in polynomial time.

by bruce | 2009/06/17 18:28 | 트랙백 | 덧글(0)

tinyos 2.1.0에서 tossim으로 make할때 error

> C:/cygwin/opt/tinyos-2.x-new/tinyos-2.x/tos/lib/tossim/SimMoteP.nc:  
> In function
> `__nesc_nido_initialise':
> C:/cygwin/opt/tinyos- 2.x-new/tinyos-2.x/tos/lib/tossim/SimMoteP.nc: 
> 1539: error:
> assignment of read-only location
> C:/cygwin/opt/tinyos-2.x-new/tinyos-2.x/tos/lib/tossim/SimMoteP.nc: 
> 1540: error:

이런식으로 컴파일 에러가 나고 있는데 SimModeP.nc중 코드 1539, 1540 번째 줄이 에러가 나는거라고 나왔다.
근데 정작 SimModeP.nc는 180줄 정도 밖에 안되는데..
왜 문제 인가 메일링 리스트를 찾아보면
This is a function autogenerated by nesC so that TOSSIM can look up  variables by name. Because it doesn't belong in a file, the line  number directives get confused.Let me guess: you are declaring a const variable? Use an enum instead.Phil

필립 리바이스님께서 직접 답변해주신 글이 하나 있다.
아마 TOSSIM으로 돌리려면 코드를 constant variable을 써서 작성하지말고 되도록이면
enum 스타일로 작성해야 하는 것같다.

http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2006-October/019991.html

by bruce | 2009/06/16 02:01 | tinyos | 트랙백 | 덧글(0)

.vimrc

syntax on
set hlsearch
set incsearch
set ruler
set showmatch
set viminfo='1000,f1,\"500,!
set smartindent
set ai
set cindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set shiftround
set expandtab
set fo=croql
set number
colorscheme murphy

"=========== file buffer key map ===========
map ,1 :b!1<CR>     " move to 1th file buffer
map ,2 :b!2<CR>     " move to 2th file buffer
map ,3 :b!3<CR>     " move to 3th file buffer
map ,4 :b!4<CR>     " move to 4th file buffer
map ,5 :b!5<CR>     " move to 5th file buffer
map ,6 :b!6<CR>     " move to 6th file buffer
map ,7 :b!7<CR>     " move to 7th file buffer
map ,8 :b!8<CR>     " move to 8th file buffer
map ,9 :b!9<CR>     " move to 9th file buffer
map ,0 :b!10<CR>     " move to 1th file buffer
map ,w :bw<CR>     " close current file buffer

"=========== key mapping ===================
map <F2> v]}zf
map <F3> zo
"Setting for using ctags in nesC

"set tags=/usr/tags
"set tags=/usr/include/tags
set tags=/opt/tinyos-1.x/tags
"=========== ctags ===========
if version >= 500
func! Sts()
    let st = expand("<cword>")
    exe "sts ".st
endfunc
nmap ,st :call Sts()<cr>

func! Tj()
    let st = expand("<cword>")
    exe "tj ".st
endfunc
nmap ,tj :call Tj()<cr>
func! Ts()
    let st = expand("<cword>")
    exe "ts ".st
endfunc
nmap ,ts :call Ts()<cr>

endif

"=========== man page 설정 ==========
func! Man()
    let sm = expand("<cword>")
    exe "!man ".sm
endfunc
nmap ,ma :call Man()<cr>

"========== socket prog header =========
nmap ,net i#include <stdio.h><cr>#include <unistd.h><cr>#include <stdlib.h><cr>#include <sys/socket.h><cr>#include <sys/types.h><cr>#include <arpa/inet.h><cr>

"========= ctl + wf <finding function form in header> ============
set path =/usr/local/include/
"Following paths are paths for TinyOS 1.x
set path =$PATH,/opt/tinyos-1.x/tos/interfaces/,/opt/tinyos-1.x/tos/sensorboards/micawb/,/opt/tinyos-1.x/tos/sensorboards/none/,/opt/tinyos-1.x/tos/sensorboards/micasb/,/opt/tinyos-1.x/tos/sensorboards/basicsb/,/opt/tinyos-1.x/tos/sensorboards/micawbdot/,/opt/tinyos-1.x/tos/types/,/opt/tinyos-1.x/tos/system/,/opt/tinyos-1.x/tos/lib/Broadcast/,/opt/tinyos-1.x/tos/lib/FS/,/opt/tinyos-1.x/tos/lib/Hood/,/opt/tinyos-1.x/tos/lib/Counters/,/opt/tinyos-1.x/tos/lib/TinySec/,/opt/tinyos-1.x/tos/lib/MintRoute/,/opt/tinyos-1.x/tos/lib/RamSymbols/,/opt/tinyos-1.x/tos/lib/OnOff/,/opt/tinyos-1.x/tos/lib/Ranging/,/opt/tinyos-1.x/tos/lib/CC2420Radio/,/opt/tinyos-1.x/tos/lib/RegistryStore/,/opt/tinyos-1.x/tos/lib/Drain/,/opt/tinyos-1.x/tos/lib/MultiHopLQI/,/opt/tinyos-1.x/tos/lib/Flash/AT45DB/,/opt/tinyos-1.x/tos/lib/Util/,/opt/tinyos-1.x/tos/lib/Deluge/TOSBoot/,/opt/tinyos-1.x/tos/lib/Deluge/TOSBoot/telosb/,/opt/tinyos-1.x/tos/lib/Deluge/TOSBoot/telos/,/opt/tinyos-1.x/tos/lib/Deluge/TOSBoot/avr/,/opt/tinyos-1.x/tos/lib/Deluge/TOSBoot/micaz/,/opt/tinyos-1.x/tos/lib/Deluge/TOSBoot/mica2dot/,/opt/tinyos-1.x/tos/lib/Deluge/TOSBoot/mica2/,/opt/tinyos-1.x/tos/lib/Deluge/,/opt/tinyos-1.x/tos/lib/Rpc/,/opt/tinyos-1.x/tos/lib/VM/sensorboards/mda300ca/,/opt/tinyos-1.x/tos/lib/VM/types/,/opt/tinyos-1.x/tos/lib/VM/components/,/opt/tinyos-1.x/tos/lib/VM/languages/motlle/mate/rep-16/,/opt/tinyos-1.x/tos/lib/VM/languages/motlle/mate/,/opt/tinyos-1.x/tos/lib/VM/languages/motlle/mate/rep-float/,/opt/tinyos-1.x/tos/lib/VM/languages/motlle/mate/,/opt/tinyos-1.x/tos/lib/VM/languages/motlle/matelib/,/opt/tinyos-1.x/tos/lib/VM/languages/motlle/standalone/,/opt/tinyos-1.x/tos/lib/VM/languages/motlle/standalone/runtime/,/opt/tinyos-1.x/tos/lib/VM/languages/motlle/standalone/,/opt/tinyos-1.x/tos/lib/Route/,/opt/tinyos-1.x/tos/lib/Xnp/,/opt/tinyos-1.x/tos/lib/DiagMsg/,/opt/tinyos-1.x/tos/lib/Drip/,/opt/tinyos-1.x/tos/lib/TinyDB/Aggregatesh,/opt/tinyos-1.x/tos/lib/TinyDB/,/opt/tinyos-1.x/tos/lib/Oscope/,/opt/tinyos-1.x/tos/platform/pch,/opt/tinyos-1.x/tos/platform/pc/CC1000Radio/,/opt/tinyos-1.x/tos/platform/telosb/,/opt/tinyos-1.x/tos/platform/telos/,/opt/tinyos-1.x/tos/platform/mica/,/opt/tinyos-1.x/tos/platform/mica128/,/opt/tinyos-1.x/tos/platform/atmega8/,/opt/tinyos-1.x/tos/platform/rene2/,/opt/tinyos-1.x/tos/platform/micaz/,/opt/tinyos-1.x/tos/platform/msp430/,/opt/tinyos-1.x/tos/platform/mica2dot/,/opt/tinyos-1.x/tos/platform/mica2dot/,/opt/tinyos-1.x/tos/platform/avrmote/,/opt/tinyos-1.x/tos/platform/mica2/,/opt/tinyos-1.x/tos/apps/LittleGuySleep/,/opt/tinyos-1.x/tos/apps/Surge/,/opt/tinyos-1.x/tos/apps/SurgeTelos/,/opt/tinyos-1.x/tos/apps/Ident/,/opt/tinyos-1.x/tos/apps/Pong/,/opt/tinyos-1.x/tos/apps/TelosADC/,/opt/tinyos-1.x/tos/apps/HighFrequencySampling/,/opt/tinyos-1.x/tos/apps/TestTinyViz/,/opt/tinyos-1.x/tos/apps/XnpCount/,/opt/tinyos-1.x/tos/apps/ReverseUART/,/opt/tinyos-1.x/tos/apps/TestDripDrain/,/opt/tinyos-1.x/tos/apps/Oscilloscope/,/opt/tinyos-1.x/tos/apps/CountRadio/,/opt/tinyos-1.x/tos/apps/TestEEPROM/Byte/,/opt/tinyos-1.x/tos/apps/TestEEPROM/ByteSpeed/,/opt/tinyos-1.x/tos/apps/TestDrip/,/opt/tinyos-1.x/tos/apps/TASKApp/,/opt/tinyos-1.x/tos/apps/TASKApp/,/opt/tinyos-1.x/tos/apps/MicaHWVerify/,/opt/tinyos-1.x/tos/apps/SimpleCmd/,/opt/tinyos-1.x/tos/apps/SenseLightToLog/,/opt/tinyos-1.x/tos/tools/java/jni/,/opt/tinyos-1.x/tos/tools/java/net/tinyos/xnp/,/opt/tinyos-1.x/tos/tools/java/net/tinyos/util/dtn/libdtn/,/opt/tinyos-1.x/tos/tools/java/net/tinyos/task/spy/,/opt/tinyos-1.x/tos/tools/src/uisp/src/,/opt/tinyos-1.x/tos/tools/src/sf/
"=========== cscope =======================
"set csprg=/usr/bin/cscope
"set csto=0
"set cst
"set nocsverb

"if filereadable("./cscope.out")
"    cs add cscope.out
"    cs add /usr/src/linux-source-2.6.7/cscope.out
"else
"    cs add /usr/src/linux-source-2.6.7/cscope.out
"endif
"set csverb

by bruce | 2009/06/15 21:55 | linux | 트랙백 | 덧글(0)

nesC파일 ctags로 찾기

ctags --regex-c='/^module[ \t]*([a-zA-Z0-9_]+)/\1/d,definition/' --regex-c='/^configuration[ \t]*([a-zA-Z0-9_]+)/\1/d,definition/' --regex-c='/^interface[ \t]*([a-zA-Z0-9_]+)/\1/d,definition/' --langmap=c:.nc.h --language-force=c -R /opt/tinyos-1.x

by bruce | 2009/06/08 11:35 | tinyos | 트랙백 | 덧글(0)

◀ 이전 페이지 다음 페이지 ▶