<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Redifinition Error</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/19888/redifinition-error</link><description> Dear all, 
 
I have compiled the following program and am getting redifinition error. I have not redifined the function anywhere, Please help. 
 
Following is my code: 
 
// SFR description needs to be included 
#include &amp;lt;reg932.h&amp;gt; 
#include &amp;quot;timer.h</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Redifinition Error</title><link>https://community.arm.com/thread/87674?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2006 09:27:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9b901890-adf1-4c39-a912-94c2bf852de9</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;actually without a prototype you can get 2 messages &amp;quot;proto required&amp;quot; and on next call &amp;quot;redifinition&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Redifinition Error</title><link>https://community.arm.com/thread/45846?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2006 06:11:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:66252114-98b0-4793-ba36-4e1a2b89ae86</guid><dc:creator>Aniket Gokhale</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
It seems i forgot to protype all the functions. The .h files are bit addresses for  the sfrs as the name suggests :&lt;br /&gt;
&amp;quot;reg932.h&amp;quot; - for 89LPC932 sfrs required for initialisation.&lt;br /&gt;
&amp;quot;timer.h&amp;quot;  - for timer0 (timing for 1 second)&lt;br /&gt;
&amp;quot;eeprom.h&amp;quot; - for eeprom (eeprom read, write)&lt;br /&gt;
&amp;quot;port.h&amp;quot;   - for port 0,interrupt0 initialise sfrs&lt;br /&gt;
I need the timer to count 1 second and using the registers i want to count 500hrs. during power fail through a PF0 interrupt generated by TPS3707 on a External interrupt.&lt;br /&gt;
I am also using the code architect for the same.&lt;br /&gt;
&lt;br /&gt;
Thanks and regards,&lt;br /&gt;
Aniket&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Redifinition Error</title><link>https://community.arm.com/thread/45837?ContentTypeID=1</link><pubDate>Wed, 05 Apr 2006 03:43:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1b02ca25-2ffd-45ab-b521-e0a2c00c66c6</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;i&gt;Following is my code:&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
// SFR description needs to be included
#include &amp;lt;reg932.h&amp;gt;
#include &amp;quot;timer.h&amp;quot;
#include &amp;quot;eeprom.h&amp;quot;
#include &amp;quot;port.h&amp;quot;
&lt;/pre&gt;
&lt;br /&gt;
What&amp;#39;s in all these .h files ?&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
// flag that indicates if the EEPROM is busy or not
//static bit meeprombusy;
//bit bdata flags;
//s/bit combit = flags^0;
//extern bdata int combit flags;
//****************************
//** Main Program ** //
//****************************
void main(void)
{
interrupt_enable();
&lt;/pre&gt;
&lt;br /&gt;
Ok. I did not see a prototype for this function. Is it in one of those .h files or is it simply missing ? If this is the first time the compiler sees interrupt_enable();, it will think that it is a function definition.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
ports_init();
eeprom_init();
// flag that indicates if the EEPROM is busy or not

eeprom_initread();
if(DEEDAT =! 0)
timers_init();
else
eeprom_readloc1();
eeprom_readloc2();
eeprom_readloc3();
eeprom_readloc4();
&lt;/pre&gt;
&lt;br /&gt;
Ok. What _should_ this code do ? It looks like it should call timers_init(); if DEEDAT is not equal to zero, else call eeprom_readloc1();, eeprom_readloc2();, eeprom_readloc3(); and eeprom_readloc4();. Right now, it&amp;#39;s probably going to give you a syntax error (&amp;quot;=!&amp;quot; instead of &amp;quot;!=&amp;quot;), and then, it is going to call timers_init(); if DEEDAT is not equal to zero, else call eeprom_readloc1(); and then always call eeprom_readloc2();, eeprom_readloc3(); and eeprom_readloc4();. Also, where are the prototypes for all these functions ? The compiler sees them for the first time and will assume they are implied function definitions.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
loadvalues
&lt;/pre&gt;
&lt;br /&gt;
All this does is give you some kind of syntax error. Did you mean loadvalues(); ?&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
timers_starttimer0();
timers_stoptimer0();
}
&lt;/pre&gt;
&lt;br /&gt;
More functions without prototypes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Redifinition Error</title><link>https://community.arm.com/thread/87669?ContentTypeID=1</link><pubDate>Wed, 05 Apr 2006 03:28:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c2bafacc-8519-46de-a8cf-204eb3c8cad5</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;The source code tags are [less-than sign]pre[greater-than sign] and [less-than sign]/pre[greater-than sign].&lt;br /&gt;
&lt;br /&gt;
Apparently, the board does not let you post these tags, even when using &amp;amp;_gt; and &amp;amp;_lt; (minus the underscore). It did work in the preview, but the posting got messed up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Redifinition Error</title><link>https://community.arm.com/thread/45839?ContentTypeID=1</link><pubDate>Wed, 05 Apr 2006 03:25:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f92d0052-cda4-451d-b5f8-738b230f5fda</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;i&gt;I have compiled the following program and am getting redifinition error.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Please post the exact error message. Copy and paste it, do not retype it.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;I have not redifined the function anywhere,&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Which function ?&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Following is my code:&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Enclosing the source code tags &lt;pre&gt; and &lt;/pre&gt; will make it much more readable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>