<?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>c-file befor startup code</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/23025/c-file-befor-startup-code</link><description> 
How can I run a c-file bevor the usual startup code? 

 
Which changes do I have to made in the startup code? I&amp;#39;m working
with the lpc2214. 

 
thanks in advance 
JChris 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: c-file befor startup code</title><link>https://community.arm.com/thread/99988?ContentTypeID=1</link><pubDate>Thu, 29 Nov 2007 05:59:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:73ef73fe-2856-4999-a230-03d54a87eeff</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;That means I have to run this c-file after the startup code and
befor the main function. How can I do that? Where is the right place
and the right call for the function?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
What is the difference between&lt;/p&gt;

&lt;pre&gt;
StartCode();
main();
and
void main (void)
{
  StartCode();
....
&lt;/pre&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: c-file befor startup code</title><link>https://community.arm.com/thread/113456?ContentTypeID=1</link><pubDate>Thu, 29 Nov 2007 00:35:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f575e9fe-b04e-41e3-b433-707ef4bc9e7c</guid><dc:creator>JChris Jendsen</dc:creator><description>&lt;p&gt;&lt;p&gt;
Where would be the right place to do that in the startup? Just
befor entering the main routine?&lt;/p&gt;

&lt;p&gt;
Could you describe the code I have to adjust to the startup -
because I&amp;#39;m not really familiar with assembler.&lt;/p&gt;

&lt;p&gt;
Thanks in advance&lt;br /&gt;
JChris&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: c-file befor startup code</title><link>https://community.arm.com/thread/99978?ContentTypeID=1</link><pubDate>Thu, 29 Nov 2007 00:06:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fe13db6f-7f29-4d57-b5cf-f3f0c8236811</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;I want to fill the area between the stack and the heap to get
to know if both areas are big enough for my project.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
So why do you specifically need a &amp;#39;&lt;b&gt;C&lt;/b&gt;&amp;#39; file to do that?&lt;/p&gt;

&lt;p&gt;
Isn&amp;#39;t that precisely the sort of thing that is far more
appropriate in assembler?&lt;/p&gt;

&lt;p&gt;
Why not just include this in the startup?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: c-file befor startup code</title><link>https://community.arm.com/thread/75768?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2007 22:13:53 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a29542c0-153c-420c-a484-97ee192109e1</guid><dc:creator>JChris Jendsen</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;For instance, a ram test coded in C could be called before the
startup code initializes the static C variables&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
I want to fill the area between the stack and the heap to get to
know if both areas are big enough for my project.&lt;/p&gt;

&lt;p&gt;
That means I have to run this c-file after the startup code and
befor the main function. How can I do that? Where is the right place
and the right call for the function?&lt;/p&gt;

&lt;p&gt;
JChris&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: c-file befor startup code</title><link>https://community.arm.com/thread/88722?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2007 17:52:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:384fdc38-ba2a-4731-80b5-507a48d6a1fa</guid><dc:creator>Dan Henry</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;You can&amp;#39;t!&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
You most certainly &lt;b&gt;can&lt;/b&gt;! You just can&amp;#39;t rely on a
standards-compliant execution environment until the &amp;quot;start-up&amp;quot; code
has provided it for you.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: c-file befor startup code</title><link>https://community.arm.com/thread/88718?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2007 15:13:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1a33c95c-26a1-4dc2-890b-bc1c54668da6</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;but I would be surprised to learn that you can&amp;#39;t call your own
C functions before main().&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Well, that&amp;#39;s not what the OP asked for. He was talking about
running C functions before the usual startup code, not just before
main().&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: c-file befor startup code</title><link>https://community.arm.com/thread/49049?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2007 15:10:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a25e0f7f-87ad-4774-b836-cc50a982f8b7</guid><dc:creator>Georget Stephane</dc:creator><description>&lt;p&gt;&lt;p&gt;
I am not very familiar with the ARM toolchain, but I would be
surprised to learn that you can&amp;#39;t call your own C functions before
main(). Isn&amp;#39;t that just a matter of jumping to a C function from an
assembly file? And then, depending on how soon you call it, the C
function must be crafted in such a way that it will cope with lack of
initialization of, well, you choose what. For instance, a ram test
coded in C could be called before the startup code initializes the
static C variables.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: c-file befor startup code</title><link>https://community.arm.com/thread/49048?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2007 13:54:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7a251ae4-2194-4407-b1f8-e639142b4a10</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;b&gt;You can&amp;#39;t!&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
that&amp;#39;s why it&amp;#39;s called &amp;quot;start-up&amp;quot; code: it&amp;#39;s required to get
things &lt;b&gt;started&lt;/b&gt; - and that has to happen &lt;i&gt;&lt;b&gt;before&lt;/b&gt;&lt;/i&gt;
you can run any &amp;#39;C&amp;#39; code!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>