ST意法半导体
直播中

王冬梅

7年用户 137经验值
私信 关注
[问答]

新的STM8S TSL v2.3.1法编译库源文件

我正在尝试新的STM8S TSL v2.3.1,它无法编译库源文件。
它在所有TSL源文件上失败,并显示如下错误消息(对于其他文件也是如此)。我该怎么做才能解决这个问题?
使用带有Raisonance toolseet v2.32.10.0307和STM8S Discovery Board的STVD v4.2。
P / S:我附上了一个示例项目来说明问题。
错误信息:

=================================================
编译..  libraries  stm8_touchsensing_driver  src  stm8_tsl_api.c ...
rcstm8 ..  libraries  stm8_touchsensing_driver  src  stm8_tsl_api.c OBJECT(Debug  stm8_tsl_api.o)PIN(''C: Program Files  Raisonance  Ride  _inc  ST7'')PIN(''C: Program Files  Raisonance  Ride  inc'')WRV(0)STM8(SMALL)DEBUG DGC(第0页)AUTO OT(0)PR(Debug  stm8_tsl_api.lst)CD CO SB LAOB PIN(..  libraries  stm8s_stdperiph_driver  inc) PIN(..  libraries  stm8_touchsensing_driver  inc)PIN(源)DF(STM8S105)
RCSTM8编译器V2.32.10.307 Lite(32 Kb代码限制)
版权所有(c)Raisonance S.A.S. 1987-2010。版权所有。
***错误C001在第84行..  libraries  stm8_touchsensing_driver  inc / stm8_tsl_rc_acquisition.h:上下文中不允许使用'extern'说明符
***错误C074在第83行..  libraries  stm8_touchsensing_driver  inc / stm8_tsl_rc_acquisition.h:声明语法无效
***错误C131在84行..  libraries  stm8_touchsensing_driver  inc / stm8_tsl_rc_acquisition.h:不平衡& sharpif-endif控件
RCSTM8编译完成。 0警告,3错误
命令:''rcstm8 ..  libraries  stm8_touchsensing_driver  src  stm8_tsl_api.c OBJECT(Debug  stm8_tsl_api.o)PIN(''C: Program Files  Raisonance  Ride  inc  ST7'')PIN('' C: Program Files  Raisonance  Ride  inc'')WRV(0)STM8(SMALL)DEBUG DGC(第0页)AUTO OT(0)PR(Debug  stm8_tsl_api.lst)CD CO SB LAOB PIN(..  libraries  stm8s_stdperiph_driver  inc)PIN(..  libraries  stm8_touchsensing_driver  inc)PIN(源)DF(STM8S105)''失败,返回值为:2

退出代码= 2。
=================================================
#discovery #touch-library

以上来自于谷歌翻译


以下为原文





I am trying out the new STM8S TSL v2.3.1 and it failed to compile the library source files.
It fail on all the TSL source files with error message as below (same for other files). What can I do to resolve the issue?
Using STVD v4.2 with Raisonance toolseet v2.32.10.0307 and STM8S Discovery Board.
P/S: I've attached a sample project to illustrate the problem.
Error message:

=================================================
Compiling ..librariesstm8_touchsensing_driversrcstm8_tsl_api.c...
rcstm8 ..librariesstm8_touchsensing_driversrcstm8_tsl_api.c OBJECT(Debugstm8_tsl_api.o) PIN(''C:Program FilesRaisonanceRideincST7'') PIN(''C:Program FilesRaisonanceRideinc'')  WRV(0) STM8(SMALL) DEBUG DGC(page0) AUTO  OT(0) PR(Debugstm8_tsl_api.lst) CD CO SB LAOB PIN(..librariesstm8s_stdperiph_driverinc) PIN(..librariesstm8_touchsensing_driverinc) PIN(source) DF(STM8S105)
RCSTM8 COMPILER V2.32.10.307 Lite (32 Kb code limited)
Copyright (c) Raisonance S.A.S. 1987-2010. All rights reserved.
*** ERROR C001 IN LINE 84 OF ..librariesstm8_touchsensing_driverinc/stm8_tsl_rc_acquisition.h : 'extern' specifier not allowed in the context
*** ERROR C074 IN LINE 83 OF ..librariesstm8_touchsensing_driverinc/stm8_tsl_rc_acquisition.h : Invalid declaration syntax
*** ERROR C131 IN LINE 84 OF ..librariesstm8_touchsensing_driverinc/stm8_tsl_rc_acquisition.h : unbalanced &sharpif-endif controls
RCSTM8 COMPILATION COMPLETE. 0 WARNING, 3 ERRORS
The command: ''rcstm8 ..librariesstm8_touchsensing_driversrcstm8_tsl_api.c OBJECT(Debugstm8_tsl_api.o) PIN(''C:Program FilesRaisonanceRideincST7'') PIN(''C:Program FilesRaisonanceRideinc'')  WRV(0) STM8(SMALL) DEBUG DGC(page0) AUTO  OT(0) PR(Debugstm8_tsl_api.lst) CD CO SB LAOB PIN(..librariesstm8s_stdperiph_driverinc) PIN(..librariesstm8_touchsensing_driverinc) PIN(source) DF(STM8S105)'' has failed, the returned value is: 2

exit code=2.
=================================================  
#discovery #touch-library

回帖(1)

王冬梅

2019-7-15 12:40:36
触摸感应库似乎没有为Raisonance编译器定义__CONST。
 
 
 将__CONST定义为项目设置中的代码可以解决问题;或者在代码中将其定义为:

以上来自于谷歌翻译


以下为原文





It seems that the Touch Sensing Library does not define __CONST for Raisonance compiler.


Defining __CONST as code in the project settings fixed the problem; or define it in the code as:

  • #define __CONST code
举报

更多回帖

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