Download presentation
Presentation is loading. Please wait.
1
Startup and Initialization
Development Basics Startup and Initialization Power on board Start (crt0) - executes at power up Board initialization Operating System Initialization Application Program Initialization Start Scheduler Execute start code Initialize board Operating sys init Application Initialize Start Scheduler
2
Generally used to control access to a “shared resource”
Task Synchronization Binary Semaphores Generally used to control access to a “shared resource” Program Execution Obtain Semaphore Shared Resource Release Semaphore
3
Critical Sections / Reentrancy
Interrupt Disable Interrupts Critical Section Enable Interrupts
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
System Startup Application Memory .code .data (initialized data)
.bss (uninitialized data) first_available_memory_address application memory
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 INC_Initialize( ) Nucleus PLUS Component Initialization
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 Application_Initialize( ) Create dynamic memory pool
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_Create_Queue( ) NU_Create_Semaphore( ) … NOTE - Interrupts disabled during Application_Initialize( )
11
System Startup Application Memory .code .data (initialized data)
.bss (uninitialized data) System stack Timer HISR stack first_available_memory_address application memory
12
Critical Sections / Reentrancy
Protection Protection - “monitor” surrounding Nucleus PLUS service calls prevents disabling of interrupts prevents priority inversion NU_Unprotect NU_Protect
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.