bmd-studio / stm32-for-vscode

STM32 extension for working with STM32 and CubeMX in VSCode
MIT License
194 stars 27 forks source link

Adding -U (undefine) flags to bypass CubeMX bugs #159

Open coratron opened 1 year ago

coratron commented 1 year ago

There is an issue with CubeMX - the output Makefile generates the following when using FreeRTOS:

-DCMSIS_device_header=

which should be

-DCMSIS_device_header=" "

It would be nice to just be able to bypass any bugs that CubeMX puts in the Makefile by adding the -U option to the yaml. This would also need to be injected AFTER the original Makefile contents so it can work as expected.

I might be able to issue a pull request if that's something you would consider merging.

jortbmd commented 1 year ago

Hi! Thanks for opening up an issue for this. Yes it is definitely I think something I would consider merging. I have run into the exact same issue and it sound like a nice feature to add!