Skip to main content
Shashank TS
Associate II
Sep 8, 2018 7:35 AM UTC
Question

Is Cube MX generated HAL code used in development for production? Or is it better to write code from scratch for a product?

I have to develop a product which makes use of STM32. So I was wondering if anyone makes use of STM32 CubeMX in actual product or is it just meant for prototyping.

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
Sep 8, 2018 3:49 PM UTC

Whatever you do you're going to have to thoroughly test the code, and customize it to your specific application.

CubeMX can provide a framework, but you'll need to handle errors and recovery, rather than die in some while(1) loop.

I can see the pin allocation and initialization to be useful, but its not going to make anyone a "better" developer.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
kurta999
Senior
Sep 12, 2018 5:30 AM UTC

Almost 90% of them can be used, or used as base with some small modifications - it depends on your needs. We do the same and everything works without any problem.