forked from Imagelibrary/rtems
2007-12-12 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, startup/bspstart.c: Links and runs again. * console/console-io.c: New file.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2007-12-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* Makefile.am, startup/bspstart.c: Links and runs again.
|
||||||
|
* console/console-io.c: New file.
|
||||||
|
|
||||||
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
* clock/clock.c, include/bsp.h, startup/bspstart.c,
|
* clock/clock.c, include/bsp.h, startup/bspstart.c,
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ noinst_LIBRARIES =
|
|||||||
|
|
||||||
noinst_PROGRAMS += startup.rel
|
noinst_PROGRAMS += startup.rel
|
||||||
startup_rel_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
|
startup_rel_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
|
||||||
startup/bspstart.c startup/setvec.c ../../shared/bootcard.c
|
../../shared/bsppredriverhook.c startup/bspstart.c \
|
||||||
|
startup/setvec.c ../../shared/bootcard.c
|
||||||
## for now always using main.c style startup
|
## for now always using main.c style startup
|
||||||
##if !HAS_CXX
|
##if !HAS_CXX
|
||||||
startup_rel_SOURCES += startup/main.c
|
startup_rel_SOURCES += startup/main.c
|
||||||
@@ -56,7 +57,7 @@ clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
|||||||
clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||||
|
|
||||||
noinst_PROGRAMS += console.rel
|
noinst_PROGRAMS += console.rel
|
||||||
console_rel_SOURCES = console/console.c
|
console_rel_SOURCES = console/console.c console/console-io.c
|
||||||
console_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
console_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||||
|
|
||||||
|
|||||||
21
c/src/lib/libbsp/unix/posix/console/console-io.c
Normal file
21
c/src/lib/libbsp/unix/posix/console/console-io.c
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* UNIX BSP Debug IO
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To support printk
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <rtems/bspIo.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void POSIX_BSP_output_char(char c) { fputc( c, stderr ); }
|
||||||
|
|
||||||
|
BSP_output_char_function_type BSP_output_char = POSIX_BSP_output_char;
|
||||||
|
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
||||||
@@ -106,37 +106,37 @@ void bsp_postdriver_hook(void)
|
|||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
uintptr_t workspace_ptr;
|
uintptr_t workspace_ptr;
|
||||||
|
|
||||||
|
cpu_number = 0;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*
|
/*
|
||||||
* If the node number is -1 then the application better provide
|
* If the node number is -1 then the application better provide
|
||||||
* it through environment variables RTEMS_NODE.
|
* it through environment variables RTEMS_NODE.
|
||||||
* Ditto for RTEMS_MAXIMUM_NODES
|
* Ditto for RTEMS_MAXIMUM_NODES
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (Configuration.User_multiprocessing_table) {
|
if (Configuration.User_multiprocessing_table) {
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if (Configuration.User_multiprocessing_table->node == -1) {
|
if (Configuration.User_multiprocessing_table->node == -1) {
|
||||||
p = getenv("RTEMS_NODE");
|
p = getenv("RTEMS_NODE");
|
||||||
Configuration.User_multiprocessing_table->node = p ? atoi(p) : 1;
|
Configuration.User_multiprocessing_table->node = p ? atoi(p) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If needed provide maximum_nodes also */
|
/* If needed provide maximum_nodes also */
|
||||||
if (Configuration.User_multiprocessing_table->maximum_nodes == -1) {
|
if (Configuration.User_multiprocessing_table->maximum_nodes == -1) {
|
||||||
p = getenv("RTEMS_MAXIMUM_NODES");
|
p = getenv("RTEMS_MAXIMUM_NODES");
|
||||||
Configuration.User_multiprocessing_table->maximum_nodes = p ? atoi(p) : 1;
|
Configuration.User_multiprocessing_table->maximum_nodes = p ? atoi(p) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set cpu_number to accurately reflect our cpu number
|
* Set cpu_number to accurately reflect our cpu number
|
||||||
*/
|
*/
|
||||||
|
if (Configuration.User_multiprocessing_table)
|
||||||
if (Configuration.User_multiprocessing_table->User_multiprocessing_table)
|
|
||||||
cpu_number = Configuration.User_multiprocessing_table->node - 1;
|
cpu_number = Configuration.User_multiprocessing_table->node - 1;
|
||||||
else
|
#endif
|
||||||
cpu_number = 0;
|
|
||||||
|
|
||||||
if (getenv("RTEMS_WORKSPACE_SIZE"))
|
if (getenv("RTEMS_WORKSPACE_SIZE"))
|
||||||
rtems_configuration_get_work_space_size() =
|
rtems_configuration_get_work_space_size() =
|
||||||
|
|||||||
Reference in New Issue
Block a user