I reached the same conclusion and used the same workaround... Except that I retrieved a cfg file from trash.
This bug appeared here last Friday (MAR/8th), out of the blue. Tried to reinstall everything from scratch 3 times, did not have time to downgrade versions to discover wich restablishes .cfg generation functionality... You guys owe me a weekend ;)
- Windows 10 fully updated.
- STM32CubeMX - V 5.1.0
- Board: STM32L152C-Discovery
- Eclipse IDE for C/C++ Developers, Version: Neon.3 Release (4.6.3), Build id: 20170314-1500
- Java Version 8, Update 201.