Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Error: L6218E: Undefined symbol main (referred from rtentry2.o).

$
0
0

Hello

    I am using a LM3S8962 Evaluation Board. A few days ago I tried to display a image on the OLED screen. When I compiled my project using KeilC, I got this error "GrphEval.axf: Error: L6218E: Undefined symbol main (referred from rtentry2.o)". My code is shown below:

#include <LM3Sxxxx.H>

extern const unsigned char g_pucImage[];

int main(void)
{
    tContext sContext;
    tRectangle sRect;

    SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ);
    RIT128x96x4Init(3500000);
    GrContextInit(&sContext, &g_sRIT128x96x4Display);

    // Clear the screen
    sRect.sXMin = 0;
    sRect.sYMin = 0;
    sRect.sXMax = 127;
    sRect.sYMax = 95;
    GrContextForegroundSet(&sContext, ClrBlack);
    GrRectFill(&sContext, &sRect);

    // Draw image on OLED
    GrImageDraw(&sContext, g_pucImage, 20, 3);
    GrFlush(&sContext);

    // Delay 9 seconds
    SysCtlDelay(SysCtlClockGet() * 3);

    // Later lab steps go between here
    // and here

    // Clear the screen
    sRect.sXMin = 0;
    sRect.sYMin = 0;
    sRect.sXMax = 127;
    sRect.sYMax = 95;
    GrContextForegroundSet(&sContext, ClrBlack);
    GrRectFill(&sContext, &sRect);
    GrFlush(&sContext);

    // Loop forever
    while(1)
    {
    }
}

    I have added DriverLib.lib, grlib.lib, pic.c (a file containing an array for the image I want to display on the OLED), rit128x96x4.c, rit128x96x4.h. Could any one provide a solution? Thank in advance.


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>