TI中文支持网
TI专业的中文技术问题搜集分享网站

移植am335蓝牙协议栈出现错误

下载AM335xBluetopiaLinuxProduction-4.0.3.0.1.0后 ,

修改了setup-bt  的

# Path to local toolchain installation
 export TOOLCHAIN_PATH=~/ti-processor-sdk-linux-am335x-evm-03.02.00.05/linux-devkit/sysroots/# Path to SDK compiled kernel
 export KERNEL_PATH=~/ti-processor-sdk-linux-am335x-evm-03.02.00.05/board-support/linux-4.4.32+gitAUTOINC+adde2ca9f8-gadde2ca9f8/

修改其中的build/proj  toochain-defs.mak文件中的

TOOLCHAIN_PATH_NATIVE=$(TOOLCHAIN_PATH)/x86_64-arago-linux/
TOOLCHAIN_PATH_TARGET=$(TOOLCHAIN_PATH)/armv7ahf-neon-linux-gnueabi/

在build目录下make出现:

LinuxHFRM_AG.c:(.text+0x4bcc): undefined reference to `PM_VS_DisableWBS'
LinuxHFRM_AG.c:(.text+0x5c48): undefined reference to `PM_VS_EnableWBS'
collect2: error: ld returned 1 exit status
make: *** [../BluetopiaPM/bin/LinuxHFRM_AG] Error 1

此错误是否和上面的路径有关??

求大神解答

Viki Shi:

你用的是什么蓝牙芯片,wilink?

Eggsy Pang:

配置PM的环境有问题,查看:

http://processors.wiki.ti.com/index.php/TI_Bluetooth_Stack_for_WL18xx_-_Build_Process

Modification of the PM build environment

Wayen zhang:

回复 Eggsy Pang:

蓝牙芯片:cc2560b

蓝牙协议栈版本:TI Bluetooth Linux Add-On for AM335x EVM, AM437x EVM and BeagleBone With WL18xx and CC256x(v4.0.3.0.1.0 )http://www.ti.com/tool/TI-BT-STACK_LINUX-ADDON

按照如下http://processors.wiki.ti.com/index.php/TI_Bluetooth_Stack_for_WL18xx_-_Getting_Started_Guide修改:1.setup-bt # Path to local toolchain installationexport TOOLCHAIN_PATH=/home/jonet/zhangwei/sdk/linux-devkit/sysroots/

# Path to SDK compiled kernelexport KERNEL_PATH=/home/jonet/yangyang/am335x/linux-4.4.12/

2. proj/proj-defs.mak#DEVICE = wl18xxDEVICE = cc256x

3. proj/toochain-defs.makTOOLCHAIN_PATH_NATIVE=$(TOOLCHAIN_PATH)/x86_64-arago-linux/TOOLCHAIN_PATH_TARGET=$(TOOLCHAIN_PATH)/armv7ahf-neon-linux-gnueabi/

source configure.shmake

创建bt-en.sh:echo 45 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio45/direction echo 1 > /sys/class/gpio/gpio45/value echo "Done enabling BT" gpio="nshutdown_gpio=45"tty="tty=/dev/ttyO4"flow="flow_cntrl=1"baud_rate="baud_rate=3000000"mkdir /home/root/tibt echo $gpio > /home/root/tibt/configecho $tty >> /home/root/tibt/config echo $flow >> /home/root/tibt/config echo $baud_rate >> /home/root/tibt/config

Init-scripts:CC256XB-BT-SP:(http://www.ti.com/tool/cc256xb-bt-sp?keyMatch=cc256xb-bt-sp&tisearch=Search-EN-Everything)initscripts-TIInit_6.7.16_bt_spec_4.1.bts

运行示例应用程序:#./SS1BTPM&#./LinuxSPPMSPPM>Initialize 1SPPM>SetDevicePower 1echo 45 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio45/directionecho 0 > /sys/class/gpio/gpio45/valueecho 1 > /sys/class/gpio/gpio45/valueecho 0 > /sys/class/gpio/gpio45/valueecho 1 > /sys/class/gpio/gpio45/valueBT COMM PORT (/dev/ttyO4): 1DEVM_PowerOnDevice() Failure: -4, Unknown Error.Function Error。

Wayen zhang:

回复 Viki Shi:

蓝牙芯片:cc2560b

蓝牙协议栈版本:TI Bluetooth Linux Add-On for AM335x EVM, AM437x EVM and BeagleBone With WL18xx and CC256x(v4.0.3.0.1.0 )http://www.ti.com/tool/TI-BT-STACK_LINUX-ADDON

按照如下http://processors.wiki.ti.com/index.php/TI_Bluetooth_Stack_for_WL18xx_-_Getting_Started_Guide修改:1.setup-bt # Path to local toolchain installationexport TOOLCHAIN_PATH=/home/jonet/zhangwei/sdk/linux-devkit/sysroots/

# Path to SDK compiled kernelexport KERNEL_PATH=/home/jonet/yangyang/am335x/linux-4.4.12/

2. proj/proj-defs.mak#DEVICE = wl18xxDEVICE = cc256x

3. proj/toochain-defs.makTOOLCHAIN_PATH_NATIVE=$(TOOLCHAIN_PATH)/x86_64-arago-linux/TOOLCHAIN_PATH_TARGET=$(TOOLCHAIN_PATH)/armv7ahf-neon-linux-gnueabi/

source configure.shmake

创建bt-en.sh:echo 45 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio45/direction echo 1 > /sys/class/gpio/gpio45/value echo "Done enabling BT" gpio="nshutdown_gpio=45"tty="tty=/dev/ttyO4"flow="flow_cntrl=1"baud_rate="baud_rate=3000000"mkdir /home/root/tibt echo $gpio > /home/root/tibt/configecho $tty >> /home/root/tibt/config echo $flow >> /home/root/tibt/config echo $baud_rate >> /home/root/tibt/config

Init-scripts:CC256XB-BT-SP:(http://www.ti.com/tool/cc256xb-bt-sp?keyMatch=cc256xb-bt-sp&tisearch=Search-EN-Everything)initscripts-TIInit_6.7.16_bt_spec_4.1.bts

运行示例应用程序:#./SS1BTPM&#./LinuxSPPMSPPM>Initialize 1SPPM>SetDevicePower 1echo 45 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio45/directionecho 0 > /sys/class/gpio/gpio45/valueecho 1 > /sys/class/gpio/gpio45/valueecho 0 > /sys/class/gpio/gpio45/valueecho 1 > /sys/class/gpio/gpio45/valueBT COMM PORT (/dev/ttyO4): 1DEVM_PowerOnDevice() Failure: -4, Unknown Error.Function Error.

Eggsy Pang:

回复 Wayen zhang:

DEVM_PowerOnDevice() Failure代表CC2560还没上电或者引脚使能,看到你用45号 引脚来使能它,有没有测过这个引脚的电压?

Wayen zhang:

回复 Eggsy Pang:

测过 ,对这个gpio写1电压测得3.3v。写0时变为0V。

2560b 可以用这个蓝牙协议栈版本么——TI Bluetooth Linux Add-On for AM335x EVM, AM437x EVM and BeagleBone With WL18xx and CC256x(v4.0.3.0.1.0 )http://www.ti.com/tool/TI-BT-STACK_LINUX-ADDON

256xc可以直接替换2560b么 ?

Eggsy Pang:

回复 Wayen zhang:

可以用这个版本,

但是CC2560的所有IO是1.8V的,给3.3V是有问题

da qin zheng sheng:

回复 Wayen zhang:

串口波特兰率很高啊!

Wayen zhang:

回复 Eggsy Pang:

io是1.8, 3.3是经过一个电平转换后测量的值。出现这种错误和gpio关系最大?

Wayen zhang:

回复 da qin zheng sheng:

波特率设过115200,问题依旧出现

赞(0)
未经允许不得转载:TI中文支持网 » 移植am335蓝牙协议栈出现错误
分享到: 更多 (0)