forked from Imagelibrary/rtems
Switch to using a shared main() for all of the embedded BSPs
based on the GNU tools. This usually involved correcting the type of bsp_start(), bsp_cleanup(), adjusting the start code to call the right start routine (the shared boot_card()), and then removing code from bsp_start() which was performed in the new boot_card()/main() path.
This commit is contained in:
@@ -171,8 +171,6 @@ extern rtems_configuration_table BSP_Configuration; /* owned by BSP */
|
||||
|
||||
extern rtems_cpu_table Cpu_table; /* owned by BSP */
|
||||
|
||||
extern rtems_unsigned32 bsp_isr_level;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -289,8 +289,8 @@ zerobss:
|
||||
mov %0, %o2 ! environ
|
||||
mov %0, %o1 ! argv
|
||||
mov %0, %o0 ! argc
|
||||
call SYM(main)
|
||||
sub %sp, 0x60, %sp ! room for main to save args
|
||||
call SYM(boot_card)
|
||||
sub %sp, 0x60, %sp ! room for boot_card to save args
|
||||
nop
|
||||
|
||||
PUBLIC(BSP_fatal_return)
|
||||
|
||||
@@ -289,8 +289,8 @@ zerobss:
|
||||
mov %0, %o2 ! environ
|
||||
mov %0, %o1 ! argv
|
||||
mov %0, %o0 ! argc
|
||||
call SYM(main)
|
||||
sub %sp, 0x60, %sp ! room for main to save args
|
||||
call SYM(boot_card)
|
||||
sub %sp, 0x60, %sp ! room for boot_card to save args
|
||||
nop
|
||||
|
||||
PUBLIC(BSP_fatal_return)
|
||||
|
||||
@@ -11,14 +11,10 @@ PROJECT_ROOT = @PROJECT_ROOT@
|
||||
PGM=${ARCH}/startup.rel
|
||||
|
||||
# C source names, if any, go here -- minus the .c
|
||||
C_PIECES=bspclean bspstart sbrk setvec spurious
|
||||
C_PIECES=bspclean bspstart main sbrk setvec spurious
|
||||
C_FILES=$(C_PIECES:%=%.c)
|
||||
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
|
||||
|
||||
CC_PIECES=rtems-ctor
|
||||
CC_FILES=$(CC_PIECES:%=%.cc)
|
||||
CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o)
|
||||
|
||||
H_FILES=
|
||||
|
||||
# Assembly source names, if any, go here -- minus the .s
|
||||
@@ -29,10 +25,6 @@ S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o)
|
||||
SRCS=linkcmds $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
|
||||
OBJS=$(C_O_FILES)
|
||||
|
||||
# We install the RTEMS constructor as a separate .o
|
||||
# so it can be easily place correctly by the compiler config file.
|
||||
INSTALLED_O_FILES=$(ARCH)/rtems-ctor.o
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
||||
include $(RTEMS_ROOT)/make/leaf.cfg
|
||||
|
||||
@@ -61,6 +53,5 @@ CLOBBER_ADDITIONS +=
|
||||
${PGM}: ${SRCS} ${OBJS}
|
||||
$(make-rel)
|
||||
|
||||
all: ${ARCH} $(SRCS) $(INSTALLED_O_FILES) $(PGM)
|
||||
all: ${ARCH} $(SRCS) $(PGM)
|
||||
$(INSTALL) $(srcdir)/linkcmds ${PROJECT_RELEASE}/lib
|
||||
$(INSTALL_VARIANT) $(INSTALLED_O_FILES) ${PROJECT_RELEASE}/lib
|
||||
|
||||
@@ -372,9 +372,4 @@ void bsp_start( void )
|
||||
*/
|
||||
|
||||
rtems_libio_config( &BSP_Configuration, BSP_LIBIO_MAX_FDS );
|
||||
|
||||
bsp_isr_level = rtems_initialize_executive_early(
|
||||
&BSP_Configuration,
|
||||
&Cpu_table
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user