<?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>Load file to specific memory area</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/29125/load-file-to-specific-memory-area</link><description> 
Hi 
i try to use the debugger script in order to stimulate data into my
ADC peripheral. this is the script i wrote: 

 
/* Map the user specific memory space */
MAP S:0, S:0xFFFF READ WRITE

/* Store the content of the S: Space */
LOAD INPUTDAT.HEX</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Load file to specific memory area</title><link>https://community.arm.com/thread/127816?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2012 12:38:41 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:af26403c-0a8e-46ed-b29b-8d3a9703b176</guid><dc:creator>M. Sure</dc:creator><description>&lt;p&gt;&lt;p&gt;
thnx Per&lt;br /&gt;
you indeed made your point. i&amp;#39;m using HEX format which is called (in
the application i&amp;#39;m using to generate it) &amp;quot;Intel Hex Code-8 bit&amp;quot;.&lt;br /&gt;
it looks like this:&lt;br /&gt;
:02000004F80002&lt;br /&gt;
:1000000031353031333131323731323831303731C7&lt;br /&gt;
:1000100032333133313132333132363132333132BE&lt;br /&gt;
:1000200038313134313131313135313231313237AA&lt;br /&gt;
:100030003133313132323131383131373131373199&lt;br /&gt;
. .&lt;br /&gt;
. :090900003131343131343131342C&lt;br /&gt;
:00000001FF&lt;/p&gt;

&lt;p&gt;
i can manage to find which header i should use in order to locate
the file to the place in the memory i intend to.&lt;/p&gt;

&lt;p&gt;
i&amp;#39;m working with SiLab 8051F931 which has 64KB code and 4KB
RAM&lt;/p&gt;

&lt;p&gt;
the mapping includes I:, C: and X:&lt;/p&gt;

&lt;p&gt;
can i use, when working in debug mode with USB debug adapter, the
S: memory space? can the debugger work with virtual memory that is
located outside the micro (i mean in the PC)?&lt;/p&gt;

&lt;p&gt;
i have plenty of free memory in C: in case it&amp;#39;s required i can
locate the data i need over there, but if possible i&amp;#39;d like to use S:
(assuming it is indeed virtual, external to the chip).&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load file to specific memory area</title><link>https://community.arm.com/thread/119847?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2012 03:56:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:368432c7-03de-41cc-a357-f52097b5c591</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
When writing data to HEX format, you need to specify what address
range to save.&lt;/p&gt;

&lt;p&gt;
When loading HEX format, the file already contains the address
information captured during save.&lt;/p&gt;

&lt;p&gt;
So what kind of memory mapping do you have, where you can&amp;#39;t use
the address mapping already stored in your hex file?&lt;/p&gt;

&lt;p&gt;
With hex file I&amp;#39;m now assuming (which may be incorrect) that we
are talking about an Intel-Hex file.&lt;/p&gt;

&lt;p&gt;
Note once more that you are randomly talking about some unknown
&amp;quot;generic&amp;quot; beast.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load file to specific memory area</title><link>https://community.arm.com/thread/106494?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2012 22:49:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:16a89738-fe9f-47aa-b885-d558bf5c0315</guid><dc:creator>M. Sure</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi Per&lt;br /&gt;
thnx for your response.&lt;br /&gt;
regardless what exactly C: or S: are, my question is about the LOAD
command. if there is no way to insert in the command parameters where
i&amp;#39;d like the data to loaded, how does the system determine where to
load this data? is there any rule for that?&lt;br /&gt;
for example the SAVE command does include parameters for the memory
section to be saved. i expect the LOAD command will also include such
parameters, or there will be a rule definding that. as there are no
parameters for the LOAD command i probably missed the rule.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load file to specific memory area</title><link>https://community.arm.com/thread/92138?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2012 02:50:34 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c8e288ac-15d4-4cf0-b19a-2b91f26eb3af</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Your thread does not seem to contain any information telling us
what C: or S: would be. A hex file normaly contains all address
information needed to get the information stored at the correct
location. The original records covers an 64kB address range while
extensions allows support for much larger memory ranges by preceding
data with specific records that may specify a long offset.&lt;/p&gt;

&lt;p&gt;
Do you have multiple memories that have overlapping address ranges
in your non-specific (generic) processor (does such a beast even
exist???)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load file to specific memory area</title><link>https://community.arm.com/thread/61259?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2012 02:01:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fe207ddc-4c56-4fba-a7d9-634891646cd6</guid><dc:creator>M. Sure</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi&lt;br /&gt;
i made some more progress.&lt;br /&gt;
i can save file and i even succeeded to load file.&lt;br /&gt;
unlike SAVE file command, where you can determine the memory space to
be saved, in LOAD command i can&amp;#39;t find any way to control where i can
load my data to.&lt;br /&gt;
is there a way to determine where my data will be loaded to?&lt;br /&gt;
BTW - i succeeded to SAVE file after reading carefully the online
HELP for SAVE command. i saw the way the full path should be defined
and since i follow the instructions it works, for example&lt;/p&gt;

&lt;p&gt;
LOAD C:\Users\Workroom\Documents\ABC\Data_Files\A2D_burst.hex&lt;/p&gt;

&lt;p&gt;
the problem is that the data was loaded to C:0, c:0xaaaa.&lt;br /&gt;
i&amp;#39;d like to load it to S:0, 0xaaaa&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load file to specific memory area</title><link>https://community.arm.com/thread/61258?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2012 11:20:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ab5417e4-def9-4eac-8a13-0c9329facfd4</guid><dc:creator>M. Sure</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi&lt;br /&gt;
well, i made some progress, yet i have some unsolved issues.&lt;br /&gt;
i managed to manually change values in memory S:&lt;br /&gt;
the main point is that i have a file (inputdat.hex) with data i want
to locate in S: starting 0x0000 till 0x1000.&lt;br /&gt;
i use the save command (it should be save, not load as mentioned
above) as was explained in the example i saw (attached in the
previous mail above).&lt;br /&gt;
i can&amp;#39;t see any change in S:&lt;br /&gt;
all memory values remain 00 as they were before the command.&lt;br /&gt;
what should i do in order to load the desired data file into the
memory?&lt;br /&gt;
thnx&lt;br /&gt;
Meir&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>