Porting Guide - Initialisation Procedure
Once you have a suitable architecture-specific module in place, and you have prepared a timer tick ISR, you are ready to create an application which starts up the Atomthreads RTOS. You should keep interrupts disabled during the entire initialisation procedure (e.g. when configuring SDRAM etc). With interrupts still globally disabled, you must carry out the following:
- Call atomOSInit() to initialise the RTOS before making any kernel calls.
- Enable the timer tick ISR (though interrupts are still globally disabled)
- Create at least one thread using atomThreadCreate().
- Call atomOSStart() which will schedule the first thread in and enable interrupts.