Mkprom2 & Rtems
Martínez, Pablo
pabloa.mar at gmail.com
Tue Mar 11 20:56:10 UTC 2014
I have been working on the following checks... What do you think?
1) Memory configuration on Target:
mig0 Aeroflex Gaisler Xilinx MIG DDR3 Controller
AHB: 40000000 - 80000000 /*RAM SPACE [I'M NOT USING SRAM]*/
APB: 80000400 - 80000500
SDRAM: 1024 Mbyte
2) PROGRAM RUNING IN RAM:
grmon2> load /home/publico/facundo/mem_prom_rtems
40000000 .text 130.8kB / 130.8kB [===============>]
100%
40020B50 .data 4.4kB / 4.4kB [===============>]
100%
40021D00 .jcr 4B [===============>]
100%
Total size: 135.25kB (93.91kbit/s)
Entry point 0x40000000
Image /home/publico/facundo/mem_prom_rtems loaded
grmon2> run
Program exited normally.
grmon2> mem -ascii 0x400a0000 20
0x400a0000 55555555 55555555 55555555 55555555 UUUUUUUUUUUUUUUU
0x400a0010 55555555 UUUU
-------------------------------------------------------------------------------------
3) Build the prom.out (for PROM):
# mkprom2 -msoft-float -ramsize 1024000 -nosram -sdram 1024 -romsize 128000
-romwidth 16 -freq 50 -baud 83400 -rmw -ccprefix sparc-rtems mem_prom_rtems
NOTE: "mem_prom_rtems is the code that I have loaded in Ram"
4) PROGRAM LOAD IN FLASH (PROM)
grmon2> flash unlock all
Unlock complete
grmon2> flash erase all
Erase in progress
Block @ 0x07ff8000 : code = 0x80 OK
Erase complete
grmon2> flash load /home/publico/facundo/prom.out
00000000 .text 84.8kB / 84.8kB [===============>]
100%
Total size: 84.81kB (76.08kbit/s)
Entry point 0x0
Image /home/publico/facundo/prom.out loaded
grmon2>
5) (after Reset)
grmon2> mem -ascii 0x400a0000 20
0x400a0000 40acbebf 78171d5a e7c78a5b db3ddfe3 @...x..Z...[.=..
0x400a0010 e67aeb3c .z.<
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.
On 11 March 2014 16:46, Joel Sherrill <joel.sherrill at oarcorp.com> wrote:
>
> On 3/11/2014 2:33 PM, Martínez, Pablo wrote:
>
> Hello all,
>
> following many posts and documentations on this group and Gaisler
> support, I have proved many configurations about loading a Rtems
> application on PROM.
>
> CODE:
> // The following code write many memory address with the same value
>
> #include <stdio.h>
> #include <stdlib.h>
>
> #define CONFIGURE_INIT
> #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
> #define CONFIGURE_MAXIMUM_TASKS 4
> #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
> #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
>
>
> #define CONFIGURE_INIT
> #include "system.h"
>
>
> rtems_task Init(
> rtems_task_argument argument
> )
> {
>
> unsigned *mem1;
> int i;
>
> mem1 = 0X400a0000;
>
> for (i=0; i<200; i++)
> {
>
> (*mem1) = 0x55555555;
> mem1++;
> }
>
> exit(0);
> }
>
> ----------------------------------------------------
>
> I Could implement and run in flash (PROM) the code without Rtems (using:
> sparc-elf-gcc and mkprom2)
>
> Now, I need implement the code with Rtems, for that reason I have
> compiled the below code with:
>
> 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.
>
> Now, I need to have this code in PROM. for that reason I did the
> following steps:
>
> 1) Created the ".exe" file with Rtems Toolchain on Eclipse
> 2) Created the prom.out using mkprom (with many configurations)
>
> mkprom2 -msoft-float -ramsize 1024000 -nosram -sdram 1024 -romsize 128000
> -romwidth 16 -freq 50 -baud 83400 -rmw -ccprefix sparc-rtems mem_prom_rtems
>
> I can generate the "prom.out" but is not working on the target....
> (flash erase all; flash load prom.out, flash lock all)
>
> Could somebody give me an explanation about what I'm doing wrong?, or
> give me an advice to create the prom.out successfully?
>
> Does it get to Init()?
>
> What does it do when it is not working? There isn't much going on in your
> program
> so it would just run and exit. If the loop doesn't corrupt something
> important.
>
> Regards,
>
> --
> Martínez, Pablo Agustín
>
>
> --
> Joel Sherrill, Ph.D. Director of Research & Developmentjoel.sherrill at OARcorp.com On-Line Applications Research
> Ask me about RTEMS: a free RTOS Huntsville AL 35805
> Support Available (256) 722-9985
>
>
--
Martínez, Pablo Agustín
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20140311/7358f0dd/attachment-0001.html>
More information about the users
mailing list