Skip to main content
Shashank TS
Associate II
September 8, 2018
Question

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

  • September 8, 2018
  • 2 replies
  • 652 views

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
September 8, 2018

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 VenmoUp vote any posts that you find helpful, it shows what's working..
kurta999
Senior
September 12, 2018

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.