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.
工具与软件:
您好、
我正在尝试在 WSL2上构建 PRU 示例、但遇到了一些问题。
make[3]: usr/bin/clpru: No such file or directory
这是输出上的错误消息...
当我尝试在.sh 脚本之后使用 export 命令进行构建时、我在 WSL2上遇到了此错误。
Seth
附:.sh 脚本构建/usr/bin/*和 usr/share/*、但我不能使用:export PRU_CGT=usr/、并让它理解相关文件及其位置。 这是一个限制吗? WSL2是否支持 PRU 示例的构建?
我尝试在此处针对 armhf 机器(例如带 PRU 作为协处理器的 AM335x)清除.sh 脚本。
我尝试在 WSL2中使用.bin 文件、但没有成功、即、这就是为什么我更改为可用的.sh 文件的原因。
Seth
您好!
我假设您正在尝试在 PRU 软件支持包(PSSP)中构建 PRU 示例? 如果没有、请明确说明您尝试构建的示例以及示例的位置。
假设您使用的是 PSSP。 让我们看看 RPMSg 示例的 makefile:
https://git.ti.com/cgit/pru-software-support-package/pru-software-support-package/tree/examples/am335x/PRU_RPMsg_Echo_Interrupt 0/Makefile
这里使用的似乎是/bin/clpru:
# Invokes the linker (-z flag) to make the .out file $(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE) @echo '' @echo 'Building target: $@' @echo 'Invoking: PRU Linker' $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS) @echo 'Finished building target: $@' # Invokes the compiler on all c files in the directory to create the object files $(GEN_DIR)/%.object: %.c @mkdir -p $(GEN_DIR) @echo '' @echo 'Building file: $<' @echo 'Invoking: PRU Compiler' $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
因此、这表明您没有正确设置 PRU_CGT 变量(即 PRU 代码生成工具的路径)。
例如、在 Linux 计算机中、我将 PRU CGT 下载到以下目录:
~/ti/ti-cgt-pru_2.3.3
因此、在构建 PRU 固件之前、我需要按照该 Makefile 顶部错误消息中"Desktop Linux"的步骤操作:
$ export PRU_CGT=/path/to/ti/ti-cgt-pru_2.3.3
此致、
Nick
~做了。
我使用了相对路径和绝对路径。 没有以下条件、这两种模式似乎都不起作用
// My attempt to try to explain a bit better export PRU_CGT=~/MY_PATH/TO_THE/clpru // and etc...
谢谢你、先生。
Seth