Skip to main content
MMitc
Associate III
Nov 14, 2019 12:45 AM UTC
Question

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

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
Nov 15, 2019 8:37 AM UTC

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
Nov 15, 2019 1:20 PM UTC

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
Nov 16, 2019 1:21 AM UTC

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
Nov 18, 2019 1:51 PM UTC

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.