Mkprom2 & Rtems

D Peter Siddons siddons at bnl.gov
Tue Mar 11 19:52:34 UTC 2014


Hi Pablo,
   Where are the variables stored? THey need to be in RAM. The linkcmds 
should ensure that.
Pete.
On 03/11/2014 03: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?
>
> Regards,
>
> -- 
> Martínez, Pablo Agustín
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users

-- 
D. Peter Siddons
Detector Development Group Leader
Bldg. 535B
Photon Sciences Directorate,
Brookhaven National Laboratory
Upton, NY 11973

email: siddons at bnl.gov
Phone: (631) 344-2738

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


More information about the users mailing list