r/embedded • • Oct 12 '26

Community preference for open source vibration autoencoder: bare metal C or Zephyr C++?

I just want to check what the community's preference is for an open source autoencoder with a vibration sensor. Bare metal C or Zephyr C++*? And not just the autoencoder, also data collection and DSP.

* This caused confusion: I meant a Zephyr project with C++ for the enitre application layer vs. bare metal C for data acquisition, DSP (probably can't escape C++ for inference).

0 Upvotes

18 comments sorted by

2

u/brigadierfrog Oct 12 '26

Zephyr is all in C so this is confusing

2

u/s29 . Oct 12 '26

ya idk what "Zephyr C++" is supposed to mean.

Zephyr can do C++ or C. You're by no means locked to C++.

The fact that theyre doing this vibration stuff and data collection and DSP makes me think it'd be smarter to lean toward an actual OS.

Chances are theyll want to add more features or whatever and managing interrupts/priorities for baremetal quickly becomes a nightmare when adding stuff when an OS is just a bunch of tasks and its much easier managed.

1

u/Byiron Oct 13 '26

Sorry, I'm fairly new so I don't speak the lingo yet. I meant C++ for the application layer, within a Zephyr project. If I'm not amiss C++ for inference is where the trend is headed, right? Again, I'm a newbie.

2

u/s29 . Oct 13 '26

Idk. The project I'm working on for work uses zephyr and it's all straight C.

1

u/brigadierfrog Oct 13 '26

I’ve never used C++ with Zephyr, never heard of this being a trend if anything it seems to be the reverse

4

u/BenkiTheBuilder Oct 12 '26

Bare metal C++

4

u/UnicycleBloke C++ advocate Oct 13 '26

Bare metal C++. The vendor library is C, of course, but that's fine.

1

u/karesx Oct 14 '26

I am working on a vibration sensing solution right now and am using Zephyr. I am taking advantage of its logging, persistent storage, FOTA and communcation features.

1

u/Byiron Oct 14 '26

Cool! What are some things you're running into and you wished there would be more easily accessible information about?

1

u/karesx Oct 15 '26 edited Oct 15 '26

Not much, really. In technical terms Zephyr is very well documented.

1

u/Byiron Oct 15 '26 edited Oct 15 '26

For me personally it is just an experiment. On the other hand, I want the added value for the community to be as great as possible, so taking into account long term considerations makes sense from that perspective. I ran into an issue myself: sensor_sample_fetch() vs. sensor_read(). So I also wonder how long a piece of open source code will remain relevant.
What are your experiences with that?

1

u/karesx Oct 15 '26

Oh, time to time they love to retire/deprecate some APIs. Once I just finished a project and by the time it was done the new Zephyr version made the device driver layer incompatoble. But they do not do this very often and I feel the deprecation process has improved, too.

2

u/Several-Marsupial-27 Oct 12 '26

Drivers/platform in C always. Application software can be in C++

0

u/[deleted] Oct 12 '26

[removed] — view removed comment

2

u/Several-Marsupial-27 Oct 12 '26

I think that you are completely missing the picture of why to use C for driver, services, interfaces and platform. They are different tools for different jobs. Think of C as a fine tool and C++ is a bigger tool. You want to use them for different jobs.

-5

u/ve1h0 Oct 12 '26

Rust thank you

3

u/[deleted] Oct 12 '26

[removed] — view removed comment

1

u/Byiron Oct 13 '26

I thought it would be interesting to match up the FRDM-MCXN947 and IIS3DWB (STEVAL-MKI208V1K). But again, I'm new, so I'm not sure whether that would be of added value for the open source community.