Limiting program RAM addresses

Mohammed Khoory mkhoory at eiast.ae
Fri Nov 29 09:03:20 UTC 2013


I followed the instructions located here
http://www.rtems.org/wiki/index.php/Using_the_RTEMS_DOS_File_System#RAM_Disk

I used the following code to set up the global variables:

rtems_ramdisk_config rtems_ramdisk_configuration[] = {
		{
				block_size: 512,
				block_num: 12288,
				location: (void*)0x40200000
		}
};
size_t rtems_ramdisk_configuration_size = 1;


Then I used the following code to register the ramdisk
rtems_driver_address_table ramdiskEntry = RAMDISK_DRIVER_TABLE_ENTRY;
rtems_device_major_number major;
rtems_status_code rc;

/* Register the RAMDisk */
rc = rtems_io_register_driver(0, &ramdiskEntry, &major);
if(rc != RTEMS_SUCCESSFUL){
	return 1;

The registration is successful when tested.

I also forgot to mention that I'm using RTEMS 4.10.2

>-----Original Message-----
>From: rtems-users-bounces at rtems.org [mailto:rtems-users-
>bounces at rtems.org] On Behalf Of Sebastian Huber
>Sent: Friday, November 29, 2013 5:45 PM
>To: rtems-users at rtems.org
>Subject: Re: Limiting program RAM addresses
>
>On 2013-11-29 09:39, Mohammed Khoory wrote:
>> I've registered a ramdisk driver to use the range between
>> 0x40200000 - 0x40800000.
>
>How did you do this?
>
>--
>Sebastian Huber, embedded brains GmbH
>
>Address : Dornierstr. 4, D-82178 Puchheim, Germany
>Phone   : +49 89 189 47 41-16
>Fax     : +49 89 189 47 41-09
>E-Mail  : sebastian.huber at embedded-brains.de
>PGP     : Public key available on request.
>
>Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>_______________________________________________
>rtems-users mailing list
>rtems-users at rtems.org
>http://www.rtems.org/mailman/listinfo/rtems-users





More information about the users mailing list