Embedded Artistry Framework
Embedded Systems C++ Framework
Classes | Functions
Framework Boot Sequencing

Components to control the system/program boot process. More...

Collaboration diagram for Framework Boot Sequencing:

Classes

class  embvm::BootSequencer< TBootStrategy >
 Boot sequencer with customizable boot strategy. More...
 

Functions

void entry ()
 Prototype for our function entry point; can also be an asm symbol. More...
 
void CRTStartup ()
 We declare this function here because we don't want to include crt.h and Add a dependency on our libc for the test code. More...
 
template<class TPlatform >
void main_thread_func () noexcept
 
void bootSystem ()
 Each platform declares this to control the boot sequence. More...
 
template<class TPlatform >
void DefaultBootStrategy () noexcept
 Default Framework Boot Strategy. More...
 
template<class TPlatform >
void BootOSWithMainThreadStrategy () noexcept
 Continue Setup in Main Thread Framework Boot Strategy. More...
 
template<class TPlatform >
void OSXSimulatorBootStrategy () noexcept
 OSX Simulator Boot Strategy. More...
 

Detailed Description

Components to control the system/program boot process.


Class Documentation

◆ embvm::BootSequencer

class embvm::BootSequencer

template<void TBootStrategy>
class embvm::BootSequencer< TBootStrategy >

Boot sequencer with customizable boot strategy.

The boot sequencer is a static class which handles booting logic supplied by a strategy function. You do not need to declare an instance. Instead, define a PlatformBootSequencer in your platform's platform.hpp file:

The framework will take care of the rest.

Template Parameters
TBootStrategyThe function which describes the platform's boot sequence. See DefaultBootStrategy() for an example.

Public Member Functions

 BootSequencer ()=delete
 Deleted Default Constructor. More...
 
 ~BootSequencer ()=delete
 Deleted Default Destructor. More...
 
 BootSequencer (const BootSequencer &)=delete
 Deleted copy constructor. More...
 
const BootSequenceroperator= (const BootSequencer &)=delete
 Deleted copy assignment operator. More...
 
 BootSequencer (BootSequencer &&)=delete
 Deleted move constructor. More...
 
BootSequenceroperator= (BootSequencer &&)=delete
 Deleted move assignment operator. More...
 

Static Public Member Functions

static void boot () noexcept
 Execute the boot strategy to boot the system. More...
 

Related Functions

(Note that these are not member functions.)

void bootSystem ()
 Each platform declares this to control the boot sequence. More...
 
template<class TPlatform >
void DefaultBootStrategy () noexcept
 Default Framework Boot Strategy. More...
 
template<class TPlatform >
void BootOSWithMainThreadStrategy () noexcept
 Continue Setup in Main Thread Framework Boot Strategy. More...
 
template<class TPlatform >
void OSXSimulatorBootStrategy () noexcept
 OSX Simulator Boot Strategy. More...
 

Constructor & Destructor Documentation

◆ BootSequencer() [1/3]

template<void TBootStrategy>
embvm::BootSequencer< TBootStrategy >::BootSequencer ( )
delete

Deleted Default Constructor.

◆ ~BootSequencer()

template<void TBootStrategy>
embvm::BootSequencer< TBootStrategy >::~BootSequencer ( )
delete

Deleted Default Destructor.

◆ BootSequencer() [2/3]

template<void TBootStrategy>
embvm::BootSequencer< TBootStrategy >::BootSequencer ( const BootSequencer< TBootStrategy > &  )
delete

Deleted copy constructor.

◆ BootSequencer() [3/3]

template<void TBootStrategy>
embvm::BootSequencer< TBootStrategy >::BootSequencer ( BootSequencer< TBootStrategy > &&  )
delete

Deleted move constructor.

Member Function Documentation

◆ boot()

template<void TBootStrategy>
static void embvm::BootSequencer< TBootStrategy >::boot ( )
inlinestaticnoexcept

Execute the boot strategy to boot the system.

Referenced by bootSystem().

◆ operator=() [1/2]

template<void TBootStrategy>
const BootSequencer& embvm::BootSequencer< TBootStrategy >::operator= ( const BootSequencer< TBootStrategy > &  )
delete

Deleted copy assignment operator.

◆ operator=() [2/2]

template<void TBootStrategy>
BootSequencer& embvm::BootSequencer< TBootStrategy >::operator= ( BootSequencer< TBootStrategy > &&  )
delete

Deleted move assignment operator.

Function Documentation

◆ BootOSWithMainThreadStrategy()

template<class TPlatform >
void BootOSWithMainThreadStrategy ( )
related

Continue Setup in Main Thread Framework Boot Strategy.

  1. call earlyInitHook();
  2. Setup the C/C++ runtime
  3. Setup the OS, which will terminate the current call chain and start a new thread. This new thread will continue execution:
    1. Setup the processor
    2. Setup the hardware pltaform
    3. Setup the platform
    4. Jump to main

References CRTStartup().

◆ bootSystem()

template<void TBootStrategy>
void bootSystem ( )
related

Each platform declares this to control the boot sequence.

Referenced by __attribute__(), and entry().

◆ CRTStartup()

void CRTStartup ( )

We declare this function here because we don't want to include crt.h and Add a dependency on our libc for the test code.

Referenced by embvm::BootSequencer< TBootStrategy >::BootOSWithMainThreadStrategy(), and embvm::BootSequencer< TBootStrategy >::DefaultBootStrategy().

Here is the caller graph for this function:

◆ DefaultBootStrategy()

template<class TPlatform >
void DefaultBootStrategy ( )
related

Default Framework Boot Strategy.

  1. call earlyInitHook();
  2. Setup the C/C++ runtime
  3. Setup the OS
  4. Setup the processor
  5. Setup the hardware pltaform
  6. Setup the platform
  7. Jump to main

References CRTStartup(), and main().

◆ entry()

void entry ( )

Prototype for our function entry point; can also be an asm symbol.

References embvm::BootSequencer< TBootStrategy >::bootSystem().

Referenced by embvm::TimerManager< 0, std::mutex >::clearExpiredTimers(), and list_del().

Here is the caller graph for this function:

◆ main_thread_func()

template<class TPlatform >
void main_thread_func ( )
noexcept

◆ OSXSimulatorBootStrategy()

template<class TPlatform >
void OSXSimulatorBootStrategy ( )
related

OSX Simulator Boot Strategy.

Boots framework pieces, but lets OSX take care of CRT & OS initialization during the dynamic loading process.

  1. call earlyInitHook();
  2. Setup the processor
  3. Setup the hardware pltaform
  4. Setup the platform
  5. Jump to main

References main().