Arduino Due (or other SAM3/4) upload fails with ATMEL ICE JTAG on VSCode with PlatformIO

Wow, this did the job, finally I can compile my project! Let me just state that I am very impressed with, and grateful for your support. Because of that I am actually sold on using VSCode/PlatformIO henceforth. I was have been quite overwhelmed and sceptical (a platform from experts for experts…) in the beginning, but with the community platform’s support I believe that I can move forward now.

Getting back to the virtual function multiple definition I have now learned that this particular guard is used to avoid directly calling (non-implemented?) virtual functions and that this had not been implemented in the Arduino toolchain. This was the likely reason for the library’s author to include the definition. The PlatformIO’s underlying AtmelSam toochain seems a bit different, as it defines said guard. On this matter, I would really like to know what is going on “under the bonnet”, i.e. which compilers are called with which settings and how the platform determines all the switches and where are the core files located? I know that some .json files that show some of that information are created automatically and should not be changed by the user. Is the platformio.ini the only file where one can and should change all relevant build settings? Although I might not need to change anything, what if I decided one day to use a completely different toolchain, how would I do that?