1)HiSilicon Compiler

arm-himix100-linux.tgz or arm-himix100-linux.tgz

#Installation instructions are included in the compiler package

There is three files in the folder: arm-himix100-linux.tar.bz2, runtime_uclibc.tgz and arm-himix100-linux.install.
The arm-himix100-linux.install is a shell script to install the arm-himix100-linux toolchain.
You can use
    source ./arm-himix100-linux.install
command line to install toolchain in /opt/hisi-linux/x86-arm.

Or you can use
    source ./arm-himix100-linux.install dirname
command line to install toolchain in the "dirname" which you Specified.

For now, you can use toolchain like arm-himix100-linux-xxx in everywhere.

#After installation, if the compiler is not recognized, you need to add the following environment variables.
export PATH=/opt/hisi-linux/x86-arm/arm-himix100-linux/bin:$PATH
export PATH=/opt/hisi-linux/x86-arm/arm-himix200-linux/bin:$PATH

2)pjsip cross-compile

https://www.pjsip.org/

https://www.alsa-project.org/wiki/Main_Page

_build.sh

#compiler setup
if [[ $ = 'arm' ]]; then
compiler=`CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++`
host=arm-linux-gnueabihf
elif [[ $ = 'himix100' ]]; then
compiler=`CC=arm-himix100-linux-gcc CXX=arm-himix100-linux-g++`
host=arm-himix100-linux
elif [[ $ = 'himix200' ]]; then
compiler=`CC=arm-himix200-linux-gcc CXX=arm-himix200-linux-g++`
host=arm-himix200-linux
else
:
fi #Preinstalled directory
install=${HOME}/_install #Delete installed directory
rm -rf ${install} #library path
pkg_config=${install}/lib/pkgconfig
lib_config=`CPPFLAGS=-I${install}/include CFLAGS=-I${install}/include LDFLAGS=-L${install}/lib` #Delete compiled directory
for i in `ls .`
do
if [ -d $i ];then
rm -rf $i
fi
done tar xvf alsa-lib-*
cd alsa-lib-*
./configure ${compiler} --prefix=${install} --host=${host}
make && make install
cd .. tar xvf alsa-utils-*
cd alsa-utils-*
./configure ${compiler} --prefix=${install} --host=${host} PKG_CONFIG_PATH=${pkg_config} ${lib_config} --enable-static --enable-shared --disable-alsamixer --disable-xmlto
touch ./alsaconf/po/t-ja.gmo
touch ./alsaconf/po/t-ru.gmo
make && make install
cd .. tar xvf pjproject-*
cd pjproject-*
./configure ${compiler} --prefix=${install} --host=${host} PKG_CONFIG_PATH=${pkg_config} ${lib_config} --enable-static --enable-shared --disable-libwebrtc
make dep
make && make install
cd .. export PATH=$PATH:${install}/bin
export LD_LIBRARY_PATH=${install}/lib:$LD_LIBRARY_PATH
export ALSA_CONFIG_PATH=${install}/share/alsa/alsa.conf

dong@ubuntu:~/pjsip$ su
Password:
root@ubuntu:/home/dong/pjsip# ./_install.sh arm
root@ubuntu:~# tar cvf _install.tar.gz _install/
root@ubuntu:~# mv _install.tar.gz ${HOME}
dong@ubuntu:~$ sudo chmod 777 _install.tar.gz

4)#Compiling samples with library files

#simpleua

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${HOME}/_install/lib/pkgconfig
export PKG_CONFIG_PATH
gcc -g simpleua.c -o simpleua `pkg-config libpjproject alsa --libs --cflags`

#siprtp (sip + rtp)

gcc -g siprtp.c -o siprtp `pkg-config libpjproject alsa --libs --cflags`

USAGE:
   siprtp [options]        => to start in server mode
   siprtp [options] URL    => to start in client mode

Program options:
   --count=N,        -c    Set number of calls to create (default:1)
   --gap=N           -g    Set call gapping to N msec (default:0)
   --duration=SEC,   -d    Set maximum call duration (default:unlimited)
   --auto-quit,      -q    Quit when calls have been completed (default:no)
   --call-report     -R    Display report on call termination (default:yes)

Address and ports options:
   --local-port=PORT,-p    Set local SIP port (default: 5060)
   --rtp-port=PORT,  -r    Set start of RTP port (default: 4000)
   --ip-addr=IP,     -i    Set local IP address to use (otherwise it will
                           try to determine local IP address from hostname)

Logging Options:
   --log-level=N,    -l    Set log verbosity level (default=5)
   --app-log-level=N       Set app screen log verbosity (default=3)
   --log-file=FILE         Write log to file FILE
   --report-file=FILE      Write report to file FILE

server:

root@ubuntu:/home/dong/pjsip_example# ./siprtp -i 172.16.23.86
::26.981 os_core_unix.c !pjlib 2.9 for POSIX initialized
::26.981 siprtp.c SIP UDP listening on 172.16.23.86:
::27.030 siprtp.c Ready for incoming calls (max=) Enter menu character:
s Summary
l List all calls
h Hangup a call
H Hangup all calls
q Quit >>> ::40.698 siprtp.c ..Call # connected in ms
l
List all calls:
Call #: CONFIRMED [duration: ::26.777]
To: <sip:172.16.23.241>;tag=PKcMBzp6yhIZQG-du1TsYkW1MPmX6L5V
Signaling quality: got 1st response in ms, connected after: ms
Stream #: audio PCMU@8000Hz, 20ms/frame, .00KB/s (.06KB/s +IP hdr)
RX stat last update: 00h:00m:.350s ago
total .03K packets .02KB received (.09KB +IP hdr)
pkt loss= (0.0%), dup= (0.0%), reorder= (0.0%)
(msec) min avg max last
loss period: 0.000 0.000 0.000 0.000
jitter : 0.000 0.451 0.750 0.500
TX stat last update: 00h:00m:.450s ago
total .03K packets .02KB sent (.09KB +IP hdr)
pkt loss= (0.0%), dup= (0.0%), reorder= (0.0%)
(msec) min avg max last
loss period: 0.000 0.000 0.000 0.000
jitter : 0.250 0.406 0.625 0.250
RTT delay : 0.595 0.686 0.793 0.793 >>>

client:

root@ubuntu:/home/dong/pjsip_example# ./siprtp -i 172.16.23.241 sip:172.16.23.86
::40.719 os_core_unix.c !pjlib 2.9 for POSIX initialized
::40.719 siprtp.c SIP UDP listening on 172.16.23.241:
::40.746 siprtp.c Making calls to sip:172.16.23.86..
::40.748 siprtp.c ....Call # connected in ms Enter menu character:
s Summary
l List all calls
h Hangup a call
H Hangup all calls
q Quit >>> l
List all calls:
Call #: CONFIRMED [duration: ::45.817]
To: sip:172.16.23.86;tag=PKcMBzp6yhIZQG-du1TsYkW1MPmX6L5V
Signaling quality: got 1st response in ms, connected after: ms
Stream #: audio PCMU@8000Hz, 20ms/frame, .00KB/s (.06KB/s +IP hdr)
RX stat last update: 00h:00m:.480s ago
total .02K packets .06KB received (.07KB +IP hdr)
pkt loss= (0.0%), dup= (0.0%), reorder= (0.0%)
(msec) min avg max last
loss period: 0.000 0.000 0.000 0.000
jitter : 0.000 0.427 0.875 0.250
TX stat last update: 00h:00m:.337s ago
total .02K packets .06KB sent (.07KB +IP hdr)
pkt loss= (0.0%), dup= (0.0%), reorder= (0.0%)
(msec) min avg max last
loss period: 0.000 0.000 0.000 0.000
jitter : 0.375 0.446 0.625 0.375
RTT delay : 0.488 0.673 0.793 0.686 >>>

5)#_install environment variables
export PATH=$PATH:$(pwd)/_install/bin
export LD_LIBRARY_PATH=$(pwd)/_install/lib:$LD_LIBRARY_PATH
export ALSA_CONFIG_PATH=$(pwd)/_install/share/alsa/alsa.conf

6)#hi3516 mpp environment variables
export LD_LIBRARY_PATH=$(pwd)/_install/mpp/lib/:$LD_LIBRARY_PATH

7)#nfs to ubuntu
1. mount /dev/sda3 /root/disk
2. minicom
3. nfs

pc:
sudo vi /etc/exports
/home/dong/_install *(rw,sync,no_root_squash,no_subtree_check)
sudo /etc/init.d/nfs-kernel-server restart
sudo /etc/init.d/rpcbind restart
sudo ifconfig eth0 172.16.23.157 broadcast 172.16.23.254 netmask 255.255.255.0

board:
ifconfig eth0 up
udhcpc -i eth0

#172.16.23.158

ifconfig eth0 172.16.23.158 broadcast 172.16.23.254 netmask 255.255.255.0
mount -t nfs -o nolock 172.16.23.157:/home/dong/_install /root/_install

8)loader soc driver

cd /_install/mpp/ko

chmod +x *

~/_install/mpp/ko # ./load3516ev300                                             
mmz_start: 0x42000000, mmz_size: 96M                                            
Usage:  ./load3516ev300 [-option] [sensor_name]                                 
options:                                                                        
    -i                       insert modules                                     
    -r                       remove modules                                     
    -a                       remove modules first, then insert modules          
    -sensor sensor_name      config sensor type [default: imx307]               
    -h                       help information                                   
Available sensors: imx307 imx327 sc4236 etc.                                    
for example: ./load3516ev300 -i -sensor imx307 -osmem 32M -board demo -yuv0 0   
                                                                                
~/_install/mpp/ko # ./load3516ev300 -i -sensor imx307 -osmem 32M -board demo -yuv0 0                                                                            
sh: 32M: bad number                                                             
mmz_start: 0x42000000, mmz_size: 96M                                            
sys_config: loading out-of-tree module taints kernel.                           
==== online_flag=0, cmos_yuv_flag=0, sensor=imx307, chip=hi3516ev300, board=dem=
==== g_quick_start_flag=0 ====                                                  
sysconfig init success!                                                         
Module himedia: init ok                                                         
Hisilicon Media Memory Zone Manager                                             
hi_osal 1.0 init success!                                                       
hi3516ev200_base: module license 'Proprietary' taints kernel.                   
Disabling lock debugging due to kernel taint                                    
load sys.ko for Hi3516EV200...OK!                                               
load tde.ko for HI3516EV200...OK!                                               
load region.ko for Hi3516EV200...OK!                                            
load vgs.ko for Hi3516EV200...OK!                                               
load vi.ko for Hi3516EV200...OK !                                               
ISP Mod init!                                                                   
load vpss.ko for Hi3516EV200...OK!                                              
load vo.ko for Hi3516EV200...OK!                                                
load hifb.ko OK!                                                                
load chnl.ko for Hi3516EV200...OK!                                              
load vedu.ko for Hi3516EV200...OK!                                              
load rc.ko for Hi3516EV200...OK!                                                
load venc.ko for Hi3516EV200...OK!                                              
load h264e.ko for Hi3516EV200...OK!                                             
load h265e.ko for Hi3516EV200...OK!                                             
load jpege.ko for Hi3516EV200...OK!                                             
load ive.ko for Hi3516EV200...OK!                                               
Load sensor_spi.ko for Hi3516EV200...OK !                                       
load hi_piris.ko OK!!                                                           
insert audio                                                                    
load mipi_rx driver successful!                                                 
~/_install/mpp/ko #

9)enable soc audio pin

audio_enable.sh

cd /sys/class/gpio
echo > export
cd gpio8
echo out > direction
sleep
echo > value

10)mpp sample

cd /root/_install/mpp/sample/audio

./sample 0 48000

Pjsip Porting to Hisilicon SOC的更多相关文章

  1. Hi3518 网络监控SOC芯片规格参数

    Hi3518 网络监控SOC芯片 视频编解码   处理器内核 ●   ARM926@ 440MHz,16KB I-Cache ,16KB D-Cache 视频编码 ●   H.264 Main Pro ...

  2. SOC,System on-a-Chip技术初步

    SOC,System on-a-Chip技术初步 S O C(拼作S-O-C)是一种集成电路,它包含了电子系统在单个芯片上所需的所有电路和组件.它可以与传统的计算机系统形成对比,后者由许多不同的组件组 ...

  3. SOC芯片的FPGA原型验证

    FPGA验证在SOC设计非常重要,一般而言,做一些RAM和FIFO的替换以及相应代码转换.具体分下面几步: 1 替换RAM,FIFO和时钟 RAM和FIFO控制器需要RAM的接口都放在了设计顶层,方便 ...

  4. 我所理解的SoC

    前阵子出去找工作,有的人不太理解,你们SoC有什么可做的,不就是找几个IP来搭积木嘛.你那个FPGA prototyping有什么可做的,不就是编一个镜像嘛. 正好,新项目,重新开始做一颗SoC.接下 ...

  5. iOS之 PJSIP蓝牙外设音频支持

    如题,蓝牙设备作为音频输出,在app中如果包含VoIP那么就要设定当连接蓝牙设备时候是否选择或者支持蓝牙输出 最近在处理一个工单就是公司的voip-app与硬件话机底座联调(蓝牙2.0)坑爹的如果是4 ...

  6. Altera SoC与Matlab的联合---第一步 软件安装与硬件测试

    参考设计:http://cn.mathworks.com/help/hdlcoder/examples/getting-started-with-hardware-software-codesign- ...

  7. IOS 之 PJSIP 笔记(二) iPJSUA 的简单使用

    上一篇在编译完之后,就很不负责的结束了,本篇就对 PJSIP 库中提供的一个示例 iPJSUA 的使用,做一个简单的介绍.也能解除很多人对官方文档的一个困扰,起码我是被困扰过了. 首先,要确保你的 P ...

  8. IOS 之 PJSIP 笔记(一) 编译多平台支持的静态库

    好久没有写博客了,这也算是我步入新工作后的第一篇技术博文吧.在进入新公司前,早就有了技术层进入下一个迭代的准备,但很多事情是意想不到的,就像我以 C# 程序员的身份面试入职的,而今却是一个全职的 IO ...

  9. iOS之 PJSIP静态库编译(二)

    咱们书接上回: 上一篇编译好了PJsip这次我们来点实战 上次编译过后就不必做别的修改因为ios平台的库都支持了. 打开工程   找到 pjsip- apps/src/pjsua/ios/ipjsua ...

随机推荐

  1. 【串线篇】spring boot对静态资源的映射规则

    WebMvcAutoConfiguration的内部类 WebMvcAutoConfigurationAdapter 其中ResourceProperties点进去 其中addResourceHand ...

  2. 用于理解C++右值引用的例子

    #include <iostream> using namespace std; void printReference (int& value) { cout << ...

  3. @property属性装饰器

    顾名思义,@property就是一个跟属性相关的装饰器, 使用了它之后,取值和赋值操作都变得简洁 from datetime import date, datetime class User: def ...

  4. mycat操作mysql示例之分库

    准备工作: 服务器192.168.96.12,centos7, jdk,mysql5.7,mycat1.6.x,navicat 搭建步骤: 1.在服务器192.168.96.12服务器上安装mysql ...

  5. FPGA设计中遇到的奇葩问题之“芯片也要看出身”

    FPGA设计中遇到的奇葩问题之“芯片也要看出身”(一) 昨夜西风凋碧树.独上高楼,望尽天涯路 2000年的时候,做设计基本都是使用Xilinx公司的Virtex和Virtex-E系列芯片.那时候Alt ...

  6. 新手立体四子棋AI教程(4)——启发式搜索与主程序

    通过前面几篇文章的学习,我们的四子棋程序已经有了框架.搜索几大部分,但是还有着不少问题,我们的程序只能迭代很有限的步骤,导致棋力低下,在这一篇我们将通过启发式搜索极大的优化搜索效率. 一.原因 我们之 ...

  7. 【HDOJ6641】TDL(数论)

    题意:定义f(n,m)是第m小的数字x,使得x>n且gcd(x,n)=1 已知 求最小的n使得 k<=1e18,m<=1e2 思路: #include<bits/stdc++. ...

  8. 201903-2 CCF 二十四点

    题面: 考场写的30分== #include<bits/stdc++.h> using namespace std; stack<int>st; stack<char&g ...

  9. [洛谷P3943]:星空(DP+最短路)

    题目传送门 题目背景 命运偷走如果只留下结果, 时间偷走初衷只留下了苦衷.你来过,然后你走后,只留下星空. 题目描述 逃不掉的那一天还是来了,小$F$看着夜空发呆.天上空荡荡的,没有一颗星星——大概是 ...

  10. json和list转换

    1.json转list List<TenantMember> tm= (List<TenantMember>)JSONArray.toCollection(JSONArray. ...