cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S Touch Sensing Library v2.3.1 & Raisonance tools

kfleong
Associate II
Posted on March 15, 2011 at 07:03

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 ..\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(page0) 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(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 ..\libraries\stm8_touchsensing_driver\inc/stm8_tsl_rc_acquisition.h : 'extern' specifier not allowed in the context

*** ERROR C074 IN LINE 83 OF ..\libraries\stm8_touchsensing_driver\inc/stm8_tsl_rc_acquisition.h : Invalid declaration syntax

*** ERROR C131 IN LINE 84 OF ..\libraries\stm8_touchsensing_driver\inc/stm8_tsl_rc_acquisition.h : unbalanced &sharpif-endif controls

RCSTM8 COMPILATION COMPLETE. 0 WARNING, 3 ERRORS

The command: ''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(page0) 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(source) DF(STM8S105)'' has failed, the returned value is: 2

exit code=2.

=================================================

#discovery #touch-library
2 REPLIES 2
kfleong
Associate II
Posted on March 21, 2011 at 10:29

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

kfleong
Associate II
Posted on March 21, 2011 at 11:49

Further investigation found that the problem lies in the Standard Peripheral Library (FWLIB) that I was using!

The FWLIB I was using is v2.0.0 (2011-02-25), while the Touch Sensing Library was using v1.1.2 (2010-09-15).

In stm8s.h file of v1.1.2, the __CONST is defined as code, while in v2.0.0, CONST is defined as code! Note the missing double underscore in front!

The v2.0.0 should have a __CONST defined for compatibility reasons.

HTH.