TI论坛
直播中

王峰

8年用户 189经验值
私信 关注
[问答]

关于HAL Code Generater和CCS4.2.4建立一个工程项目出错的问题(TMS570)

ti在线技术社区的活动中花300买了一块 TMS570 MCU Development kit ,但是一直无法自己建立一个完整无错的项目工程。
请问我在使用在HAL Code Generater 和CCS4.2.4的时候,依据TMS570LS2x_Using_NHET_as_GIO_Example.pdf的指南来操作,为什么会出现以下错误。希望帮助解决。
Console:
**** Build of configuration Debug for project mmm ****
D:EDACCSV4ccsv4utilsgmakegmake -k all
'Building file: ../os_croutine.c'
'Invoking: Compiler'
"D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/bin/cl470" -mv7R4 -g --include_path="D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/include" --diag_warning=225 --enum_type=packed --abi=eabi --code_state=32 --float_support=VFPv3D16 --preproc_with_compile --preproc_dependency="os_croutine.pp"  "../os_croutine.c"
"..FreeRTOS.h", line 194: error: expected an expression
"..FreeRTOS.h", line 429: error: expected an expression
2 errors detected in the compilation of "../os_croutine.c".
>> Compilation failure
gmake: *** [os_croutine.obj] Error 1
'Building file: ../os_heap.c'
'Invoking: Compiler'
"D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/bin/cl470" -mv7R4 -g --include_path="D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/include" --diag_warning=225 --enum_type=packed --abi=eabi --code_state=32 --float_support=VFPv3D16 --preproc_with_compile --preproc_dependency="os_heap.pp"  "../os_heap.c"
"..FreeRTOS.h", line 194: error: expected an expression
"..FreeRTOS.h", line 429: error: expected an expression
2 errors detected in the compilation of "../os_heap.c".
>> Compilation failure
gmake: *** [os_heap.obj] Error 1
'Building file: ../os_list.c'
'Invoking: Compiler'
"D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/bin/cl470" -mv7R4 -g --include_path="D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/include" --diag_warning=225 --enum_type=packed --abi=eabi --code_state=32 --float_support=VFPv3D16 --preproc_with_compile --preproc_dependency="os_list.pp"  "../os_list.c"
"..FreeRTOS.h", line 194: error: expected an expression
"..FreeRTOS.h", line 429: error: expected an expression
2 errors detected in the compilation of "../os_list.c".
>> Compilation failure
gmake: *** [os_list.obj] Error 1
'Building file: ../os_port.c'
'Invoking: Compiler'
"D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/bin/cl470" -mv7R4 -g --include_path="D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/include" --diag_warning=225 --enum_type=packed --abi=eabi --code_state=32 --float_support=VFPv3D16 --preproc_with_compile --preproc_dependency="os_port.pp"  "../os_port.c"
"..FreeRTOS.h", line 194: error: expected an expression
"..FreeRTOS.h", line 429: error: expected an expression
2 errors detected in the compilation of "../os_port.c".
>> Compilation failure
gmake: *** [os_port.obj] Error 1
'Building file: ../os_queue.c'
'Invoking: Compiler'
"D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/bin/cl470" -mv7R4 -g --include_path="D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/include" --diag_warning=225 --enum_type=packed --abi=eabi --code_state=32 --float_support=VFPv3D16 --preproc_with_compile --preproc_dependency="os_queue.pp"  "../os_queue.c"
"..FreeRTOS.h", line 194: error: expected an expression
"..FreeRTOS.h", line 429: error: expected an expression
"../os_queue.c", line 1511: error: expected an expression
3 errors detected in the compilation of "../os_queue.c".
>> Compilation failure
gmake: *** [os_queue.obj] Error 1
'Building file: ../os_tasks.c'
'Invoking: Compiler'
"D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/bin/cl470" -mv7R4 -g --include_path="D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/include" --diag_warning=225 --enum_type=packed --abi=eabi --code_state=32 --float_support=VFPv3D16 --preproc_with_compile --preproc_dependency="os_tasks.pp"  "../os_tasks.c"
"..FreeRTOS.h", line 194: error: expected an expression
"..FreeRTOS.h", line 429: error: expected an expression
"..os_timer.h", line 68: fatal error: could not open source file "*** include variable HDRPORTABLE not defined ***"
2 errors and 1 fatal error detected in the compilation of "../os_tasks.c".
Compilation terminated.
>> Compilation failure
gmake: *** [os_tasks.obj] Error 1
'Building file: ../os_timer.c'
'Invoking: Compiler'
"D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/bin/cl470" -mv7R4 -g --include_path="D:/EDA/CCSV4/ccsv4/tools/compiler/tms470/include" --diag_warning=225 --enum_type=packed --abi=eabi --code_state=32 --float_support=VFPv3D16 --preproc_with_compile --preproc_dependency="os_timer.pp"  "../os_timer.c"
"..FreeRTOS.h", line 194: error: expected an expression
"..FreeRTOS.h", line 429: error: expected an expression
"..os_timer.h", line 68: fatal error: could not open source file "*** include variable HDRPORTABLE not defined ***"
2 errors and 1 fatal error detected in the compilation of "../os_timer.c".
Compilation terminated.
>> Compilation failure
gmake: *** [os_timer.obj] Error 1
gmake: Target `all' not remade because of errors.
Build complete for project mmm
Problems:

回帖(5)

李麒铭

2018-8-13 09:28:12
Hi WDY,
    我尝试了使用您说的工程进行编译,但是效果是只有一些warning,并没有error。
        建议您:
        1. 将CCS升级到V5.x。如果没有意外的话,您购买的套件中的光盘上应该有CCS V5.x的安装文件。
                建议您使用V5以后的版本,可以提供更好的对Hercules系列MCU的支持。
        2. 请您直接下载这个例子的源代码并生成工程尝试。
                这个例子的源代码在wiki中可以找到: http://processors.wiki.ti.com/images/7/7c/Example_Using_NHET_as_GIO_CCSv4_Project.zip
        3. 是不是路径指定的问题呢?
                请您检查一下工程中FreeRTOS.h这个源文件放在哪个路径下。
                如果是在如”..include“这样的路径中的话,您需要在编译选项中指定这个路径为包含路径,以免编译器找不到头文件。
    请再尝试一下。
举报

王峰

2018-8-13 09:35:43
引用: testd27 发表于 2018-8-13 09:28
Hi WDY,
    我尝试了使用您说的工程进行编译,但是效果是只有一些warning,并没有error。
        建议您:

我已经把CCS升级到CCS5,但是我使用TMS570LS2x_Using_NHET_as_GIO_Example.pdf
的方式建立的ABC工程文件,还是有很多错误!
具体情况见附件,请帮着运行看一下错误原因所在,我之前从没用过这个环境,所以很难自己找到错误错在。
谢谢
举报

李麒铭

2018-8-13 09:41:11
引用: zsl1220548 发表于 2018-8-13 09:35
我已经把CCS升级到CCS5,但是我使用TMS570LS2x_Using_NHET_as_GIO_Example.pdf
的方式建立的ABC工程文件,还是有很多错误!
具体情况见附件,请帮着运行看一下错误原因所在,我之前从没用过这个环境,所以很难自己找到错误错在。

Hi WDY,
   看了一下您的工程,前面两个问题分别是由于configGENERATE_RUN_TIME_STATS 和configUSE_TIMERS两个Macro没有给定内容。那么编译时相当于"#if   == 1" ,语法错误。
所以在定义的地方加入 #define configUSE_TIMERS        0 即可。
最后一个问题#include "*** include variable HDRPORTABLE not defined ***"
不是很清楚,wiki例子中的工程根本不包含os_timer.h这个头文件。
建议您下载最新的HALCoGen V3.03.00尝试,或者直接用Wiki上面的例子。
举报

王峰

2018-8-13 09:49:21
引用: testd27 发表于 2018-8-13 09:41
Hi WDY,
   看了一下您的工程,前面两个问题分别是由于configGENERATE_RUN_TIME_STATS 和configUSE_TIMERS两个Macro没有给定内容。那么编译时相当于"#if   == 1" ,语法错误。
所以在定义的地方加入 #define configUSE_TIMERS        0 即可。

HALCoGen V3.03.00和CCS5建立了一个test2工程文件依然出错,求助!
工程文件和错误截图见附件:test2.zip
 

都是#5错误,软件帮助说是这几个头文件没有包含进去,但是我自己加载了一下,还是一样的错误
 
不知道我加载的位置对吗?
 
举报

更多回帖

发帖
×
20
完善资料,
赚取积分