Small tool to synchronize main.c and main.cpp after code generation by stm32cubemx
- Download the c2cpp script
- Make executable:
chmod +x c2cpp
- Move into your $PATH (for example /usr/local/bin/):
mv c2cpp /usr/local/bin/
And from the terminal you can use it like this
c2cpp <directory> [--c-file <C_FILENAME>] [--cpp-file <CPP_FILENAME>] .
For example:
c2cpp Tests/Core/Src .
And it will copy all the changes outside USER blocks from main.c to main.cpp