风过空庭,字句正徐来。
关于关于本站关于我给我点钱
更多时间线友链文件服务wiki
联系写留言发邮件GitHub
© 2024-2026 yono. | RSS 订阅 | 站点地图 | | Stay hungry. Stay foolish.
Powered by Mix Space&
白い
.
| 粤 ICP 备2024284785号-1 |
正在被0人看爆
且听风定,再看句成。

c2000 系列生成 bin 的疑难杂症

w188w
AI·GEN

关键洞察

c2000 系列生成 bin 的疑难杂症

  • Loading...
  • Loading...
  • Loading...
  • Loading...
  • Loading...
  • 基于 CCS 的工程,添加如下的 post-build steps 可生成bin文件

    "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd2000.exe" "${CG_TOOL_ROOT}/bin/hex2000.exe" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"
    

    在这个指令中奇怪的 {CCE_INSTALL_ROOT} 环境变量在 CCS 终端环境下等价于 {CCS_INSTALL_ROOT}

    那么事实上依然无法正常生成,找到 CCS 安装目录下的 /utils/tiobj2bin/tiobj2bin.bat 这个文件,将其中的 "470"全部改成"2000",重新编译一下就能正常生成了。

    那么此时可能会有报错说"C: 找不到"什么什么的,是 tiobj2bin.bat 中以下一段内容在作祟。如果实在讨厌这个报错提示删掉这段内容就好,不影响bin文件的生成

    BAT
    rem ========================================================================== 
    rem C2000 EABI files are not supported.  This code uses ofd2000 to search the
    rem file header to determine whether it is an ELF file or not.  All the output
    rem of that command, including any error diagnostics, is thrown away.  For the
    rem details of how this works, Internet search the commands used.
    rem ========================================================================== 
    if %base_ofdcmd% == ofd2000 (
       setlocal enabledelayedexpansion
       %ofdcmd% --obj_display=none,header %outfile% | findstr/c:" ELF " > nul 2>&1
       if !errorlevel! equ 0 (
          echo C28x files built with --abi=eabi are not supported
          exit /b
       )
       setlocal disabledelayedexpansion
    )