<?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>AREA Directive problem in ARM LPC2148</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25797/area-directive-problem-in-arm-lpc2148</link><description> 
Hi all, 

 
I am making some small programs in ARM assembly language. 

 
I am using KEIL software for the programming and compialtion. 

 
The problem I am facing is during a program in which data form one
memory is copied to another memory. 

 
The</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: AREA Directive problem in ARM LPC2148</title><link>https://community.arm.com/thread/115888?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2010 22:07:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:08a9fc33-b3d6-43ad-8102-dcbd33e9dda8</guid><dc:creator>Arvind Shrivasatva</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanx for ur reply ...&lt;/p&gt;

&lt;p&gt;
But my point is ... is this the correct way of doing ...&lt;/p&gt;

&lt;p&gt;
If i have to read and write the same memory at same time ... then
what?&lt;/p&gt;

&lt;p&gt;
I am using only KEIL debugger and not the real ARM board ... so is
this so that ... it will work on the borad correctly?&lt;/p&gt;

&lt;p&gt;
What mistake I am making here ... ?&lt;/p&gt;

&lt;p&gt;
regards&lt;br /&gt;
Arvind&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AREA Directive problem in ARM LPC2148</title><link>https://community.arm.com/thread/104086?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2010 07:10:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dd64a9ed-30f6-453d-a36e-15ffa3f4a1d2</guid><dc:creator>Marcus Harnisch</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;gt; If i write like this ... then it is working ...&lt;/p&gt;

&lt;pre&gt;
AREA BlockData, DATA, READONLY
src DCD 1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4

AREA BlockData, DATA
dst DCD 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 END
&lt;/pre&gt;

&lt;p&gt;
Yes, because now source data (src) doesn&amp;#39;t need to be relocated to
RAM. Due to the READONLY attribute the linker will place the values
in flash memory. You will observe, though, that the memory block
beginning at dst isn&amp;#39;t all zeros before __main() executes.&lt;/p&gt;

&lt;p&gt;
Regards&lt;br /&gt;
Marcus&lt;br /&gt;
&lt;a href="http://www.doulos.com/arm/"&gt;http://www.doulos.com/arm/&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AREA Directive problem in ARM LPC2148</title><link>https://community.arm.com/thread/78476?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2010 04:05:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:80c0e68f-8769-4294-9082-662ed97018e7</guid><dc:creator>Arvind Shrivasatva</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi,&lt;/p&gt;

&lt;p&gt;
thanx for your reply.&lt;/p&gt;

&lt;p&gt;
As I am using KEIL uv 4 ... which takes Real View Compiler.&lt;/p&gt;

&lt;p&gt;
The startup.s file is given by the IDE only.&lt;br /&gt;
Before this I was having probs for the compilation and after
searching so many forums including this I got to know that ... I have
to comment some lines in the last block of this default file and in
my assembly file I have to include&lt;/p&gt;

&lt;p&gt;
EXPORT __main&lt;/p&gt;

&lt;p&gt;
Then only my assembly program would get compile successfully.
Fortunately it works ... but as of now ... the problem I am facing is
in terms of memory.&lt;/p&gt;

&lt;p&gt;
I have checked in the Debugger of keil that i cant even read the
source data.&lt;/p&gt;

&lt;p&gt;
If i write like this ... then it is working ...&lt;/p&gt;

&lt;p&gt;
====================================================&lt;/p&gt;

&lt;p&gt;
AREA BlockData, DATA, READONLY&lt;br /&gt;
src DCD 1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4&lt;/p&gt;

&lt;p&gt;
AREA BlockData, DATA&lt;br /&gt;
dst DCD 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 END&lt;/p&gt;

&lt;p&gt;
=====================================================&lt;/p&gt;

&lt;p&gt;
But my query is that with using READWRITE it should also work as
per the tutorials given in the internet and all the books.&lt;/p&gt;

&lt;p&gt;
regards&lt;br /&gt;
Arvind&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AREA Directive problem in ARM LPC2148</title><link>https://community.arm.com/thread/58420?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2010 03:38:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c054fce5-10a5-49e3-a20c-05ae9c06fde0</guid><dc:creator>Marcus Harnisch</dc:creator><description>&lt;p&gt;&lt;p&gt;
The problem is that by overwriting __main() you have turned off
the C library initialization, which takes care of all the copy action
that you are missing here.&lt;/p&gt;

&lt;p&gt;
The easiest solution would perhaps be to rename your __main() to
main(), which brings in the C library initialization including the
scatter loading code.&lt;/p&gt;

&lt;p&gt;
Regards&lt;br /&gt;
Marcus&lt;br /&gt;
&lt;a href="http://www.doulos.com/arm/"&gt;http://www.doulos.com/arm/&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>