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.

[参考译文] CCS/EVMK2EX:键入未定义的符号`HEAPSIZE#39;在表达式66AK2Gxx.lds /hello_world 第159行中引用了该符号。C/C++问题

Guru**** 3040470 points

Other Parts Discussed in Thread: 66AK2G12, CCSTUDIO

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/861611/ccs-evmk2ex-type-undefined-symbol-heapsize-referenced-in-expression-66ak2gxx-lds-hello_world-line-159-c-c-problem

器件型号:EVMK2EX
主题中讨论的其他器件:66AK2G12、 CCStudio

工具/软件:Code Composer Studio

大家好、

     我尝试构建 hello_world 项目、但失败了。 有错误消息:

        表达式66AK2Gxx.lds /hello_world 行159 C/C++中引用的未定义符号`HEAPSIZE '问题

          gmake[1]:***[hello_world.out]错误1 hello_world C/C++问题

          gmake:***[All]错误2 hello_world C/C++问题

          目标'hello_world.out'的配方失败的 makefile /hello_world/Debug line 143 C/C++ problem

          目标'all'的配方失败的 makefile /hello_world/Debug line 139 C/C++问题

     希望有一些答案。

     谢谢!

     Suafie。

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

    PS:CCS 版本是 CCS v9、我尝试在 ARM 内核上加载。  

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


    ****为项目 hello_world 构建配置调试****

    "C:\\ti\\ccs920\\ccs\\utils\\bin\\gmake"-k -j 8 all -O

    编译文件:"../main.c"
    调用:GNU 编译器
    "c:/ti/ccs920/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc-7.2.1.exe "-c -mcpu=cortex-a15 -mtune =cortex-a15 -marm -mfloat-abi=hard -i"C:/Users/suafi/workspace_v9_2/hello_world -i"-i"C:/ti/ccs920/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi/include -og -g -gdwarf-3 -gstrict-dwarf -Wall -speces="nosys.mt"-md -main.o"-md -md 规范。
    建筑完工:"../main.c"

    构建目标:"hello_world.out"
    调用:GNU 连接器
    "c:/ti/ccs920/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc-7.2.1.exe -mtune = cortex-a15 -marm -og -g -gdwarf-3 -gstrict-dwarf -Wall -speces="nosys.specs"-mfloat-abi=hard -wl,-map、"hello_world.map"-o"./main.o"-mflo"-wl-64p-l-wl-end -wl-wl-l-group、-wl-start-wl-wl-wl-group -wl-wl-wl-wl-ld./wl-wl./wl-group.
    Makefile:143:目标'hello_world.out'的配方失败
    ./66AK2Gxx.lds:159:表达式中引用的未定义符号`HEAPSIZE '
    collect2.exe:错误:LD 返回1退出状态
    gmaked[1]:***[hello_world.out]错误1.
    gmake:***[全部]错误2.
    Makefile:139:目标'all'的配方失败

    ****构建完成****

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

    您是否使用其中一个项目模板创建了项目、如空项目(使用 main.c)或 Hello World? 如果是、则工程应在构建时不会出现错误。

    查看您的编译输出、一些编译器选项看起来与我在编译模板工程时看到的默认选项稍有不同。  

    请尝试使用其中一个模板创建新项目、并告知我们错误是否仍然存在。

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

    是的、AartiG、我按照您的建议创建了一个新项目、但是、这是与以前相同的错误。

    suafie。

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

    Suafie、

    我使用空项目(使用 main.c)模板为66AK2G12器件创建了一个新项目。 这是完整的构建输出。  

    ****为项目 test2构建配置调试****

    "C:\\CCSTUDIO_9.2.0.00013\\CCS\\utils\\bin\\gmake"-k -j 8 all -O

    编译文件:"../startup_ARMCA15.S"
    调用:GNU 编译器
    "C:/CCSTUDIO_9.2.0.00013/CCS/tools/compiler/gcc-arm-no-eabi-7-2017-Q4-maj-win32/bin/arm-no-eabi-gcc-7.2.1.exe"-c -mcpc=cortex-a15 -mtes=cortex-a15 -marm -mck-dmctrad-mce-ds-dc-gmctr-mctr-ds-b-mctr-g-mctrad-g-mctr-g-mcp -ds-b-ds-startup /workspaces/ccsv920/arm_workspace/test2规范-mctr-mctr-mctr-mctr-d-mctr-g-mctr-g-mctr-mctr-g-mctr-mctr-mctr-g-d-d-d-mctr-mctr-g-mctr-g-mctr-g-mctr-g-g-mctr-g-d-d-d-d-mctrad-
    已完成构建:"../STARTUP_ARMCA15.S"

    编译文件:"../main.c"
    调用:GNU 编译器
    "C:/CCSTUDIO_9.2.0.00013/CCS/tools/compiler/gcc-arm-no-eabi-7-2017-Q4-maj-win32/bin/arm-no-eabi-gcc-7.2.1.exe"-c -mcpu=cortex-a15 -mtex-a15 -marm -dm-dab-g-mf-ds-dma-d2.gmf-not-d2.gmf-ne-specs -gmccs-g-g2.gmf-not-g-gmf-not-d2.g2.g2.gmf-not-mf-not-mf-not-g-mf-ne-ds-ds-ds-g2.gmf-not-mf-not-g2.g2.gmf-not-mf-not-g"-mf-not-mf-not-g"-mccs-mf-not-mf-not-mf-not-mf-not-ds--/workspaces/ccsv920/arm_workspace/test2
    建筑完工:"../main.c"

    构建目标:"test2.out"
    调用:GNU 连接器
    "C:/CCSTUDIO_9.2.0.00013/CCS/tools/compiler/gcc-arm-no-eabi-7-2017-Q4-maj-win32/arm-no-eabi-gcc-7.2.exe"-mtune =cortex-a15 -marm -dk2g02 -darm0 -og -dwl=sym-dwl-m-rands-startup 规范"-msp-rands-dwl.em-rands-dwl-m=-rands-dwl.em-rands-dwl.em-rands-dwl.em-r.pr-r.pr-m-r.em-dwl.em-r.ap-m-m-m-m.pr-dwl.pr-dwl-dwl.pr-dwl-m.em-dwl.pr-dwl.pr-dwl-m.pr-m.pr-m.pr-m.pr-m.pr-m.em-m.
    完成构建目标:"test2.out"

    如您所见、您的编译输出缺少一些在我的中看到的编译器和链接器选项。 这些选项通常从作为 CCS 安装一部分的器件 XML 文件中提取。 我怀疑您的安装可能缺少这些文件、或者这些文件不正确/损坏。

    如果问题不大、我建议重新安装 CCS。 您不必立即擦除当前安装。 只需在另一个目录中安装 CCS 9.2的另一个实例、以验证它是否首先起作用。 您可以从此处下载安装程序:  
    http://software-dl.ti.com/ccs/esd/documents/ccs_downloads.html#code-composer-studio-version-9-downloads