Workflow

MicroFMU integrates FMU execution within MicroPython by embedding a lightweight FMU engine into a C module.

Key Components

  • FMU Preprocessing: Extracts metadata and source code.

  • MicroPython C Module: Wraps FMU functions for MicroPython.

  • Unix & ESP32 Targets: Separate compilation workflows.

Flow diagram of MicroPython firmware creation process

Figure 1: Flow diagram illustrating the integration of the FMU execution engine, preprocessing, and compilation steps in the MicroPython firmware creation process.

Steps:

    1. FMU archive file is obtained from the simulation, with sources in C.

    1. FMU archive file is decompressed into folder fmu

    1. Constitute the library for usage with MicroPython:

    • Adapt the source C code to the constraints of an embedded environment

    • FMU metadata is parsed for variable definitions

    1. MicroPython is compiled for Unix/ESP32 with MicroFMU

    1. MicroPython interacts with FMU via the ufmu API