<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">I have been working on the following checks... What do you think?</span><br style="font-family:arial,sans-serif;font-size:13px"><div style="font-family:arial,sans-serif;font-size:13px">
<br>1) Memory configuration on Target:<br><br> mig0 Aeroflex Gaisler Xilinx MIG DDR3 Controller <br> AHB: 40000000 - <a href="tel:80000000" value="+6480000000" target="_blank">80000000</a> /*RAM SPACE [I'M NOT USING SRAM]*/<br>
APB: <a href="tel:80000400" value="+6480000400" target="_blank">80000400</a> - <a href="tel:80000500" value="+6480000500" target="_blank">80000500</a><br> SDRAM: 1024 Mbyte<br><br><br>2) PROGRAM RUNING IN RAM:<br>
<br>grmon2> load /home/publico/facundo/mem_prom_rtems <br> 40000000 .text 130.8kB / 130.8kB [===============>] 100%<br> 40020B50 .data 4.4kB / 4.4kB [===============>] 100%<br>
40021D00 .jcr 4B [===============>] 100%<br> Total size: 135.25kB (93.91kbit/s)<br> Entry point 0x40000000<br> Image /home/publico/facundo/mem_prom_rtems loaded<br><br>grmon2> run<br>
<br> Program exited normally.<br> <br>grmon2> mem -ascii 0x400a0000 20<br> 0x400a0000 55555555 55555555 55555555 55555555 UUUUUUUUUUUUUUUU<br> 0x400a0010 55555555 UUUU<br><br>
-------------------------------------------------------------------------------------<br><br>3) Build the prom.out (for PROM):<br><br># mkprom2 -msoft-float -ramsize 1024000 -nosram -sdram 1024 -romsize 128000 -romwidth 16 -freq 50 -baud 83400 -rmw -ccprefix sparc-rtems mem_prom_rtems<br>
<br>NOTE: "mem_prom_rtems is the code that I have loaded in Ram"<br><br><br><br>4) PROGRAM LOAD IN FLASH (PROM)<br><br>grmon2> flash unlock all<br> Unlock complete<br> <br>grmon2> flash erase all<br> Erase in progress<br>
Block @ 0x07ff8000 : code = 0x80 OK<br> Erase complete<br> <br>grmon2> flash load /home/publico/facundo/prom.out<br> 00000000 .text 84.8kB / 84.8kB [===============>] 100%<br> Total size: 84.81kB (76.08kbit/s)<br>
Entry point 0x0<br> Image /home/publico/facundo/prom.out loaded<br> <br>grmon2> <br><br>5) (after Reset)<br><br>grmon2> mem -ascii 0x400a0000 20<br> 0x400a0000 40acbebf 78171d5a e7c78a5b db3ddfe3 @...x..Z...[.=..<br>
0x400a0010 e67aeb3c .z.<<br><br><br>Is for that reason that I know why the program is not running. This code (without Rtems)has been working perfectly using sparc-elf-gcc and mkprom2.<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 11 March 2014 16:46, Joel Sherrill <span dir="ltr"><<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
<br>
<div>On 3/11/2014 2:33 PM, Martínez, Pablo
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div style="font-family:arial,sans-serif;font-size:13px">
<div>Hello all,<br>
<br>
</div>
following many posts and documentations on this group and
Gaisler support, I have proved many configurations about
loading a Rtems application on PROM.<br>
<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">CODE:<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">// The
following code write many memory address with the same value<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">
<br>
#include <stdio.h><br>
#include <stdlib.h><br>
<br>
#define CONFIGURE_INIT<br>
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER<br>
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER<br>
#define CONFIGURE_MAXIMUM_TASKS 4<br>
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE<br>
#define CONFIGURE_EXTRA_TASK_STACKS (3 *
RTEMS_MINIMUM_STACK_SIZE)<br>
<br>
<br>
#define CONFIGURE_INIT<br>
#include "system.h"<br>
<br>
<br>
rtems_task Init(<br>
rtems_task_argument argument<br>
)<br>
{<br>
<br>
unsigned *mem1;<br>
int i;<br>
<br>
mem1 = 0X400a0000;<br>
<br>
for (i=0; i<200; i++)<br>
{<br>
<br>
(*mem1) = 0x55555555;<br>
mem1++;<br>
}<br>
<br>
exit(0);<br>
}<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">
<div><br>
----------------------------------------------------<br>
<br>
</div>
<div>I Could implement and run in flash (PROM) the code
without Rtems (using: sparc-elf-gcc and mkprom2)<br>
</div>
<div><br>
</div>
<div>Now, I need implement the code with Rtems, for that
reason I have compiled the below code with:<br>
<br>
sparc-rtems-gcc and/or sparc-rtems4.10-gcc In both case I
can create the "executable" using Rtems Sparc and Rtems
Toolchain on Eclipse.those implementations have been proved
on target (Xilinx Kintex KC-705) and they run perfect.<br>
<br>
</div>
<div>Now, I need to have this code in PROM. for that reason I
did the following steps:<br>
<br>
</div>
<div>1) Created the ".exe" file with Rtems Toolchain on
Eclipse<br>
</div>
<div>2) Created the prom.out using mkprom (with many
configurations)<br>
<br>
mkprom2 -msoft-float -ramsize 1024000 -nosram -sdram 1024
-romsize 128000 -romwidth 16 -freq 50 -baud 83400 -rmw
-ccprefix sparc-rtems mem_prom_rtems<br>
<br>
</div>
<div>I can generate the "prom.out" but is not working on the
target.... (flash erase all; flash load prom.out, flash lock
all)<br>
<br>
</div>
<div>Could somebody give me an explanation about what I'm
doing wrong?, or give me an advice to create the prom.out
successfully?</div>
<div><br>
</div>
</div>
</div>
</blockquote></div></div>
Does it get to Init()? <br>
<br>
What does it do when it is not working? There isn't much going on in
your program<br>
so it would just run and exit. If the loop doesn't corrupt something
important.<div class=""><br>
<blockquote type="cite">
<div dir="ltr">
<div style="font-family:arial,sans-serif;font-size:13px">
<div>Regards,</div>
</div>
<div><br>
</div>
-- <br>
Martínez, Pablo Agustín
</div>
</blockquote>
<br>
</div><span class="HOEnZb"><font color="#888888"><pre cols="72">--
Joel Sherrill, Ph.D. Director of Research & Development
<a href="mailto:joel.sherrill@OARcorp.com" target="_blank">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985</pre>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Martínez, Pablo Agustín
</div>