Skip to main content
Visitor II
June 19, 2026
Question

stm32cubemx - lf separators

  • June 19, 2026
  • 2 replies
  • 73 views

 

Hello STM32CubeMX Support Team,

I am writing to request a quality-of-life feature for STM32CubeMX: the ability to choose the line ending format (LF vs. CRLF) for generated project files.

Currently, STM32CubeMX aggressively generates files using Windows-style CRLF line endings, regardless of the host operating system. As a developer using Git in a cross-platform environment (specifically Linux), this creates constant and unnecessary friction in version control.

Whenever I regenerate code via CubeMX, Git immediately flags dozens of files as modified purely because the line endings were forced back to CRLF. While this can be partially mitigated using .gitattributes or core.autocrlf settings, these workarounds are prone to breaking across different team members' machines, resulting in messy diffs, ruined commit histories, and broken CI/CD pipelines.

Proposed Solution: Could you please add a simple toggle or dropdown in the Project Manager > Code Generator settings tab allowing users to select their preferred line ending format (e.g., "Default / CRLF (Windows) / LF (Unix)")? Alternatively, having the code generator automatically respect the native line endings of the host operating system would be a massive improvement.

Modern embedded development is increasingly cross-platform, and native support for LF line endings would save developers a significant amount of time managing Git configurations.

Thank you for your time, your hard work on the STM32 ecosystem, and for considering this request.

Best regards,

Lazox12

2 replies

Andrew Neil
Super User
June 19, 2026

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
ST Technical Moderator
June 19, 2026

Hello ​@lazox12 and welcome to the ST community,

That was already discussed many times in this community and I’ve already escalated the behavior internally over this post.

 

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.