This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

L6218E Error exported functions

Hi Everyone,
I'm newbie about keil and ARM tools. I have STM32 discovery board and I want to build RTC clock with calendar which is controlled by RS232.

I have a problem when use exported functions which are defined in stm32f10x_XXX.h.

I prapare configration wizard to create STM32_Init.c. Enabled USART and RTC.

I got error message from compiler. "Error: L6218E: Undefined symbol RTC_EnterConfigMode (referred from main.o)."
I search L6218E error code on form and everone said its about defination and library manegment.

I checked project explorer window and check "stm32f10x_rtc.h" file connected to main.c . I can't use any other stm32f10x_XXX.h libraries exported functions too.

This is code which I worked on it. Why I got L6218E ? Could u guide to me for this.

Best regards

#include <stm32f10x_lib.h>                        // STM32F10x Library Definitions
#include "STM32_Init.h"                           // STM32 Initialization
#include "stdio.h"
#include "string.h"

int saniye=0;
int dakika=59;
int saat=11;                                     // Time variable saniye-second dakika-minute saat-hour

void SendChar (char text[]) ;    // Send Char to RS232
void SendByte (int byte);                // Send byte to RS232

char aName[] = "RTC over RS232\n\r";
char aTime[] = "Timer \n\r";
char buffer[] = "24 : 59 : 59\n\r";

  MAIN function
int main (void) {
        stm32_Init ();                                                          // STM32 init
        while (1){
             RTC_EnterConfigMode();  // PROBLEM is HERE. Without this line, Code Worked
                RTC_ExitConfigMode();   // PROBLEM is HERE  Without this line, Code Worked
                if(GPIOA->IDR & (u32)(1<<0))                       // Led 4 blink When push Button
}                                                                                               // end main

void RTC_IRQHandler(void)       //RTC interreupt handler to send Time data RS232 port every second
        sprintf (buffer, "%d : %d : %d\n\r", saat,dakika,saniye); // Write Time variable to Buffer

 if (RTC->CRL & (1<<0) ) {                       // check second flag
    RTC->CRL &= ~(1<<0);                         // clear second flag

        if(++saniye>=60){                    // create time value with RTC interrupt and count                            time variale
        if(GPIOC->IDR & (u32)(1<<9)){                      //Toggle every  sec LED3
} // end RTC_IRQHandler

void SendChar ( char text[] )
         unsigned int  i, len;
         len = strlen(text);
         for(i=0; i<len; i++)

void SendByte (int byte)
        while (!(USART1->SR & USART_FLAG_TXE));   //Wait for the uart to finish sending the byte.
        USART1->DR = byte;