forked from Imagelibrary/rtems
Now accounts for region used by RTEMS malloc and extension used
by newlib.
This commit is contained in:
@@ -30,6 +30,15 @@ extern rtems_multiprocessing_table Multiprocessing_configuration;
|
|||||||
extern posix_api_configuration_table Configuration_POSIX_API;
|
extern posix_api_configuration_table Configuration_POSIX_API;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* RTEMS C Library and Newlib support
|
||||||
|
*
|
||||||
|
* NOTE: This ends up defining these even when newlib is not used.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CONFIGURE_NEWLIB_EXTENSION 1
|
||||||
|
#define CONFIGURE_MALLOC_REGION 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default User Initialization Task Table. This table guarantees that
|
* Default User Initialization Task Table. This table guarantees that
|
||||||
* one user initialization table is defined.
|
* one user initialization table is defined.
|
||||||
@@ -412,6 +421,7 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
|
|||||||
#define CONFIGURE_MEMORY_FOR_MP 0
|
#define CONFIGURE_MEMORY_FOR_MP 0
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIGURE_MEMORY_OVERHEAD
|
#ifndef CONFIGURE_MEMORY_OVERHEAD
|
||||||
#define CONFIGURE_MEMORY_OVERHEAD 0
|
#define CONFIGURE_MEMORY_OVERHEAD 0
|
||||||
#endif
|
#endif
|
||||||
@@ -428,10 +438,12 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
|
|||||||
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
|
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
|
||||||
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
|
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
|
||||||
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
|
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
|
||||||
CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \
|
CONFIGURE_MEMORY_FOR_REGIONS( \
|
||||||
|
CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
|
||||||
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
|
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
|
||||||
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
|
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
|
||||||
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \
|
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
|
||||||
|
CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION ) + \
|
||||||
CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
|
CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
|
||||||
CONFIGURE_MEMORY_FOR_MP + \
|
CONFIGURE_MEMORY_FOR_MP + \
|
||||||
CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
|
CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
|
||||||
@@ -464,7 +476,7 @@ rtems_api_configuration_table Configuration_RTEMS_API = {
|
|||||||
CONFIGURE_MAXIMUM_SEMAPHORES,
|
CONFIGURE_MAXIMUM_SEMAPHORES,
|
||||||
CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
|
CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
|
||||||
CONFIGURE_MAXIMUM_PARTITIONS,
|
CONFIGURE_MAXIMUM_PARTITIONS,
|
||||||
CONFIGURE_MAXIMUM_REGIONS,
|
CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
|
||||||
CONFIGURE_MAXIMUM_PORTS,
|
CONFIGURE_MAXIMUM_PORTS,
|
||||||
CONFIGURE_MAXIMUM_PERIODS,
|
CONFIGURE_MAXIMUM_PERIODS,
|
||||||
CONFIGURE_INIT_TASK_TABLE_SIZE,
|
CONFIGURE_INIT_TASK_TABLE_SIZE,
|
||||||
@@ -488,7 +500,7 @@ posix_api_configuration_table Configuration_POSIX_API = {
|
|||||||
rtems_configuration_table Configuration = {
|
rtems_configuration_table Configuration = {
|
||||||
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
||||||
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
||||||
CONFIGURE_MAXIMUM_USER_EXTENSIONS,
|
CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION,
|
||||||
CONFIGURE_MICROSECONDS_PER_TICK,
|
CONFIGURE_MICROSECONDS_PER_TICK,
|
||||||
CONFIGURE_TICKS_PER_TIMESLICE,
|
CONFIGURE_TICKS_PER_TIMESLICE,
|
||||||
CONFIGURE_MAXIMUM_DEVICES,
|
CONFIGURE_MAXIMUM_DEVICES,
|
||||||
|
|||||||
@@ -30,6 +30,15 @@ extern rtems_multiprocessing_table Multiprocessing_configuration;
|
|||||||
extern posix_api_configuration_table Configuration_POSIX_API;
|
extern posix_api_configuration_table Configuration_POSIX_API;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* RTEMS C Library and Newlib support
|
||||||
|
*
|
||||||
|
* NOTE: This ends up defining these even when newlib is not used.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CONFIGURE_NEWLIB_EXTENSION 1
|
||||||
|
#define CONFIGURE_MALLOC_REGION 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default User Initialization Task Table. This table guarantees that
|
* Default User Initialization Task Table. This table guarantees that
|
||||||
* one user initialization table is defined.
|
* one user initialization table is defined.
|
||||||
@@ -412,6 +421,7 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
|
|||||||
#define CONFIGURE_MEMORY_FOR_MP 0
|
#define CONFIGURE_MEMORY_FOR_MP 0
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIGURE_MEMORY_OVERHEAD
|
#ifndef CONFIGURE_MEMORY_OVERHEAD
|
||||||
#define CONFIGURE_MEMORY_OVERHEAD 0
|
#define CONFIGURE_MEMORY_OVERHEAD 0
|
||||||
#endif
|
#endif
|
||||||
@@ -428,10 +438,12 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
|
|||||||
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
|
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
|
||||||
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
|
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
|
||||||
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
|
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
|
||||||
CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \
|
CONFIGURE_MEMORY_FOR_REGIONS( \
|
||||||
|
CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
|
||||||
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
|
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
|
||||||
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
|
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
|
||||||
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \
|
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
|
||||||
|
CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION ) + \
|
||||||
CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
|
CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
|
||||||
CONFIGURE_MEMORY_FOR_MP + \
|
CONFIGURE_MEMORY_FOR_MP + \
|
||||||
CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
|
CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
|
||||||
@@ -464,7 +476,7 @@ rtems_api_configuration_table Configuration_RTEMS_API = {
|
|||||||
CONFIGURE_MAXIMUM_SEMAPHORES,
|
CONFIGURE_MAXIMUM_SEMAPHORES,
|
||||||
CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
|
CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
|
||||||
CONFIGURE_MAXIMUM_PARTITIONS,
|
CONFIGURE_MAXIMUM_PARTITIONS,
|
||||||
CONFIGURE_MAXIMUM_REGIONS,
|
CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
|
||||||
CONFIGURE_MAXIMUM_PORTS,
|
CONFIGURE_MAXIMUM_PORTS,
|
||||||
CONFIGURE_MAXIMUM_PERIODS,
|
CONFIGURE_MAXIMUM_PERIODS,
|
||||||
CONFIGURE_INIT_TASK_TABLE_SIZE,
|
CONFIGURE_INIT_TASK_TABLE_SIZE,
|
||||||
@@ -488,7 +500,7 @@ posix_api_configuration_table Configuration_POSIX_API = {
|
|||||||
rtems_configuration_table Configuration = {
|
rtems_configuration_table Configuration = {
|
||||||
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
||||||
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
||||||
CONFIGURE_MAXIMUM_USER_EXTENSIONS,
|
CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION,
|
||||||
CONFIGURE_MICROSECONDS_PER_TICK,
|
CONFIGURE_MICROSECONDS_PER_TICK,
|
||||||
CONFIGURE_TICKS_PER_TIMESLICE,
|
CONFIGURE_TICKS_PER_TIMESLICE,
|
||||||
CONFIGURE_MAXIMUM_DEVICES,
|
CONFIGURE_MAXIMUM_DEVICES,
|
||||||
|
|||||||
@@ -169,28 +169,6 @@ int bsp_start(
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef STACK_CHECKER_ON
|
#ifdef STACK_CHECKER_ON
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for stack checker
|
* Add 1 extension for stack checker
|
||||||
|
|||||||
@@ -346,20 +346,6 @@ void bsp_start(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef STACK_CHECKER_ON
|
#ifdef STACK_CHECKER_ON
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for stack checker
|
* Add 1 extension for stack checker
|
||||||
|
|||||||
@@ -156,20 +156,6 @@ void bsp_start( void )
|
|||||||
BSP_Configuration.work_space_start = (void *)
|
BSP_Configuration.work_space_start = (void *)
|
||||||
RAM_END - BSP_Configuration.work_space_size;
|
RAM_END - BSP_Configuration.work_space_size;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for Malloc in libc_low
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -166,20 +166,6 @@ int main(
|
|||||||
_exit( 1 );
|
_exit( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for Malloc in libc_low
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -164,12 +164,6 @@ void bsp_start( void )
|
|||||||
BSP_Configuration.work_space_start = (void *)
|
BSP_Configuration.work_space_start = (void *)
|
||||||
RAM_END - BSP_Configuration.work_space_size;
|
RAM_END - BSP_Configuration.work_space_size;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for Malloc in libc_low
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Account for the console's resources
|
* Account for the console's resources
|
||||||
*/
|
*/
|
||||||
@@ -177,14 +171,6 @@ void bsp_start( void )
|
|||||||
/* console_reserve_resources( &BSP_Configuration ); */
|
/* console_reserve_resources( &BSP_Configuration ); */
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -172,16 +172,6 @@ void bsp_start( void )
|
|||||||
BSP_Configuration.work_space_start =
|
BSP_Configuration.work_space_start =
|
||||||
(void *)(RAM_END - BSP_Configuration.work_space_size);
|
(void *)(RAM_END - BSP_Configuration.work_space_size);
|
||||||
|
|
||||||
/* Add 1 region for Malloc in libc_low. */
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/* Add 1 extension for newlib libc. */
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add another extension if using the stack checker. */
|
/* Add another extension if using the stack checker. */
|
||||||
|
|
||||||
#ifdef STACK_CHECKER_ON
|
#ifdef STACK_CHECKER_ON
|
||||||
|
|||||||
@@ -171,20 +171,6 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -179,26 +179,12 @@ void bsp_start( void )
|
|||||||
BSP_Configuration.work_space_start = (void *)
|
BSP_Configuration.work_space_start = (void *)
|
||||||
(RAM_END - BSP_Configuration.work_space_size);
|
(RAM_END - BSP_Configuration.work_space_size);
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for Malloc in libc_low
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Account for the console's resources
|
* Account for the console's resources
|
||||||
*/
|
*/
|
||||||
|
|
||||||
console_reserve_resources( &BSP_Configuration );
|
console_reserve_resources( &BSP_Configuration );
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -157,20 +157,6 @@ void bsp_start( void )
|
|||||||
BSP_Configuration.work_space_start = (void *)
|
BSP_Configuration.work_space_start = (void *)
|
||||||
(((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
|
(((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for Malloc in libc_low
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -166,20 +166,6 @@ void bsp_start( void )
|
|||||||
BSP_Configuration.work_space_start = (void *)
|
BSP_Configuration.work_space_start = (void *)
|
||||||
(((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
|
(((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for Malloc in libc_low
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -145,20 +145,6 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -141,20 +141,6 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -186,20 +186,6 @@ void bsp_start( void )
|
|||||||
BSP_Configuration.work_space_start = (void *)
|
BSP_Configuration.work_space_start = (void *)
|
||||||
(RAM_END - BSP_Configuration.work_space_size);
|
(RAM_END - BSP_Configuration.work_space_size);
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -167,20 +167,6 @@ void bsp_start( void )
|
|||||||
BSP_Configuration.work_space_start = (void *)
|
BSP_Configuration.work_space_start = (void *)
|
||||||
(RAM_END - BSP_Configuration.work_space_size);
|
(RAM_END - BSP_Configuration.work_space_size);
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -175,20 +175,6 @@ void bsp_start( void )
|
|||||||
BSP_Configuration.work_space_start = (void *)
|
BSP_Configuration.work_space_start = (void *)
|
||||||
(RAM_END - BSP_Configuration.work_space_size);
|
(RAM_END - BSP_Configuration.work_space_size);
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -235,20 +235,6 @@ void bsp_start( void )
|
|||||||
BSP_Configuration.work_space_start = (void *)
|
BSP_Configuration.work_space_start = (void *)
|
||||||
(RAM_END - BSP_Configuration.work_space_size);
|
(RAM_END - BSP_Configuration.work_space_size);
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -190,20 +190,6 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -144,20 +144,6 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add another extension if using the stack checker
|
* Add another extension if using the stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -151,28 +151,6 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef STACK_CHECKER_ON
|
#ifdef STACK_CHECKER_ON
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for stack checker
|
* Add 1 extension for stack checker
|
||||||
|
|||||||
@@ -151,28 +151,6 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef STACK_CHECKER_ON
|
#ifdef STACK_CHECKER_ON
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for stack checker
|
* Add 1 extension for stack checker
|
||||||
|
|||||||
@@ -149,28 +149,6 @@ int bsp_start(
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef STACK_CHECKER_ON
|
#ifdef STACK_CHECKER_ON
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for stack checker
|
* Add 1 extension for stack checker
|
||||||
|
|||||||
@@ -159,20 +159,6 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for stack checker
|
* Add 1 extension for stack checker
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -293,20 +293,6 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration.work_space_start = work_space_start;
|
BSP_Configuration.work_space_start = work_space_start;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef STACK_CHECKER_ON
|
#ifdef STACK_CHECKER_ON
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for stack checker
|
* Add 1 extension for stack checker
|
||||||
|
|||||||
@@ -151,28 +151,6 @@ void bsp_start(void)
|
|||||||
|
|
||||||
BSP_Configuration = Configuration;
|
BSP_Configuration = Configuration;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for the RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef STACK_CHECKER_ON
|
#ifdef STACK_CHECKER_ON
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for stack checker
|
* Add 1 extension for stack checker
|
||||||
|
|||||||
@@ -292,26 +292,12 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration.work_space_start = work_space_start;
|
BSP_Configuration.work_space_start = work_space_start;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Account for the console's resources
|
* Account for the console's resources
|
||||||
*/
|
*/
|
||||||
|
|
||||||
console_reserve_resources( &BSP_Configuration );
|
console_reserve_resources( &BSP_Configuration );
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef STACK_CHECKER_ON
|
#ifdef STACK_CHECKER_ON
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for stack checker
|
* Add 1 extension for stack checker
|
||||||
|
|||||||
@@ -302,20 +302,6 @@ bsp_start(void)
|
|||||||
|
|
||||||
Cpu_table.extra_mpci_receive_server_stack = 0;
|
Cpu_table.extra_mpci_receive_server_stack = 0;
|
||||||
|
|
||||||
/*
|
|
||||||
* Add 1 region for RTEMS Malloc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
|
||||||
/*
|
|
||||||
* Add 1 extension for newlib libc
|
|
||||||
*/
|
|
||||||
|
|
||||||
BSP_Configuration.maximum_extensions++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef STACK_CHECKER_ON
|
#ifdef STACK_CHECKER_ON
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for stack checker
|
* Add 1 extension for stack checker
|
||||||
|
|||||||
@@ -30,6 +30,15 @@ extern rtems_multiprocessing_table Multiprocessing_configuration;
|
|||||||
extern posix_api_configuration_table Configuration_POSIX_API;
|
extern posix_api_configuration_table Configuration_POSIX_API;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* RTEMS C Library and Newlib support
|
||||||
|
*
|
||||||
|
* NOTE: This ends up defining these even when newlib is not used.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CONFIGURE_NEWLIB_EXTENSION 1
|
||||||
|
#define CONFIGURE_MALLOC_REGION 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default User Initialization Task Table. This table guarantees that
|
* Default User Initialization Task Table. This table guarantees that
|
||||||
* one user initialization table is defined.
|
* one user initialization table is defined.
|
||||||
@@ -412,6 +421,7 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
|
|||||||
#define CONFIGURE_MEMORY_FOR_MP 0
|
#define CONFIGURE_MEMORY_FOR_MP 0
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIGURE_MEMORY_OVERHEAD
|
#ifndef CONFIGURE_MEMORY_OVERHEAD
|
||||||
#define CONFIGURE_MEMORY_OVERHEAD 0
|
#define CONFIGURE_MEMORY_OVERHEAD 0
|
||||||
#endif
|
#endif
|
||||||
@@ -428,10 +438,12 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
|
|||||||
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
|
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
|
||||||
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
|
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
|
||||||
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
|
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
|
||||||
CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \
|
CONFIGURE_MEMORY_FOR_REGIONS( \
|
||||||
|
CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
|
||||||
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
|
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
|
||||||
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
|
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
|
||||||
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \
|
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
|
||||||
|
CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION ) + \
|
||||||
CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
|
CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
|
||||||
CONFIGURE_MEMORY_FOR_MP + \
|
CONFIGURE_MEMORY_FOR_MP + \
|
||||||
CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
|
CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
|
||||||
@@ -464,7 +476,7 @@ rtems_api_configuration_table Configuration_RTEMS_API = {
|
|||||||
CONFIGURE_MAXIMUM_SEMAPHORES,
|
CONFIGURE_MAXIMUM_SEMAPHORES,
|
||||||
CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
|
CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
|
||||||
CONFIGURE_MAXIMUM_PARTITIONS,
|
CONFIGURE_MAXIMUM_PARTITIONS,
|
||||||
CONFIGURE_MAXIMUM_REGIONS,
|
CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
|
||||||
CONFIGURE_MAXIMUM_PORTS,
|
CONFIGURE_MAXIMUM_PORTS,
|
||||||
CONFIGURE_MAXIMUM_PERIODS,
|
CONFIGURE_MAXIMUM_PERIODS,
|
||||||
CONFIGURE_INIT_TASK_TABLE_SIZE,
|
CONFIGURE_INIT_TASK_TABLE_SIZE,
|
||||||
@@ -488,7 +500,7 @@ posix_api_configuration_table Configuration_POSIX_API = {
|
|||||||
rtems_configuration_table Configuration = {
|
rtems_configuration_table Configuration = {
|
||||||
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
||||||
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
||||||
CONFIGURE_MAXIMUM_USER_EXTENSIONS,
|
CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION,
|
||||||
CONFIGURE_MICROSECONDS_PER_TICK,
|
CONFIGURE_MICROSECONDS_PER_TICK,
|
||||||
CONFIGURE_TICKS_PER_TIMESLICE,
|
CONFIGURE_TICKS_PER_TIMESLICE,
|
||||||
CONFIGURE_MAXIMUM_DEVICES,
|
CONFIGURE_MAXIMUM_DEVICES,
|
||||||
|
|||||||
Reference in New Issue
Block a user