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.

[参考译文] AM263P4:SysConfig 不会在构建期间为 PRU 内核生成代码

Guru**** 2463330 points
Other Parts Discussed in Thread: SYSCONFIG

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1479141/am263p4-sysconfig-doesn-t-generate-code-for-the-pru-core-during-build

器件型号:AM263P4
主题中讨论的其他器件:SysConfig

工具与软件:

我将使用 Code Composer Studio 20.0.2来处理由3个 RF5内核和2个 PRU 内核组成的系统工程。 每个 R5F 内核工程都有一个 SysConfig 文件、这些工程已正确生成这些工程的代码。 我最近在 SysConfig 文件中添加到 PRU 项目。 目前、我已经向 PRU 的 SysConfig 添加了1个 RTI 和1个 GPIO 进行测试。 在清理和构建 PRU 项目时、该项目会正确编译并显示"Generated Source"的文件夹、但该文件夹中不存在代码。 在查看 Output 时、没有显示任何提及 SysConfig 代码生成的步骤。  与从 SysConfig 正确生成代码的 R5F 工程相比、我已尽力验证所有设置、但在 SysConfig 实施方面、PRU 和 R5F 没有任何差异。

PRU SysConfig 文件

/**
 * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
 * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
 * @cliArgs --device "AM263Px" --part "AM263P4" --package "ZCZ_F" --context "icss_m0_pru0" --product "MCU_PLUS_SDK_AM263Px@10.01.00"
 * @v2CliArgs --device "AM263P4" --package "NFBGA (ZCZ-F)" --context "icss_m0_pru0" --product "MCU_PLUS_SDK_AM263Px@10.01.00"
 * @versions {"tool":"1.22.0+3893"}
 */

/**
 * These are the reserved peripherals and settings in this configuration
 */
const iGPIO1        = scripting.addPeripheral("GPIO");
iGPIO1["0"].$assign = "PR0_PRU0_GPIO0";
iGPIO1.$name        = "GPO_0";
const iRTI1         = scripting.addPeripheral("RTI");
iRTI1.$name         = "Timer0";
iRTI1.$assign       = "RTI0";

构建输出:

[0]**** Build of configuration Debug for project 50019F-COD005_PRU_0 ****
[1]"C:\\ti\\ccs2002\\ccs\\utils\\bin\\gmake" -k -j 20 all -O 
 
[2]Building file: "../main.c"
[3]Invoking: PRU Compiler
[4]"C:/ti/ti-cgt-pru_2.3.3/bin/clpru" -Ooff --include_path="C:/ti/ccs2002/ccs/ccs_base/pru/include" --include_path="C:/Software/50019F-HCS/50019F-COD001_System_Project/50019F-COD005_PRU_0_Project" --include_path="C:/ti/ti-cgt-pru_2.3.3/include" --include_path="C:/ti/mcu_plus_sdk_am263px_10_01_00_31/source" -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little -k --preproc_with_compile --preproc_dependency="main.d_raw" --include_path="C:/Software/50019F-HCS/50019F-COD001_System_Project/50019F-COD005_PRU_0_Project/Debug/syscfg"  "../main.c"
[5]Finished building: "../main.c"
 
[6]Building file: "../HCS_Current_Servo.c"
[7]Invoking: PRU Compiler
[8]"C:/ti/ti-cgt-pru_2.3.3/bin/clpru" -Ooff --include_path="C:/ti/ccs2002/ccs/ccs_base/pru/include" --include_path="C:/Software/50019F-HCS/50019F-COD001_System_Project/50019F-COD005_PRU_0_Project" --include_path="C:/ti/ti-cgt-pru_2.3.3/include" --include_path="C:/ti/mcu_plus_sdk_am263px_10_01_00_31/source" -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little -k --preproc_with_compile --preproc_dependency="HCS_Current_Servo.d_raw" --include_path="C:/Software/50019F-HCS/50019F-COD001_System_Project/50019F-COD005_PRU_0_Project/Debug/syscfg"  "../HCS_Current_Servo.c"
[9]"../main.c", line 127: warning #112-D: statement is unreachable
[10]Finished building: "../HCS_Current_Servo.c"
 
[11]Building target: "50019F-COD005_PRU_0.out"
[12]Invoking: PRU Linker
[13]"C:/ti/ti-cgt-pru_2.3.3/bin/clpru" -Ooff -g --diag_warning=225 --diag_wrap=off --display_error_number --endian=little -k -z -m"empty.Debug.map" -i"C:/ti/ti-cgt-pru_2.3.3/lib" -i"C:/ti/ti-cgt-pru_2.3.3/include" --reread_libs --diag_suppress=10063-D --diag_wrap=off --display_error_number --warn_sections --xml_link_info="50019F-COD005_PRU_0_linkInfo.xml" --ram_model -o "50019F-COD005_PRU_0.out" "./HCS_Current_Servo.obj" "./main.obj" "../linker.cmd"  -llibc.a 
[14]<Linking>
[15]warning #10210-D: creating ".stack" section with default size of 0x100; use the -stack option to change the default size
[16]Finished building target: "50019F-COD005_PRU_0.out"
 
[17]Building secondary target: "PRU_0.h"
[18]Invoking: PRU Hex Utility
[19]"C:/ti/ti-cgt-pru_2.3.3/bin/hexpru" --linkerfill --diag_wrap=off --array --array:name_prefix=PRU_0_image -o "PRU_0.h"  "50019F-COD005_PRU_0.out" 
[20]Translating to Array format...
[21]   "50019F-COD005_PRU_0.out" .text:_c_int00* ==> .text:_c_int00*
[22]   "50019F-COD005_PRU_0.out" .text ==> .text
[23]Finished building secondary target: "PRU_0.h"
 
[24]**** Build Finished 

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Nathan:

    PRU 工程在 XDT (后端模板文件)文件中没有用于从 syscfg 生成代码的链接代码。

    鉴于大多数 PRU 特性都通过 C/汇编手动编码、我们不会将其包含在我们的产品中。

    我内部检查了没有记录计划也支持它。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    从 SOC 的角度来看、PRU 被视为硬件模块、如 ADC PWM 等、因此不适用为此提供专用的 SysConfig。

    请将其视为 R5F 内核可以使用的资源、并使用 syscgf 进行配置。

    可以使用 R5F syscfg 来配置 PRU 引脚多路复用以及 IEP 和 MII 配置。