Mkprom2 & Rtems

Joel Sherrill joel.sherrill at OARcorp.com
Tue Mar 11 19:46:56 UTC 2014


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 & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20140311/3a2a866b/attachment-0001.html>


More information about the users mailing list