Architecture & Yocto Setup for an i.MX8MP Data Logger

Hello everyone!

I’m starting a project to build a standalone Portable Data Logger & Visualizer.
I have a Toradex i.MX8MP (Verdin SoM) on a Mallow Carrier Board from a previous project, and I want to see what I can build with it.

My immediate goal is reliable data acquisition: reading generic I2C sensors for voltage and current measurement (to log battery usage) at configurable intervals, saving the data locally, and exposing it via a JSON API for a future GUI.

I’ve heard Yocto is the standard way to handle this hardware, but I am not an expert.
I have a few questions about the environment and the best way to structure the system:

  • Build System & Cross-Compiling: I am building on an x86_64 host for an ARM64 target.
    Since Yocto takes a long time to bake an image, what is the recommended workflow for iterative development?
    Should I use a Yocto-generated SDK to compile my application code independently, or is there a better way to handle the “write-compile-test” loop without rebuilding the whole image every time?

  • Sensor Handling: for generic I2C sensors (voltage/current), should I look for existing Linux kernel drivers (accessing data via sysfs/hwmon) or is it generally better to handle the I2C communication directly in user-space for a data logging application?
    I’m looking for the most reliable way to handle a configurable sampling rate.

  • Data Architecture: I’m planning a “Producer-Consumer” model:

    • Producer: a service that reads the I2C sensors and writes to a database.
    • Storage: a lightweight local database like SQLite.
    • API: a simple way to expose the data as JSON for a future UI.

    Does this stack make sense for an i.MX8MP, or am I overcomplicating the architecture for a standalone device?

  • Yocto: coming from a desktop/web background, the concept of “building an OS” just to run an app is new to me. How do I best manage the transition from using a generic reference image to creating a minimal, production-ready image that only contains my logger and its specific dependencies?

I’d appreciate any advice on pitfalls to avoid with the i.MX8MP or any tips for someone getting started with the Toradex/Yocto ecosystem.

Thanks!

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I’d be glad to help with your Portable Data Logger project! To provide the most accurate guidance for your specific setup, could you let me know which OS and version you’re planning to use on your Verdin i.MX8MP? For example, are you considering Torizon OS or a Yocto-based BSP, and which version?

You can get detailed information about your current setup using the tdx-info command: tdx-info documentation.

This information will help me provide specific guidance for:

  • Build System & Cross-Compiling: The development workflow varies significantly between Torizon OS (container-based) and traditional Yocto BSP approaches
  • Sensor Handling: I2C implementation differs between platforms - Torizon OS offers containerized approaches while BSP provides direct kernel access
  • Data Architecture: Platform choice affects how you structure your producer-consumer model and database integration
  • OS Image Management: The transition from reference images to production-ready images follows different paths depending on your chosen platform

Once I know your platform preference, I can provide detailed guidance on the most efficient development workflow for your data logger project.

Common platforms to consider:

  • OS: Torizon OS 7.x, BSP 7.x, or other versions
  • Implementation: Docker containers, native applications, Qt, or other frameworks
  • Integration: Device tree overlays, kernel drivers, user-space I2C access

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hi @waldek89!

This topic is duplicated. Please be careful while creating a thread, as it can make our prioritization more difficult.

I’ll continue the support here.

Best regards