1 / 12

Startup and Initialization

Power on board. Execute start code. Initialize board. Operating sys init. Application Initialize. Start Scheduler. Startup and Initialization. Development Basics. Start (crt0) - executes at power up Board initialization Operating System Initialization Application Program Initialization

robertolynn
Download Presentation

Startup and Initialization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Power on board Execute start code Initialize board Operating sys init Application Initialize Start Scheduler Startup and Initialization Development Basics • Start (crt0) - executes at power up • Board initialization • Operating System Initialization • Application Program Initialization • Start Scheduler

  2. Obtain Semaphore Program Execution Shared Resource Release Semaphore Task Synchronization Binary Semaphores Generally used to control access to a “shared resource”

  3. Disable Interrupts Critical Section Enable Interrupts Critical Sections / Reentrancy Interrupt

  4. Creation and Deletion of Objects • Control Block - required for every object; you define location anywhere in memory • Memory Requirements - data needed for components (e.g., task stack, queue space, etc.)

  5. Source File Structure Component Source Code • XX_DEFS.H - component constants and data structures • XX_EXTR.H - external interfaces (function prototypes) • XX_D.C - static and global data structure definitions • XX_I.C - initialization functions for component • XX_F.C - status functions for component • XX_C.C - core functions for component • XX_CE.C - error checking shell functions of core functions • XX_S.C - supplemental functions for component • XX_SE.C - error checking shell functions for supplemental functions

  6. System Startup • Startup Vector • INT_Initialize() • INC_Initialize() • Nucleus Services Init • Application_Initialize() • TCT_Schedule()

  7. .code .data (initialized data) .bss (uninitialized data) application memory System Startup Application Memory first_available_memory_address

  8. System Startup Code • INT_Initialize - contains target processor dependent initialization routines and data. • Setup necessary processor/system control registers • Setup system stack • Setup timer interrupt • Calculate timer HISR stack and priority • Calculate first available memory address • Transfer control to INC_Initialize()

  9. System Startup Code • INC_Initialize( ) • Nucleus PLUS Component Initialization • Initialization of Error Handling, History, Thread Control, Mailbox, Queue, Pipe, Semaphore, Event Group, Partition Memory, Dynamic Memory, Timer, and I/O Driver Components • Application_Initialize() • TCT_Schedule()

  10. System Startup Code • Application_Initialize( ) • Create dynamic memory pool • NU_Create_Memory_Pool( ) • Create Tasks • NU_Allocate_Memory( ) • NU_Create_Task( ) • Create other system objects (optional) • NU_Allocate_Memory( ) • NU_Create_Queue( ) • NU_Create_Semaphore( ) • … • NOTE - Interrupts disabled during Application_Initialize( )

  11. .code .data (initialized data) .bss (uninitialized data) System stack application memory Timer HISR stack System Startup Application Memory first_available_memory_address

  12. NU_Protect NU_Unprotect Critical Sections / Reentrancy Protection • Protection - “monitor” surrounding Nucleus PLUS service calls • prevents disabling of interrupts • prevents priority inversion

More Related