This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3359: 最新的SDK9.01中,pru-adc-1.0的例子,make不通过,编译器错误

Part Number: AM3359
Other Parts Discussed in Thread: ADS8688

这个例子在SDK6.03的时候,是好用的,官方的例子也都是9.01之前的方法,而9.01在make pru-adc的时候,并没有这个选项。

所以我在编译的时候,增加了Makefile_pru-adc的文件,内容如下:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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 =================================
@echo Building 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 =================================
@echo Cleaning PRU-ADC
@echo =================================
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

但是编译的时候,出现 

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?

  • [ 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