Mongoose OS is a framework for building apps (firmwares) for low-power microcontrollers (uC), and consists of the following main components:
mostool. Provides device management and firmware building capabilities
mos buildcommand builds a firmware (we call it an "app") by taking
mos.ymlfile in the current directory and invoking a build docker image either remotely (
mos build) or locally (
mos build --local).
Since Mongoose OS is based on the vendor's SDK, it extends the capabilities of the native SDK. For example, on ESP32 uC, Mongoose OS uses an ESP-IDF SDK, therefore it provides all capabilities that ESP-IDF provides, plus extra that come with Mongoose OS. If user code uses crossplatform API only, it can be built on all supported hardware platforms with no code changes:
mongoose-os/ - repository root common/ - various utility functions docs/ - documentaion you are reading now frozen/ - JSON parser/emitter fw/ - main source tree src/ - cross-platform sources platforms/ - platform-specific sources mongoose/ - networking core
The boot process is driven by a cross-platform mgos_init.c. In short, the subsystems are initialised in the following order:
MGOS_HOOK_INIT_DONEhooks are invoked
If any of those init functions returns
false, that means error. In this case,
the firmware reboots immediately. This is done intentionally, in order to
revert back to the previous firmware in case of failed OTA update.