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.

[参考译文] TMS320F280025C:sysconfig:嵌入式 CLI 参数不工作

Guru**** 2460850 points
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1070122/tms320f280025c-sysconfig-embedded-cli-parameters-not-working

部件号:TMS320F280025C
“线程:C2000WAREsysconfig”中讨论的其它部件

您好,

我正在使用 CSS 11.1.0.00011以及 C2000Ware 4.00.00.00。

我将 sysconfig 集成到了我的项目中。 在 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 "F28002x" --package "80QFP" --part "F28002x_80QFP" --product "C2000WARE@3.01.00.00"
 * @versions {"tool":"1.11.0+2225"}
 */

/**
 * Import the modules used in this configuration.
 */
const can   = scripting.addModule("/driverlib/can.js", {}, false);
const can1  = can.addInstance();
const gpio  = scripting.addModule("/driverlib/gpio.js", {}, false);
const gpio1 = gpio.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
can1.$name                 = "CAN1";
can1.msgObjsUsed           = [1];
can1.can.$assign           = "CANA";
can1.can.can_rxPin.$assign = "ball.38";
can1.can.can_txPin.$assign = "ball.49";
can1.msgObj1.$name         = "msgObj0";
can1.msgObj1.msgID         = 123;
can1.msgObj1.flags         = ["CAN_MSG_OBJ_RX_INT_ENABLE","CAN_MSG_OBJ_USE_ID_FILTER"];

gpio1.direction         = "GPIO_DIR_MODE_OUT";
gpio1.qualMode          = "GPIO_QUAL_ASYNC";
gpio1.writeInitialValue = true;
gpio1.$name             = "CAN1_SILENTMODE";
gpio1.gpioPin.$assign   = "ball.3";

根据 CSS/Csysconfig 的生成,默认参数被插入 syscfg-file:@clargs --device“F28002x”--package“80QFP”--part“F28002x_80QFP”--product“C2000WARE@3.01.00.00”

但是,调用 sysconfig 生成时这些参数似乎被忽略(忽略为代中忽略,我不希望它们在 CLI 调用中显示):

Building file: "../LAUNCHXL-F280025C.syscfg"
Invoking: SysConfig
"C:/ti/ccs1110/ccs/utils/sysconfig_1.11.0/sysconfig_cli.bat" -s "C:/ti/C2000Ware_4_00_00_00/.metadata/sdk.json" -d "F28002x" --script "C:/_repos/arculus/sw/03_SW_Component/arculus_bms/LAUNCHXL-F280025C.syscfg" -o "syscfg" --compiler ccs
Running script...
subdir_rules.mk:9: recipe for target 'build-2008392257' failed
Error: cannot set '$assign' to 'ball.38': No option named ball.38 defined, valid options are
[...]

当然,我可以在项目的内部版本配置中指定命令行参数,但这将是多余的。

这是一个错误,还是我在做/期望出错?

谢谢,
安德烈亚斯

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

    安德烈亚斯您好

    我对您的问题有点困惑。 您是否在提到为什么 CLI args (C2000WARE@3.01.00.00 与 C2000WARE@4.00.00.00)中的 C2000ware 版本不匹配?  

    这似乎不是一个巨大的问题,控制台输出证实您使用的是最新的 C2000ware 版本。 我自己也看过几次不同项目的相关情况,所以我不知道到底是什么原因。 有许多项目显示为4.00.00.00,但偶尔我会在4.00.00.00项目上获得3.01.00.00。 尽管如此,这不会影响项目所使用的版本,因此这不应该是一个担忧。

    如果您是指另一个问题,请告诉我。

    此致,

    彼得

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

    彼得,你好。

    否,C2000Ware 版本不是问题所在。

    sysconfig 的生成过程失败:错误:无法将'$assign'设置为'ball.38':未定义名为 ball.38的选项,有效选项为

    但是,当通过 sysconfig 属性显式配置--package 80QFP --part F28002x_80QFP 时,它可以:

    因为这样,CLI 就会被显式参数调用。 在这种情况下,生成的是正确的包件和部件。

    "C:/ti/ccs1110/ccs/utils/sysconfig_1.11.0/sysconfig_cli.bat" -s "C:/ti/C2000Ware_4_00_00_00/.metadata/sdk.json" -d "F28002x" --script "C:/_repos/arculus/sw/03_SW_Component/arculus_bms/LAUNCHXL-F280025C.syscfg" -o "syscfg" --package 80QFP --part F28002x_80QFP --compiler ccs
    Running script...
    Validating...
    Generating Code (LAUNCHXL-F280025C.syscfg)...
    [...]
    Finished building: "../LAUNCHXL-F280025C.syscfg"

    我不想在内部版本配置中明确定义此信息,因为此信息是多余的:它已经存储在 sysconfig 中。

    我认为,这也不是必要的,因为 CLI 指出:

    "C:/ti/ccs1110/ccs/utils/sysconfig_1.11.0/sysconfig_cli.bat" --help
    [...]
    Note that the all arguments other than '--help' and '--version' may also be
     specified via the script with an embedded @cliArgs comment directive.
     E.g. // @cliArgs -d MSP432P401R
    
     If an argument is embedded in a script and explicitly specified via the CLI
     then precedence is given to the CLI arguments. Additionally, specifying
     "--board" or "--device" on the CLI will override any "--board" and "--device"
      arguments specified in the script.

    我不会在新一代使用@ë n 剪贴画。 这一点现在更清楚吗?

    巴西,
    安德烈亚斯

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

    安德烈亚斯您好

    感谢您的澄清。 虽然在 syscfg 文件和 build config 中指定此信息似乎是多余的,但通常是这样做的。 请参阅以下指定将软件包和部件信息放入内部版本配置的常见问题解答: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/910829/faq-how-do-i-add-sysconfig-support-pinmux-and-peripheral-initialization-to-an-existing-driverlib-project

    在 syscfg 文件中,CLI 参数生成确实存在潜在的错误。 让我联系更多信息。 同时,您的项目似乎可以使用生成配置中指定的软件包和部件信息进行编译,因此这将是目前的首选方法。  

    此致,

    彼得

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

    只要您通过-device,它就会假定您正在传递中的所有内容,并且它不会查看参数。

    与项目属性相同。 从项目属性中删除设备和软件包信息,然后它将查看文件中的参数。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="280106" url="~ë/support/MICC-微控制器-组/CC2000 /f/C2000 -微控制器-论坛/1070122/tms320f280025c-sysconfig-嵌入式 CLI-parameters -不工作/3959768 #3959768 "]

    只要您通过-device,它就会假定您正在传递中的所有内容,并且它不会查看参数。

    与项目属性相同。 从项目属性中删除设备和软件包信息,然后它将查看文件中的参数。

    [/引用]

    谢谢你尼玛,这很有用。

    在某种程度上,已经记录了以下内容:

    Additionally, specifying "--board" or "--device" on the CLI will override any "--board" and "--device" arguments specified in the script.

    但是,我希望看到帮助输出正在更新,以同时提及--part 和--package 的覆盖。