What is a Gecko OS App?
A Gecko OS app (App) is a custom application that runs on the Gecko OS application platform.
A Gecko OS app is typically the controller of a product. It contains all the logic (or 'smarts') the product requires.
The Gecko OS app is written in C, compiled natively for the Gecko OS device MCU.
An App leverages all the features of Gecko OS via an Application Programming Interface (API). See API Reference for full details. An App dynamically links with Gecko OS APIs.
An App also has full access to the commands and variables of the Command API , using the Native API functions for issuing commands .
Loading and Executing a Gecko OS App
Think of an App as a static library that is appended to the end of Gecko OS. The App executes out of the MCU's internal flash along with Gecko OS.
An App is programmed into the platform MCU's internal flash during OTA or by the SDK programmer.
An App always executes on Gecko OS startup.
Structure, Memory and Execution Contexts
An App has a specific structure that must be followed. See App Structure .
Memory is divided into sections, the size of which varies for particular platforms. See Memory Sections .
The logic of an App (the user's application specific functionality) executes in its own thread. Gecko OS applications are event driven. Some events, such as hardware IRQs, RTOS timer events, network events and HTTP requests, are handled in other execution contexts. See Execution Contexts .
Compiler
The SDK compiles the App with GCC 4.8.2 for the ARM processor. See GCC, the GNU Compiler Collection
Optimization
An App is heavily optimized to minimize code space usage:
- An App consists largely of application logic and buffers.
- The Gecko OS functionality, C library, peripheral drivers, and specified utilities are provided by Gecko OS.
Because an App runs on the same processor as Gecko OS, care should be taken to minimize processor cycles. Network and RTOS may become unstable if starved for processor cycles.
Access to MCU Registers
- As an App is in native C, an App has complete access to the MCU registers.