Topic : Problem compiling stm8s_can.c from the ST firmware library

Forum : ST7/STM8

Original Post
Post Information Post
May 19, 2009 - 11:56pm
Guest

I get the following error:

Compiling ..\fw\stm8s_can.c...
rcstm8 ..\fw\stm8s_can.c OBJECT(Debug\stm8s_can.o) PIN("C:\Program Files\Raisonance\Ride\Inc\STM8") PIN("C:\Program Files\Raisonance\Ride\Inc") PIN("C:\Program Files\Raisonance\Ride\Inc\ST7") WRV(0) STM8(LARGE) DEBUG DGC(page0) AUTO OT(7,SIZE) PR(Debug\stm8s_can.lst) CD CO SB LAOB PIN(..\egt) PIN(..\fw) PIN(..\xcp) PIN(..\util)
The command: "rcstm8 ..\fw\stm8s_can.c OBJECT(Debug\stm8s_can.o) PIN("C:\Program Files\Raisonance\Ride\Inc\STM8") PIN("C:\Program Files\Raisonance\Ride\Inc") PIN("C:\Program Files\Raisonance\Ride\Inc\ST7") WRV(0) STM8(LARGE) DEBUG DGC(page0) AUTO OT(7,SIZE) PR(Debug\stm8s_can.lst) CD CO SB LAOB PIN(..\egt) PIN(..\fw) PIN(..\xcp) PIN(..\util)" has failed, the returned value is: -1073741819
exit code=-1073741819.

Not a very helpful error message. Any help is appreciated.

Replies
Post Information Post
+1
0
-1
May 20, 2009 - 6:03pm
Guest

Hi

Please make a trail to install the latest release of Ride7 and Rkit-STM8 (from today) and let us know if it solves the issue.

Regards,
Matloub

From the release you can find:

Quote:

Several peephole optimizations leading to invalid code in O(3) optimization
level have been fixed. Most noticeably, the stm8_can.c file from the ST
firmware library was generating an internal error in the compiler in some
+1
0
-1
May 21, 2009 - 4:57pm
Guest

Thanks, that appears to have fixed the problem. The next issue I have run into is the following unresolved symbol:

***ERROR 100 : UNRESOLVED EXTERNAL
SYMBOL : ?ITC_GetCPUCC(STM8S_ITC)

The ST firmware lib has the following code:

/**
* @brief Utility function used to read CC register.
* @par Parameters:
* None
* @retval u8 Content of CC register (in A register).
* @par Required preconditions:
* None
*/
#ifdef _COSMIC_
u8 ITC_GetCPUCC(void)
{
_asm("push cc");
_asm("pop a");
return; /* Ignore compiler warning, the returned value is in A register */
}
#else
extern u8 ITC_GetCPUCC(void);
#endif

Is this defined somewhere in a Raisonance library?

+1
0
-1
May 22, 2009 - 1:59pm
Guest

Hi

It is strange because I have no problem to compile stm8_it.c where the function is defined.
Actually it just call the function _getCC_ which is intrinsic function (declared in intrins.h)

regards,
Matloub