Limiting program RAM addresses

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Nov 29 09:16:30 UTC 2013


On 2013-11-29 10:03, Mohammed Khoory wrote:
> rtems_ramdisk_config rtems_ramdisk_configuration[] = {
> 		{
> 				block_size: 512,

The : notation is a GNU extension.  I would use C99 .block_size.

> 				block_num: 12288,
> 				location: (void*)0x40200000
> 		}
> };
> size_t rtems_ramdisk_configuration_size = 1;

This doesn't work, but you can use this:

static char ramdisk_buffer[12288][512];

rtems_ramdisk_config rtems_ramdisk_configuration[] = {
	{
		sizeof(ramdisk_buffer[0]),
		sizeof(ramdisk_buffer) / sizeof(ramdisk_buffer[0]),
		&ramdisk_buffer[0][0]
	}
};

-- 
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.



More information about the users mailing list