CCS 关于 error: expected a ")" 问题

使用CCS 进行DSP 开发过程汇中,编译器提示 关于 error: expected a “)” 问题

很奇怪,仔细检查,没有发现任何声明问题,括号也没有缺少。

经过问谷歌,找度娘,一个问答提示了我,有人也遇到了这个问题,而他的解决方法是 因为宏定义的问题。但具体是什么没有讲。

很好,是不是我的函数声明中也存在宏定义的常量呢?仔细排查,果然,一个和宏定义同名的参数被使用,当做变量。嗯,问题就是他。

更改名字,编译。Very WELL。

作者:zhangzhanwenzzzzzz
来源:优快云
原文:https://blog.youkuaiyun.com/zhangzhanwenzzzzzz/article/details/7972051
版权声明:本文为博主原创文章,转载请附上博文链接!

..\users\main.c(108): error: #254: type name is not allowed for (uint8_t i = 0; i < length; i++) { ..\users\main.c(108): error: #65: expected a ";" for (uint8_t i = 0; i < length; i++) { ..\users\main.c(108): error: #20: identifier "i" is undefined for (uint8_t i = 0; i < length; i++) { ..\users\main.c(119): error: #254: type name is not allowed for (uint8_t i = 0; i < INIT_LENGTH; i++) { ..\users\main.c(119): error: #65: expected a ";" for (uint8_t i = 0; i < INIT_LENGTH; i++) { ..\users\main.c(119): error: #20: identifier "i" is undefined for (uint8_t i = 0; i < INIT_LENGTH; i++) { ..\users\main.c(141): error: #254: type name is not allowed for (uint8_t i = 1; i < length; i++) { ..\users\main.c(141): error: #65: expected a ";" for (uint8_t i = 1; i < length; i++) { ..\users\main.c(141): error: #20: identifier "i" is undefined for (uint8_t i = 1; i < length; i++) { ..\users\main.c(155): error: #254: type name is not allowed for (uint8_t i = length - 1; i > 0; i--) { ..\users\main.c(155): error: #65: expected a ";" for (uint8_t i = length - 1; i > 0; i--) { ..\users\main.c(155): error: #20: identifier "i" is undefined for (uint8_t i = length - 1; i > 0; i--) { ..\users\main.c(168): error: #254: type name is not allowed for (uint8_t i = 1; i < length; i++) { ..\users\main.c(168): error: #65: expected a ";" for (uint8_t i = 1; i < length; i++) { ..\users\main.c(228): error: #254: type name is not allowed for (uint8_t i = 0; i < 3; i++) { ..\users\main.c(228): error: #65: expected a ";" for (uint8_t i = 0; i < 3; i++) { ..\users\main.c(228): error: #20: identifier "i" is undefined for (uint8_t i = 0; i < 3; i++) { ..\users\main.c: 0 warnings, 17 errors "..\users\main.c" - 17 Error(s), 0 Warning(s).修改上述错误后给出完整正确代码
06-23
*** Using Compiler 'V6.7', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin' Build target 'empty_LP_MSPM0G3507_nortos_keil' Before Build - User command #1: cmd.exe /C "F:\ccs\ti\mspm0_sdk_2_05_01_00\empty\keil\../../tools/keil/syscfg.bat 'F:\ccs\ti\mspm0_sdk_2_05_01_00\empty\keil\' empty.syscfg" Couldn't find Sysconfig Tool "C:\ti\sysconfig_1.24.0\sysconfig_cli.bat" "Update the file located at <sdk path>/tools/keil/syscfg.bat" ../ti_msp_dl_config.c(47): error: unknown type name 'SYSCONFIG_WEAK' SYSCONFIG_WEAK void SYSCFG_DL_init(void) ^ ../ti_msp_dl_config.c(47): error: expected identifier or '(' SYSCONFIG_WEAK void SYSCFG_DL_init(void) ^ ../ti_msp_dl_config.c(55): error: unknown type name 'SYSCONFIG_WEAK' SYSCONFIG_WEAK void SYSCFG_DL_initPower(void) ^ ../ti_msp_dl_config.c(55): error: expected identifier or '(' SYSCONFIG_WEAK void SYSCFG_DL_initPower(void) ^ ../ti_msp_dl_config.c(65): error: unknown type name 'SYSCONFIG_WEAK' SYSCONFIG_WEAK void SYSCFG_DL_GPIO_init(void) ^ ../ti_msp_dl_config.c(65): error: expected identifier or '(' SYSCONFIG_WEAK void SYSCFG_DL_GPIO_init(void) ^ ../ti_msp_dl_config.c(71): error: unknown type name 'SYSCONFIG_WEAK' SYSCONFIG_WEAK void SYSCFG_DL_SYSCTL_init(void) ^ ../ti_msp_dl_config.c(71): error: expected identifier or '(' SYSCONFIG_WEAK void SYSCFG_DL_SYSCTL_init(void) ^ 8 errors generated. compiling ti_msp_dl_config.c... ".\Objects\empty_LP_MSPM0G3507_nortos_keil.axf" - 8 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:01
最新发布
07-31
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值