I had similar problem ( I just used ctrl+s , then clicked generate code. but nothing happened ). My issue was I didn't have some drivers but IDE didn't tell me that I need to log in. And the solution was :I logged in to my ST account in cubeide ( in...
You need to log into your ST account in cubeide ( in my case I used button near help ). After that ide do what it wants (e.g. updates . etc. ) and generates code