Topic : STM8S Touch Sensing Library v2.3.1 problem

Forum : ST7/STM8

Original Post
Post Information Post
March 15, 2011 - 5:31am
Guest

I am trying out the new STM8S TSL v2.3.1 and it fail to compile the library code and halted.

It fail on all the TSL v2.3.1 source files (error message as per below). What can I do to resolve the issue?

Using STVD 4.2 with Raisonance toolseet.

P/S: sample project with the problem:
hxxp://dl.dropbox.com/u/21119576/STM8S_Discovery_Test.zip

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 #if-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.
=================================================

Replies
Post Information Post
+1
0
-1
March 18, 2011 - 9:27am
Guest

It seems nobody is interested...

Anyway more info for those interested:
stm8_tsl_api.I contents (last few lines of the file)
0<----
typedef struct {
GPIO_TypeDef * PORT_ADDR ;
u8 AcqMask ;
u8 DriveMask ;
u16 * Measurement ;
u8 * RejectedNb ;
IOTYPE_T Type ;
}
TOUCH_PORT_Info_T ;
extern TOUCH_PORT_Info_T page0 sTouchIO ;
at ( 0x5328 ) hreg16 TIMACQ_CNTR ;
extern __CONST u8 Table_SCKEY_BITS [ ] ;
extern __CONST u8 Table_MCKEY_BITS [ ]

O<----

It seems that the preprocessor somehow stop there!

Anybody can help???

+1
0
-1
March 21, 2011 - 9:31am
Raisonance Support Team

Hi,

Sorry for the late reply.
The problem comes from the __CONST macro which is not defined in your project.
It should be defined as follows for the RCSTM8 compiler:
#define __CONST code

Feel free to come back to us if you still have some problems.
Best Regards,

+1
0
-1
March 21, 2011 - 10:22am
Guest

Defining the __CONST as code makes the code working!

Thanks!

I can't find any information about __CONST anywhere in the TSL user manual. Can you point out where in the documents contain this reference?

Regards,
KF

+1
0
-1
March 21, 2011 - 11:43am
Guest

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.

+1
0
-1
February 15, 2017 - 12:29am
Alok Prasad

Can someone Put this fileĀ 

hxxp://dl.dropbox.com/u/21119576/STM8S_Discovery_Test.zip

andĀ 

ftp://www.raisonance.com/pub/STM8/STM8S-Discovery_FULL.zip