Home arrow Support arrow Forums

Luminary Micro Forums

<< Start < Prev 1 2 3 4 Next > End >>

print

Gold Boarder
Click here to see the profile of this user

2008/09/10 04:26

Problem with GPIO and SYSCTL lib files

Hello Everybody,

I was trying to implement maketime function with Luminary micro 3S6911 while I was facing problem with

the gpio.c where I got the error message: "undefined reference to `__error__' "

and also I was facing problem with sysctl.c with the error meaasge: "first defined here" in every inbuild function.

Is anybody able to help me to sort out the problem...?
I am very eagerly looking forward to hear something regarding this from anyone of you.

login or register to reply

cb1

Platinum Boarder
Click here to see the profile of this user

2008/09/10 06:41

Re:Problem with GPIO and SYSCTL lib files

You must have used both gpio & sysctl before.

Seems likely you now have a mismatch between your code library, inc/h files, and possibly your IDE as well.

Assuming that you can download/use free IAR KickStart 5.2 (latest) you can also download LMI's latest Software Update - which matches the changes made to IAR 5.2. This gives you a code library, assist files and an IDE with the best chance to "all work" together.

login or register to reply

LMI Dave

Expert Boarder
Click here to see the profile of this user

2008/09/10 08:17

Re:Problem with GPIO and SYSCTL lib files

Hi,

The "undefined reference to __error__" problem you are seeing most likely indicates that you have a mismatch between debug and release versions of the DriverLib library you are linking and your application code. Alternatively, you may be using the ASSERT() macro without having defined the __error__() function in your application.

In a debug build (when you define label DEBUG either in your IDE or using "-DDEBUG" passed to your compiler), error checking code is included in DriverLib via the macro ASSERT(). This macro generates a call to function __error__ if the assert fails and it is expected that the application code will include this function. Typically, all it does is enter a while(1) to stop execution and allow you to debug the problem but you can also add other code there to dump status or provide other useful information.

To get rid of the problem, you have a couple of choiced. First, you can rebuild DriverLib without DEBUG defined then link this version to your application code (assuming you don't use ASSERT() anywhere in the app). The other option, if you want to use the debug features, is to add a function to your application along the lines of the following:

#ifdef DEBUG
void
__error__(char *pcFilename, unsigned long ulLine)
{
//
// Something horrible happened! You need to look
// at file "pcFilename" at line "ulLine" to see
// what error is being reported.
//
while(1)
{
}
}
#endif

I hope this helps!

login or register to reply

cb1

Platinum Boarder
Click here to see the profile of this user

2008/09/10 10:59

Re:Problem with GPIO and SYSCTL lib files

Hi LMI Dave-

Wanted you to know that your efforts are recognized and greatly appreciated - thank you. The detail and precision of your posts will help many - the chips are SO complex that on-going description/guidance is often necessary.

Skilled, caring tech support keeps many of us @ LMI's shipping dock... Thanks again.

login or register to reply

LMI Dave

Expert Boarder
Click here to see the profile of this user

2008/09/10 11:01

Re:Problem with GPIO and SYSCTL lib files

Cb1,

You are very welcome. As a consumer of tech support in other areas, I know how frustrating it can be to get half an answer!

login or register to reply

print

Gold Boarder
Click here to see the profile of this user

2008/09/11 02:03

Re:Problem with GPIO and SYSCTL lib files

Thank you Dave and Cb1.

I am trying to sortout the problem and will let you know the progress....

Post edited by: print, at: 2008/09/11 03:17

login or register to reply
<< Start < Prev 1 2 3 4 Next > End >>