2015-01-02 11:08 AM
Using CubeMX eclipse plugin under linux.
The generated source code has windows style CR-LF lineends, what's very uncommon for this OS (and even for Mac OSX). This issue heavily bothers post processing tools which might working on the generated code (e.g. grep, awk, perl, …). Could ST please change the code generation to have OS styled lineends (for Linux & OSX, this means LF without CR)? Further, it would be nice, if the generated code comes without trailing whitespace. Cheers, Joe2015-01-03 06:14 AM
2016-01-03 11:31 PM
''\r'' for MAC is very outdated. From starting with OSX, which is based upon BSD Unix, MAC has also ''\n'' lineends.
2016-02-03 11:44 AM
Don't we just write software to be able to deal with the formats that are in heavy/prevalent use? It's not 1970, and the horse left the barn a long time ago, there's no prospect they are going to get unified, you really have to work with what's out in the ecosystem than expect everything to conform to the standard you want to adopt. Got editors here quite capable of using either format, and filtering the file/line data is something an intern should be able to code in an afternoon.
If your tools aren't agnostic, it is your tool's fault.I can see the utility of having this as a check box item, but honestly ST has bigger bugs and defects they should be concentrating on.2016-02-22 01:58 AM
Hello,
Note that generated code use same line end format than the STM32 embedded software libraries themselves. Are you requesting solely the generated code to comply to the OS specific line end format? Thanks2023-09-14 02:55 AM
Indeed, CubeMX is still generating the Makefile, *.c and *.h with linefeeds under Linux. This is especially annoying when working with git repos that do not have linefeeds. Here's an example: https://github.com/Seeed-Studio/LoRaWan-E5-Node
My current (and also clumsy) work-around is to run dos2unix on all the generated files, mentioned above, every time I generate the code.
@stm32cube-t, is it not possible to at least add some button in the code generation options to disable linefeeds?
Such an option will be backwards compatible. Moreover, even on CRLF-OSes, people might not want the generator to generate their OS-type's endlines. Just imagine, you're working on Windows, but you're working on a git repo with Linux-type endlines.
Thanks