<?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>error C127: invalid storage class</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/16676/error-c127-invalid-storage-class</link><description> Hello! 
 
I have transfered my project from uVision to uVision2. The IDE has the compiler C51 V7.06 and the linker BL51 V5.03. 
 
If I rebuilt my target, the compiler displays an error-message for all functions. 
This occurs, even if a library function</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: error C127: invalid storage class</title><link>https://community.arm.com/thread/40868?ContentTypeID=1</link><pubDate>Fri, 12 Sep 2003 14:35:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a247d07b-596f-4e1d-b47d-9383ef9fb905</guid><dc:creator>Michael Jungnickl</dc:creator><description>&lt;p&gt;Thank you very much!&lt;br /&gt;
&lt;br /&gt;
I discovered a &lt;b&gt;missing &amp;quot;;&amp;quot;&lt;/b&gt; at the end of a function-declaration within a header-file. This corrupted the main() function and the rest of my project. Now it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error C127: invalid storage class</title><link>https://community.arm.com/thread/40863?ContentTypeID=1</link><pubDate>Thu, 11 Sep 2003 12:30:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8a280612-77ec-4828-b9b7-9b6d835cd66c</guid><dc:creator>Bradford Al</dc:creator><description>&lt;p&gt;Do the declarations in the extern statements exactly match your defintions? If not, this error will display.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error C127: invalid storage class</title><link>https://community.arm.com/thread/71815?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2003 08:11:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a6403368-eddd-46eb-ae17-b91c97e832d0</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;i&gt;In detail, for each declaration of a function within the header-file, this error is created.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Hmm... you haven&amp;#39;t by any chance inadvertantly added the header files to the project as source files, have you?&lt;br /&gt;
&lt;br /&gt;
If that&amp;#39;s not it, I think a small, but self-sufficient example case will be needed, along with the actual compiler output you get (including all options, as found in the first few lines of the *.lst file).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error C127: invalid storage class</title><link>https://community.arm.com/thread/95752?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2003 07:49:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e3b8f30d-56ed-4fc5-8a40-30cd59b5237a</guid><dc:creator>John Donaldson</dc:creator><description>&lt;p&gt;Incidentally, I&amp;#39;ve had various weird things happen when upgrading versions. Sometimes the only cure is to create a new project from scratch.&lt;br /&gt;
&lt;br /&gt;
Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error C127: invalid storage class</title><link>https://community.arm.com/thread/71822?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2003 07:46:41 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2e811303-f884-4122-b5f4-da9bc59405e9</guid><dc:creator>John Donaldson</dc:creator><description>&lt;p&gt;This is a strange error, as I don&amp;#39;t really see what &amp;#39;storage class&amp;#39; has to do with &amp;#39;memory space&amp;#39;. Auto and register cannot be used outwith local variables (and parameter declarations in the case of register) in any case.&lt;br /&gt;
&lt;br /&gt;
Can you cut your program down to a main function which calls one function in another file and a header file containing the appropriate prototype, then post all the code if you still get this error?&lt;br /&gt;
&lt;br /&gt;
Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error C127: invalid storage class</title><link>https://community.arm.com/thread/40867?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2003 04:09:34 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:840be1d1-5a9d-4e16-a6ed-f0a24367ffa7</guid><dc:creator>Michael Jungnickl</dc:creator><description>&lt;p&gt;Thank you for your reply.&lt;br /&gt;
&lt;br /&gt;
Of course, the error-messages includes the name of the file and the line number.&lt;br /&gt;
In detail, for each declaration of a function within the header-file, this error is created.&lt;br /&gt;
&lt;br /&gt;
I will show you four examples. The german lines are only comments:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;header-file: &amp;quot;smotor.h&amp;quot; &lt;b&gt;&lt;br /&gt;
&lt;pre&gt;

// Bewegungsrichtung des Schrittmotors vorgeben
extern  unsigned char   setProbeDirection( const  unsigned char  direction );

// Drehgeschwindigkeit des Schrittmotors vorgeben
extern  unsigned char   setProbeSpeed( const  unsigned char  speed );

// Periodendauer als vielfaches von 5ms einstellen für den Timer
extern  void  setImpulseTime( const  unsigned int  dauer );

// Motor ein- oder ausschalten - _CLOCK wird bei aktivem Timer generiert
extern  unsigned char   setMotor( const  unsigned char  run_motor );

&lt;/pre&gt;
&lt;br /&gt;
While rebuilding, the compiler shows the following messages:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
SMOTOR.H(71): error C127: &amp;#39;_setProbeDirection&amp;#39;: invalid storage class&lt;br /&gt;
SMOTOR.H(74): error C127: &amp;#39;_setProbeSpeed&amp;#39;:  invalid storage class&lt;br /&gt;
SMOTOR.H(77): error C127: &amp;#39;_setImpulseTime&amp;#39;:   invalid storage class&lt;br /&gt;
SMOTOR.H(80): error C127: &amp;#39;_setMotor&amp;#39;: invalid storage class&lt;br /&gt;
&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error C127: invalid storage class</title><link>https://community.arm.com/thread/40861?ContentTypeID=1</link><pubDate>Tue, 09 Sep 2003 18:46:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5c9a5399-143a-4bdd-9c08-18ba1d20d777</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;Didn&amp;#39;t the message include a line number and/or identifier name?&lt;br /&gt;
&lt;br /&gt;
This would identify precisely where the error occurred.&lt;br /&gt;
&lt;br /&gt;
In uVision2, if you double-click the mnessage, it will take you straight to the offending source line.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>