GCC单独编译host/examples/ tx_waveforms.cpp

1.编译

需要链接uhd库和boost_program_options库以及boost_thread库:

g++ tx_waveforms.cpp -o a -luhd -lboost_program_options -lboost_thread

运行:

 ./txrx --tx-rate 1e6 --rx-rate 1e6 --tx-freq 1e9 --rx-freq 1e9 --ampl 1 --wave-type CONST --type float

2.指定接收天线

锁定TX/RX接收:./rx --rate 1e6 --freq 1e9 --ant TX/RX

通过--ant TX/RX指定TX/RX接收,通过--ant RX2指定RX2接收



3.指定子板

指定子板:--subdev A:0

由于只有一个子板,只能选择A:0