Part Number:AM3359Other Parts Discussed in Thread:ADS8688
这个例子在SDK6.03的时候,是好用的,官方的例子也都是9.01之前的方法,而9.01在make pru-adc的时候,并没有这个选项。
所以我在编译的时候,增加了Makefile_pru-adc的文件,内容如下:
# PRU-ADC build targets export TI_SDK_PATH_603=/home/lixiao/ti_sdk6.03 export TI_SDK_PATH_901=/home/lixiao/ti_sdk9.01 export LINUX_DEVKIT_PATH_603=$(TI_SDK_PATH_603)/linux-devkit export LINUX_DEVKIT_PATH_901=$(TI_SDK_PATH_901)/linux-devkit SDK_PATH_TARGET_603=$(LINUX_DEVKIT_PATH_603)/sysroots/armv7at2hf-neon-oe-linux-gnueabi SDK_PATH_TARGET_901=$(LINUX_DEVKIT_PATH_901)/sysroots/armv7at2hf-neon-oe-linux-gnueabi pru-adc: @echo ================================= @echoBuilding PRU-ADC @echo ================================= @cd example-applications; cd `find . -name "*pru-adc*"`; \ make PRU_CGT=$(LINUX_DEVKIT_PATH_901)/sysroots/x86_64-arago-linux/usr/share/ti/cgt-pru PRU_SSP=$(SDK_PATH_TARGET_901)/usr pru-adc_clean: @echo ================================= @echoCleaning PRU-ADC @echo ================================= @cd example-applications; cd `find . -name "*pru-adc*"`; \ make PRU_CGT=$(LINUX_DEVKIT_PATH_901)/sysroots/x86_64-arago-linux/usr/share/ti/cgt-pru PRU_SSP=$(SDK_PATH_TARGET_901)/usr clean pru-adc_install: @echo =================================================== @echoInstalling PRU-ADC @echo =================================================== @if [ ! -d $(DESTDIR) ] ; then \ echo "The extracted target filesystem directory doesn't exist."; \ echo "Please run setup.sh in the SDK's root directory and then try again."; \ exit 1; \ fi @install -d $(DESTDIR)/lib/firmware/pru; @install -d $(DESTDIR)/usr/bin; @cd example-applications; cd `find . -name "*pru-adc*"`; \ install -m 0644 ./PRU_ADS8688_Controller/gen/PRU_ADS8688_Controller.out \ $(DESTDIR)/lib/firmware/pru; \ install -m 0644 ./PRU_ADS8688_Interface/gen/PRU_ADS8688_Interface.out \ $(DESTDIR)/lib/firmware/pru; \ install -m 755 ./ARM_User_Space_App/gen/ARM_User_Space_App.out $(DESTDIR)/usr/bin/pru-adc-arm-app.out
但是编译的时候,出现
arm_user_space_app.c: 在函数‘capture_func’中:
arm_user_space_app.c:163:25: 编译器内部错误: 非法指令
163 | min[j] = (float)cur_min * 0.0003125;
| ^~~
0x7b985e64251f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
PRU的两个核应该是编译过了,但是这个arm_user_space_app.c的文件,编译不过,经常是编译器内部错误,这个是什么原因呢。
还有SDK9.01的时候,PRU如何配置,我在内核配置和设备树配置中启用PRU之后,可以在 /sys/class/remoteproc 下出现:
remoteproc0 remoteproc1 remoteproc2
但是在设置PRU核状态的时候,却设置不了
root@am335x-kztop:/sys/class/remoteproc/remoteproc1# echo 'start' > state
-sh: echo: write error: No such device or address
出现下面的错误,我想知道,在SDK9.01下,内核和设备树怎么配置PRU?
user5850447:
[ 211.618533] remoteproc remoteproc1: powering up 4a334000.pru[ 211.704485] remoteproc remoteproc1: Booting fw image am335x-pru0-fw, size 72904-sh: echo: write error: No such device or address[ 211.727648] pru-rproc 4a334000.pru: error -ENXIO: IRQ vring not found[ 211.727682] remoteproc remoteproc1: unable to get vring interrupt, status = -6