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:CCS/TMS570LC4357:使用 ARM 编译器9.3.1进行编译

Guru**** 2456490 points
Other Parts Discussed in Thread: TMS570LC4357, HALCOGEN

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/994715/tms570lc4357-ccs-tms570lc4357-compile-with-arm-compiler-9-3-1

器件型号:TMS570LC4357
主题中讨论的其他器件: HALCOGEN

大家好、

我尝试 将 ARM 编译器9.3.1用于 TMS570LC43电路板、但编译失败、因为  ARM 编译器9.3.1库是在 LE 中编译的。

如果有人能帮我解决这个问题、我将不胜感激。

在错误日志下方:

C:/ti/ccs1011/ccs/tools/compiler/gcc-arm-none-eabi-9-2020-q2-update-win32/bin/arm-none-eabi-gcc-9.3.1.exe -mfpup=vfpv3-D16 -O2 -g -gdwarf-3 -gstrict-dwarf -Wall -speces="nosys.specs"-mbig-endian -Mcpu=cortex-r5 -wl、-Map、"TMS570LC4357_gcc_example.map"-mcpu=cortex-mfi-float -mv-mv-mfdip-r.ip-mfu.intrad-mfu.r.r.i -mfoti.png.dlpf-ng.c 等

Makefile:164:目标'TMS570LC4357_GCC_example.out'的配方失败
C:/ti/ccs1011/ccs/tools/compiler/gcc-arm-none-eabi-9-2020-q2-update-win32/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe:C:/ti/ccs1011/ccs/tools/compiler/gcc-arm-none-eabi-9-2020-q2-update-win32/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v7 + fp/hard/crti.o:为小端字节序系统编译、目标为大端字节序

(笑声)

等等

BR

Andrea

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

    您好!

    请在下面的主题中找到修补程序 Jiri 帖子。 我不确定最新的 GCC 是否支持大型字节序器件。

    e2e.ti.com/.../1506406

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

    您好!

    感谢您的回答。 该帖子中处理的问题相同、但提供的补丁适用于 GCC 5.2编译器版本、而不适用于 ARM 编译器9.3-1

    我需要相同的 ARM 编译器9.3.1补丁 (对于 Windows OS)。  

    BR

    Andrea

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="484353 " URL"~/support/microcontrollers/other/f/other-microcontrollers-forum/994715/tms570lc4357-ccs-tms570lc4357-compile-with-arm-compiler-9-3-1/3675816 #3675816")我需要相同的 ARM 编译器9.3.1补丁 (用于 Windows OS)。  [/报价]

    CCS/TMS570LC4357:无法使用 GCC 编译 HalCoGen 代码 具有适用于 GCC ARM 的更新版补丁  7.2.1我尚未检查是否可以将相同的补丁应用到 GCC ARM 9.3.1

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

    切斯特、您好!

    感谢您的回答。 我看到您的解决方案是有关  GCC ARM  7.2.1 的、该解决方案适用于我的项目、但我需要相同的  GCC ARM 9.1.1解决方案。

    感谢 您的支持。

    BR

    Andrea

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

    谢谢切斯特

    GCC ARM  7.2.1补丁(由 Chester Gillon 提供)、用于编译 TMS570LC43x 大端器件:

    https://e2e.ti.com/support/microcontrollers/hercules/f/hercules-safety-microcontrollers-forum/907975/ccs-tms570lc4357-halcogen-code-cannot-be-compiled-with-gcc/3355784?tisearch=e2e-sitesearch&keymatch=GCC%20ARM%207.2.1#3355784

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="484353 " URL"~/support/microcontrollers/other/f/other-microcontrollers-forum/994715/tms570lc4357-ccs-tms570lc4357-compile-with-arm-compiler-9-3-1/3677219 #3677219"]我看到了适用于   我的项目的 GCC ARM 7.2.1解决方案、但我需要适用于  GCC ARM 9.3-1的相同解决方案。

    好的、已经下载了 GCC ARM 9.3.1的源代码、并将研究如何将适用于大端字节序支持的补丁应用到该版本。 可能直到周末才能做到这一点。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="484353 "URL"~/support/microcontrollers/other/f/other-microcontrollers-forum/994715/tms570lc4357-ccs-tms570lc4357-compile-with-arm-compiler-9-3-1/3677219 #3677219"]我看到了适用于   我的项目的 GCC ARM 7.2.1解决方案、但我需要适用于  GCC ARM 9.3-1的相同解决方案。

    好的、我已经对 GCC ARM 9.3.1应用了补丁以添加大端字节序支持。

    生成修补编译器的输出位于我的 google 驱动 器 gcc-arm-none-eabi-7-2020-Q2-update 上

    这包括更新的源代码以及 Windows 和 Linux 可执行文件。

    我将版本号更改为9.3.1p1、以明确它是一个修改版本、而不是 CCS 安装的标准版本。 如果您将其安装在 CCS CCS/tools/compiler 目录中、CCS 应该会发现它、并且能够在项目中选择 Compiler Version "GNU v9.3.1p1"

    随附 了一个适用于 TMS570LC4357的 CCS 10示例项目、该项目使用 HALCoGen 04.07.01和补丁编译器、该编译器设置为使用硬件浮点。

    除了选择已修补的编译器版本、在 v9.3.1p1中获得大端字节序 BE32支持的重要项目选择包括:

    在 Build -> GNU -> Compiler -> Runtime Set 下:

    • 目标 CPU (-mcpu): cortex-r5.
    • 使用浮点硬件(-mfloat-abi): hard
    • 目标浮点硬件/格式(-mfpu): vfpv3-D16

    在 Build -> GNU -> Compiler -> Miscellaneous 下、将以下内容添加到 Miscellaneous 标志中:

    • mbig-endian

    在 Build -> GNU Linker -> Miscellaneous 下、将以下内容添加到 Miscellaneous 标志中:

    • mbig-endian
    • -mfloat-abi=硬
    • -mbe32.

     由于较新的编译器默认为 BE8、因此找到-mbe32选项是获取 v9.3.1p1编译器以获得可执行文件中的正确字节序所必需的。 而之前的 v7.2.1p1编译器没有-mbe8 /-mbe32选项。

    e2e.ti.com/.../TMS570LC4357_5F00_GCC_5F00_halcogen.zip 

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

    参考 对 gcc-arm-none-eabi-9-2020-Q2-update 源所做的更改如下:

    1.更改版本:

    $ git diff /mnt/gcc_arm_toolchain/gcc-arm-none-eabi-9-2020-q2-update/src/gcc/gcc/BASE-VER src/gcc/gcc/BASE-VER | cat
    diff --git a/mnt/gcc_arm_toolchain/gcc-arm-none-eabi-9-2020-q2-update/src/gcc/gcc/BASE-VER b/src/gcc/gcc/BASE-VER
    old mode 100755
    new mode 100644
    index 3b74042..94f8603
    --- a/mnt/gcc_arm_toolchain/gcc-arm-none-eabi-9-2020-q2-update/src/gcc/gcc/BASE-VER
    +++ b/src/gcc/gcc/BASE-VER
    @@ -1 +1 @@
    -9.3.1
    +9.3.1p1

    修改 t-multilib Makefile 片段以添加 Cortex-R 运行时库的构建大端版本:

    $ git diff /mnt/gcc_arm_toolchain/gcc-arm-none-eabi-9-2020-q2-update/src/gcc/gcc/config/arm/t-multilib src/gcc/gcc/config/arm/t-multilib | cat
    diff --git a/mnt/gcc_arm_toolchain/gcc-arm-none-eabi-9-2020-q2-update/src/gcc/gcc/config/arm/t-multilib b/src/gcc/gcc/config/arm/t-multilib
    old mode 100755
    new mode 100644
    index 87069f7..cfc809d
    --- a/mnt/gcc_arm_toolchain/gcc-arm-none-eabi-9-2020-q2-update/src/gcc/gcc/config/arm/t-multilib
    +++ b/src/gcc/gcc/config/arm/t-multilib
    @@ -100,12 +100,20 @@ MULTILIB_REQUIRED	+= mthumb/mfloat-abi=soft
     MULTILIB_REQUIRED	+= marm/march=armv5te+fp/mfloat-abi=softfp
     MULTILIB_REQUIRED	+= marm/march=armv5te+fp/mfloat-abi=hard
     
    +MULTILIB_OPTIONS	+= mbig-endian
    +MULTILIB_DIRNAMES	+= big-endian
    +
     MULTILIB_REQUIRED	+= mthumb/march=armv7/mfloat-abi=soft
     MULTILIB_REQUIRED	+= mthumb/march=armv7+fp/mfloat-abi=softfp
     MULTILIB_REQUIRED	+= mthumb/march=armv7+fp/mfloat-abi=hard
    +MULTILIB_REQUIRED	+= mthumb/march=armv7/mfloat-abi=soft/mbig-endian
    +MULTILIB_REQUIRED	+= mthumb/march=armv7+fp/mfloat-abi=softfp/mbig-endian
    +MULTILIB_REQUIRED	+= mthumb/march=armv7+fp/mfloat-abi=hard/mbig-endian
     
     MULTILIB_REQUIRED	+= mthumb/march=armv7-r+fp.sp/mfloat-abi=softfp
     MULTILIB_REQUIRED	+= mthumb/march=armv7-r+fp.sp/mfloat-abi=hard
    +MULTILIB_REQUIRED	+= mthumb/march=armv7-r+fp.sp/mfloat-abi=softfp/mbig-endian
    +MULTILIB_REQUIRED	+= mthumb/march=armv7-r+fp.sp/mfloat-abi=hard/mbig-endian
     
     # Map v7-r with double precision down onto common v7 code.
     MULTILIB_MATCHES	+= march?armv7=march?armv7-r
    @@ -199,13 +207,20 @@ endif		# Not APROFILE.
     # Use Thumb libraries for everything.
     
     MULTILIB_REUSE		+= mthumb/march.armv7/mfloat-abi.soft=marm/march.armv7/mfloat-abi.soft
    +MULTILIB_REUSE		+= mthumb/march.armv7/mfloat-abi.soft/mbig-endian=marm/march.armv7/mfloat-abi.soft/mbig-endian
     
     MULTILIB_REUSE		+= $(foreach ABI, hard softfp, \
     			     $(foreach ARCH, armv7+fp armv7-r+fp\.sp, \
     			       mthumb/march.$(ARCH)/mfloat-abi.$(ABI)=marm/march.$(ARCH)/mfloat-abi.$(ABI)))
    +MULTILIB_REUSE		+= $(foreach ABI, hard softfp, \
    +			     $(foreach ARCH, armv7+fp armv7-r+fp\.sp, \
    +			       mthumb/march.$(ARCH)/mfloat-abi.$(ABI)/mbig-endian=marm/march.$(ARCH)/mfloat-abi.$(ABI)/mbig-endian))
     
     # Softfp but no FP, use the soft-float libraries.
     MULTILIB_REUSE		+= $(foreach MODE, arm thumb, \
     			     $(foreach ARCH, armv7, \
     			       mthumb/march.$(ARCH)/mfloat-abi.soft=m$(MODE)/march.$(ARCH)/mfloat-abi.softfp))
    +MULTILIB_REUSE		+= $(foreach MODE, arm thumb, \
    +			     $(foreach ARCH, armv7, \
    +			       mthumb/march.$(ARCH)/mfloat-abi.soft/mbig-endian=m$(MODE)/march.$(ARCH)/mfloat-abi.softfp/mbig-endian))

    修补的编译器的完整多库变体为:

    C:\ti\ccs1020\ccs\tools\compiler\gcc-arm-none-eabi-9-2021-q2-update-win32\bin>arm-none-eabi-gcc --print-multi-lib
    .;
    arm/v5te/softfp;@marm@march=armv5te+fp@mfloat-abi=softfp
    arm/v5te/hard;@marm@march=armv5te+fp@mfloat-abi=hard
    thumb/nofp;@mthumb@mfloat-abi=soft
    thumb/v7/nofp;@mthumb@march=armv7@mfloat-abi=soft
    thumb/v7/nofp/big-endian;@mthumb@march=armv7@mfloat-abi=soft@mbig-endian
    thumb/v7+fp/softfp;@mthumb@march=armv7+fp@mfloat-abi=softfp
    thumb/v7+fp/hard;@mthumb@march=armv7+fp@mfloat-abi=hard
    thumb/v7+fp/softfp/big-endian;@mthumb@march=armv7+fp@mfloat-abi=softfp@mbig-endian
    thumb/v7+fp/hard/big-endian;@mthumb@march=armv7+fp@mfloat-abi=hard@mbig-endian
    thumb/v7-r+fp.sp/softfp;@mthumb@march=armv7-r+fp.sp@mfloat-abi=softfp
    thumb/v7-r+fp.sp/hard;@mthumb@march=armv7-r+fp.sp@mfloat-abi=hard
    thumb/v7-r+fp.sp/softfp/big-endian;@mthumb@march=armv7-r+fp.sp@mfloat-abi=softfp@mbig-endian
    thumb/v7-r+fp.sp/hard/big-endian;@mthumb@march=armv7-r+fp.sp@mfloat-abi=hard@mbig-endian
    thumb/v6-m/nofp;@mthumb@march=armv6s-m@mfloat-abi=soft
    thumb/v7-m/nofp;@mthumb@march=armv7-m@mfloat-abi=soft
    thumb/v7e-m/nofp;@mthumb@march=armv7e-m@mfloat-abi=soft
    thumb/v7e-m+fp/softfp;@mthumb@march=armv7e-m+fp@mfloat-abi=softfp
    thumb/v7e-m+fp/hard;@mthumb@march=armv7e-m+fp@mfloat-abi=hard
    thumb/v7e-m+dp/softfp;@mthumb@march=armv7e-m+fp.dp@mfloat-abi=softfp
    thumb/v7e-m+dp/hard;@mthumb@march=armv7e-m+fp.dp@mfloat-abi=hard
    thumb/v8-m.base/nofp;@mthumb@march=armv8-m.base@mfloat-abi=soft
    thumb/v8-m.main/nofp;@mthumb@march=armv8-m.main@mfloat-abi=soft
    thumb/v8-m.main+fp/softfp;@mthumb@march=armv8-m.main+fp@mfloat-abi=softfp
    thumb/v8-m.main+fp/hard;@mthumb@march=armv8-m.main+fp@mfloat-abi=hard
    thumb/v8-m.main+dp/softfp;@mthumb@march=armv8-m.main+fp.dp@mfloat-abi=softfp
    thumb/v8-m.main+dp/hard;@mthumb@march=armv8-m.main+fp.dp@mfloat-abi=hard

    其中 @mbig-endian 的库变量已被修补程序添加。 大端字节序库的所有新变体都是根据现有运行时库构建的、仅用于 thumb 模式。  MULTILIB_reuse 用于映射 ARM 模式可执行文件以使用 Thumb 模式运行时库。

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

    很棒,很棒!

    非常感谢切斯特!

    BR

    Andrea