Bsp initialization sequence

I was going through the bsp initialization sequence, however, few questions remained unanswered.

Q: when and at what stage “bsp_start()” function is called?

Based on my understanding and s/w call flow.

_start->boot_card().

bsp_start() is registered via system initialization handler w/ RTEMS_SYSINIT_BSP_START order, but it is not documented at what order.

before “boot_card()” or after?

It would be after boot_card(). Usually some assembly language start code calls boot_card() which calls rtems_initialize_executive(). There is a loop in that function which iterates over the sysinit entries. The function bsp_start() is one of those invoked by this loop.

The set of macros for the current list of initialization points is in sysinit.h.

The sysinit function calls are done via an array. Do a “nm -n” and look for Sysinit with begin and end. That’s the initialization function set