Hi all,
first of all, Visual Micro is a great tool. Using Visual Studio for developing and debugging my projects (Arduino on Teensy 4.1) is a charm!
But I found an issue where I am not able to find a workaround, hopefully you can help me:
Attached you find two files
- debug-hardware-gdbstub: I selected the gdb stub with "No Project + Library Optimization" in the Debug toolbar.
- debug-off: I selected the off-option with same optimization level.
I want to use the gdb stub variant but my issue is that this option automagically adds options to the build.vm.extra_flags for all three types core, library and project:
These are my options I have defined by myself and are used with Debug:off
build.vm.extra_flags.core=-Os
build.vm.extra_flags.library=-Os
These are the options when I select the gdbstub:
build.vm.extra_flags.core=-Os -Og
build.vm.extra_flags.library=-Os -Og
build.vm.extra_flags.project= -Og
As you can see, the -Og override my -Os which I need to put everything onto the teensy (see teensy-size output).
I have not found a setting to eliminate the "-Og" at the end. I do not want to debug the core and library so I would be happy to have an option to switch the "-Og" off also for gdbstub.
Can you help me here?
I am using Visual Studio 2022 Community, Arduino IDE 1.8.19 and Teensyduino 1.56. So
https://www.visualmicro.com/forums/YaBB.pl?num=1640379082 does not help in my case.
Best Regards
Daniel