Skip to main content
MMitc
Associate III
November 14, 2019
Question

How do we add custom project compiler options like -I, -D that are not overwritten each time you regenerate?

  • November 14, 2019
  • 4 replies
  • 1087 views

I'm using libraries from outside the project tree so I need to define symbols and add include directories. But every time I regenerate code with CubeMX, my additions are overwritten. Is there any place or method I can add to those options that won't be overwritten? If not this seems like a huge bug.

This topic has been closed for replies.

4 replies

Cartu38 OpenDev
Graduate II
November 15, 2019

Which IDE version are you relying on ?. Such was definitvely buggy BUT solved on my side Thanks 1.1.0 version

Markus GIRDLAND
ST Employee
November 15, 2019

I'll tag along with @Cartu38 OpenDev​ that this was an issue before version 1.1.0 but should be fixed by now.

If you're using 1.1.0 and you have a way to reproduce it then please let me know!

MMitc
MMitcAuthor
Associate III
November 16, 2019

Still having the issue on 1.1.10.

For anyone else having this issue, a workaround is to export the project settings to a file, then import them after regeneration.

@Markus GIRDLAND​ I sent sample files privately.

Markus GIRDLAND
ST Employee
November 18, 2019

I just downloaded the project and did some testing but I can't seem to reproduce it.

I can add my own symbols, include paths and compiler options and then regenerate the project and they're still there for me.

Not sure if there are some additional steps I need to do in order to recreate it.