家裡還是要有linux才行...
所以買了adata sc860 usb3.2 ssd 來裝。
pchome 特價 240G, 999
安裝 OK,但是很奇怪,SSD 端是 type C 頭,另一端雖然有 Type A 跟 Type C 頭。但是只有 type C 頭偵測得到開機碟。
-- 是因為當初安裝就是用 type C 頭?
速度果很快,比USB 3.1, 3.5" 外接硬碟還快。
安裝 ubuntu 18.03, Mate, cuda10.1 + pytorch 共用掉 20G。
原來還發生Power Off 卡住的狀況,後來沒有發生了。
實際的 Read/Write 速度沒有測,在另一個 blog,有用 windows 10 測過,Write speed 約 110MB/s
在這裡,用 ubuntu,, 開機是很快沒錯。
2020/6/29
2020/6/24
conf , in linux kernel source
make menuconfig, qconfig, xconfig .. etc 都是 call scripts/kconfig 下的 tool
scripts/kconfig 是一個獨立的tools, 包含一堆 conf.
Makefile 有說明裡面的執行檔 (不是 target..)
linux 的 kconfig 比較大,buildroot 的 kconfig 比較小,可以從buildroot 的 kconfig 看起。
scripts/kconfig 是一個獨立的tools, 包含一堆 conf.
Makefile 有說明裡面的執行檔 (不是 target..)
# =========================================================================== # Shared Makefile for the various kconfig executables: # conf: Used for defconfig, oldconfig and related targets # nconf: Used for the nconfig target. # Utilizes ncurses # mconf: Used for the menuconfig target # Utilizes the lxdialog package # qconf: Used for the xconfig target # Based on Qt which needs to be installed to compile it # gconf: Used for the gconfig target # Based on GTK+ which needs to be installed to compile it這幾個 conf 有共用的部份。
- conf : 沒有 ui,就是單純run check .config
- mconf: 用lxdialog 這個 library 做出 ui 的 config
linux 的 kconfig 比較大,buildroot 的 kconfig 比較小,可以從buildroot 的 kconfig 看起。
Makefile : target with variable %
kernel 或是一堆使用 menuconfig 的 project 在 make 之前都要 make XXX_config 或是 make XXX_defconfig。
然後這個 XXX_config , XXX_defconfig 還很有趣的是某個 file 的 filename..
所以是怎麼動態知道 filename as target 的呢?
就是用 Makefile 的 萬用配對符號: %
然後這個 XXX_config , XXX_defconfig 還很有趣的是某個 file 的 filename..
所以是怎麼動態知道 filename as target 的呢?
就是用 Makefile 的 萬用配對符號: %
%_config: $(BOARD_DIR)/config/%_config
@$(GEN_CONF) $(TOPDIR)/build/kconfig/conf --defconfig=$<
當然也有先把conf 下所有的 _defconfig 找出來做成target 的方法..Makefile and shell script : echo command out
有時候,希望 Makefile 和 shell script 把執行當時的 command 印出來,
這樣比較容易trace 變數
shell script 的話,參考 這一篇..
在 shell script 的開頭加上..
Makefile 的話,一般都會印出執行的 command,除非在 command rule 之前有加 '@' 符號。
所以記得,把 '@' 刪除。
另外,make 的 option '-s' 也是 silenct 的意思,ref: make options。
所以要記得把 -s 刪掉。
這樣比較容易trace 變數
shell script 的話,參考 這一篇..
在 shell script 的開頭加上..
set -x也可用
bash -x myscipt.sh也可以
Makefile 的話,一般都會印出執行的 command,除非在 command rule 之前有加 '@' 符號。
所以記得,把 '@' 刪除。
另外,make 的 option '-s' 也是 silenct 的意思,ref: make options。
所以要記得把 -s 刪掉。
Makefile : about folders.
Makefile 中檢查folder 在不在
這一個 是動作不多的時候,利用 "一行" 的特性..
另外這一篇 前同事的 blog,是一般的,用 wildcard檢查好 create...
還有一個,看起來好像比較笨..在Makefile 中 call shell command 來做...
這一個 是動作不多的時候,利用 "一行" 的特性..
foo.bak: foo.bar
echo "foo"
if [ -d "~/Dropbox" ]; then echo "Dir exists"; fi
或
oo.bak: foo.bar
echo "foo"
if [ -d "~/Dropbox" ]; then \
echo "Dir exists"; \
fi
另外這一篇 前同事的 blog,是一般的,用 wildcard檢查好 create...
OUTPUT_PATH := test
all:
ifeq "$(wildcard $(OUTPUT_PATH))" ""
mkdir $(OUTPUT_PATH)
echo "directory not existed"
else
echo "directory existed"
endif
還有一個,看起來好像比較笨..在Makefile 中 call shell command 來做...
ifeq ($(shell [ -d $(OUTPUT_PATH) ] && echo y), y)
echo "directory existed"
else
echo "directory not existed"
endif
2020/6/23
mkfs.cramfs in 18.04
if [ ${OS_VERS_MAJ} -lt 18 ]; then
INSTALLPKGS+=(mtd-tools)
INSTALLPKGS+=(cramfsprogs)
else
INSTALLPKGS+=(mtd-utils)
INSTALLPKGS+=(util-linux)
fi
原來 mkfs.cramfs 在不同的 ubuntu 版本,在不同的 package 裡..2020/6/15
OpenRadar ..使用說明..
OpenRadar 這個 python 專案,真的很佛心。
把TI 沒給的東西都寫出來了,還是用 python,不必用 matlab.
雖然只是基礎而已,已經很有幫助了。
這個 Project 是用 python 來分析 DCA1000EVM 送出的 LVDS (ADC Data),也是是 raw data
他包含了:
所以 AWR1642 的 command 要自己做..用 uart 連線,送 config command..
基本的處理是在 Presense Applied Radar/basic 目錄下的 jupyter file (*.ipyb)
可以看到每個 sample code,一開始都是用np.load('XXX') 讀取預存資料。
所以 log DCA1000EVM 的部份,要另外做。
可以參考 dataloader/adc.py 的註解:
但是其中沒說明 AWR1642 chirp config 的內容,要和 adc.py 的參數。還有 orgnize( ) 的參數一致。
這部份,就要看 adc.py 的 source code,和blog 前面幾篇的內容。
因為 adc.py 要靠這些參數決定一個 frame 是多少packet。
同時,oragnize( ) 也需要這些參數才知道怎嬷分割 資料..
另外,adc.py 中,對 DCA1000EVM 的命令,並不會啟動udp 資料。
所以要照 blog 的修改,加上start_record( ) command .
大概就是這樣 (為什麼不修好?)
最後,總結 OpenRadar 這格 project 的使用方法...
把TI 沒給的東西都寫出來了,還是用 python,不必用 matlab.
雖然只是基礎而已,已經很有幫助了。
這個 Project 是用 python 來分析 DCA1000EVM 送出的 LVDS (ADC Data),也是是 raw data
他包含了:
- 送 command 給 DCA1000EVM,開始/停止 loggin
- 讀取 UDP 封包,分析,組合成一個 frame data
- rage fft, doppler fft, angle of arrival function library
所以 AWR1642 的 command 要自己做..用 uart 連線,送 config command..
基本的處理是在 Presense Applied Radar/basic 目錄下的 jupyter file (*.ipyb)
- Range - COMPLETED.ipynb : 畫出一個 chirp recived data的 range fft
- Doppler - COMPLETED.ipynb : 畫出一個 frame 的 range-doppler diagram
- Angle of Arrival - COMPLETED.ipynb : 畫出一個 frame 的 object 的 angle of arrival diagram
可以看到每個 sample code,一開始都是用np.load('XXX') 讀取預存資料。
所以 log DCA1000EVM 的部份,要另外做。
可以參考 dataloader/adc.py 的註解:
General steps are as follows:
1. Power cycle DCA1000 and XWR1xxx sensor
2. Open mmWaveStudio and setup normally until tab SensorConfig or use lua script
3. Make sure to connect mmWaveStudio to the board via ethernet
4. Start streaming data
5. Read in frames using class
Examples:
dca = DCA1000()
adc_data = dca.read(timeout=.1)
frame = dca.organize(adc_data, 128, 4, 256)
這樣就取得一個 frame 的資料。但是其中沒說明 AWR1642 chirp config 的內容,要和 adc.py 的參數。還有 orgnize( ) 的參數一致。
這部份,就要看 adc.py 的 source code,和blog 前面幾篇的內容。
因為 adc.py 要靠這些參數決定一個 frame 是多少packet。
同時,oragnize( ) 也需要這些參數才知道怎嬷分割 資料..
另外,adc.py 中,對 DCA1000EVM 的命令,並不會啟動udp 資料。
所以要照 blog 的修改,加上start_record( ) command .
大概就是這樣 (為什麼不修好?)
最後,總結 OpenRadar 這格 project 的使用方法...
- checkout 出來 -- 因為依照說明,用 pip install default packcage 的話,adc.py 的 chirp 參數沒辦法修改
- 修改source 的 module loading path. 這樣才 import 得到正確的 source
- 依照AWR1642 的 chirp config,修改 adc.py 的chirp parameters
- 把 start, stop record command 加到 adc.py 中
- uart 連接 AWR1642, 送出config
- follow adc.py 的example,config. start_record, 讀取 frame,存檔
- 參考basic/*.ipynb, 讀取剛剛存檔的內容,做 range, doppler, aoa
訂閱:
文章 (Atom)