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.

[参考译文] TMS320F28335:由于"语法错误:"("意外"

Guru**** 2583235 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1269152/tms320f28335-not-able-to-build-sys-bios-example-project-because-of-syntax-error-unexpected

器件型号:TMS320F28335
Thread 中讨论的其他器件:SYSBIOS

您好!

我尝试使用以下设置来构建 CCS SYS/BIOS 最小示例:

  • CCS: 7.2.0.00013
  • 编译器:TI v6.4.11
  • SYS/BIOS:6.45.1.29
  • XDCtool:3.32.2.25_CORE

我收到以下构建错误:

**** Build of configuration Debug for project Test ****

"C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 12 all -O 
gmake[1]: Entering directory 'C:/workspace/ccs7/Test/Debug'
'Building file: ../app.cfg'
'Invoking: XDCtools'
"C:/ti/xdctools_3_32_02_25_core/xs" --xdcpath="C:/ti/bios_6_45_01_29/packages;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.C28_float -p ti.platforms.tms320x28:TMS320F28335 -r release -c "C:/ti/c2000_6.4.11" --compileOptions "-g" "../app.cfg"
making package.mak (because of package.bld) ...
generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
configuring app.x28FP from package/cfg/app_p28FP.cfg ...
generating custom ti.sysbios library makefile ... 
Starting build of library sources ...
making C:/workspace/ccs7/Test/src/sysbios/sysbios.a28FP ...
Build of libraries failed.
subdir_rules.mk:12: recipe for target 'build-1704950689-inproc' failed
C:/Users/xxx/AppData/Local/TempNew/make3696-1.sh: 1: Syntax error: "(" unexpected
gmake: *** [C:/workspace/ccs7/Test/src/sysbios/sysbios.a28FP] Error 2
error: xdc.cfg.SourceDir: "C:/ti/xdctools_3_32_02_25_core/packages/xdc/cfg/SourceDir.xs", line 209: xdc.cfg.SourceDir : Build of generated source libraries failed: exit status = 2:

js: "C:/ti/xdctools_3_32_02_25_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!
gmake.exe: *** [package/cfg/app_p28FP.xdl] Error 1
gmake.exe: *** Deleting file `package/cfg/app_p28FP.xdl'
gmake.exe: *** [package/cfg/app_p28FP.xdl] Deleting file `package/cfg/app_p28FP.h'
gmake.exe: *** [package/cfg/app_p28FP.xdl] Deleting file `package/cfg/app_p28FP.c'
js: "C:/ti/xdctools_3_32_02_25_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
gmake[1]: *** [build-1704950689-inproc] Error 1
gmake[1]: Leaving directory 'C:/workspace/ccs7/Test/Debug'
gmake: *** No rule to make target 'build-1704950689', needed by 'configPkg/compiler.opt'.
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

  

在过去、我能够构建这样的项目。 但两者之间发生了一些变化...

提前感谢您的支持!

此致、

马蒂亚斯

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

    您还有其他项目使用这组相同的工具版本并进行良好编译、还是看起来只是这个特定的示例?

    该示例是否未能从头开始构建? 或者它最初是工作的、然后在某个点中断了吗? 如果是后者、您能否尝试从工程中删除 build 文件夹(本例中为"Debug")、并让其生成一个新的文件夹。

    从您使用的版本的时代开始、我猜测您可能不打算迁移基于 SYS/BIOS 的旧工程、但我不打算再为新工程推荐 SYS/BIOS。 FreeRTOS 现在是我们首选的并得到有效支持的 RTOS。

    惠特尼

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

    惠特尼、您好!

    好的、我们有很多使用这组工具版本的旧项目。 这是我目前的问题。 我无法构建这些旧工程、也不允许更改工具版本。

    我相信在一个月前它工作良好。

    我已经做了"全部"尝试、比如删除 build 文件夹以及 SYS/BIOS 的 src 文件夹。

    我想我需要知道 shell 脚本为什么失败:
    C:/Users/xxx/AppData/Local/TempNew/make3696-1.sh:1:语法错误:"("意外

    不幸的是这个.sh 文件被自动删除,所以我无法查看它。

    是否有办法阻止在临时.sh 文件上进行删除?

    我怀疑另外一个 bash 被用来在 CCS 中执行.sh 脚本。 但我不知道如何识别使用的 bash。

    也许你有一个想法...

    谢谢。此致、

    马蒂亚斯

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

    我解决了这个问题。 :-)

    原因是 Windows 环境变量中有一个条目。
    其中系统变量"make"设置为"C:\Program Files (x86)\GnuWin32\bin\make.exe"。

    移除后、我的旧工程再次正常运行!

    我收到了制造手册中的提示:
    https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html

    感谢您的专业、快速的支持!

    此致、

    马蒂亚斯