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.

[参考译文] TMS570LC4357:如何配置可变长度数组

Guru**** 2458170 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1115951/tms570lc4357-how-to-configure-variable-length-arrays

器件型号:TMS570LC4357

大家好、

以下是客户提出的问题、可能需要您的帮助:

我注意到了文件 vla_alloc.c、但没有参与编译。 如果我想让该文件参与编译、是否需要配置 HAL_Cogen? 如何配置?

谢谢、此致

耶鲁李

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="514648" URL"~/support/microcontrollers/arm-based microcontrollers-group/arm-based microcontrollers/f/arm-based microcontrollers-forume/1115951/tms570lc4357-how-configure-variable -length-array"]如果我希望此文件参与编译、是否需要配置 HAL_Cogen?[引用/引用]

    不可以。这是您自己的 C 代码文件。

    [~引语 userid="514648" URL"/support/microcontrollers/arm-based microcontrollers-group/arm-based microcontrollers/f/arm-based microcontrollers-forume/1115951/tms570lc4357-how-configure-variable 长度-array"]如何配置?

    右键点击工程并选择"Add Files"。  选择要添加的文件后、将弹出另一个对话框、允许您选择复制文件或链接文件。

    有关添加/链接文件的更多信息、请参阅:
    processors.wiki.ti.com/.../Projects_and_Build_Handbook_for_CCS

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

    您能否说明客户使用的编译器版本?

    我上次使用 TI ARM 编译器 v20.2.0进行检查时,当  源代码中使用变量长度数组时,编译器会自动插入对_VLA 和__VLA dealloc 的调用。 请参见 MSP-EXP432P401R:栈上的本地数组(而不是堆上的 alloc'ed)

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

    您好、QJ Wang、

    感谢您的帮助!  我已将这些内容同步到客户。

    谢谢、此致

    耶鲁李

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

    切斯特、您好!

    感谢您的帮助!

    谢谢、此致

    耶鲁李