I downloaded MounRiver studio 2 (the one based on VScode) and tried to develop some code for CH32V003, using its own and then CH32V003fun libraries. When the program is written in C (or has *.c filename) it somewhat works, however, there are glitches. There is a panel to specify include paths that allows to specify -I paths and -isystem paths to my libraries.
However, when I list the -I mylibs, they are not found. If I list the path in -isystem panel, the quoted #include ".." are found. It is strange because the -isystem is supposed to specify paths for #include <..>, so it looks like a bug.
But when I change file extension to *.cpp for my code or for included examples, the compiler completely fails to find any #includes.
Tracing it to the root, it looks that c++ compiler uses a different set of settings, and they are not accessible from GUI (project properties).
The *.wvproj json file contains two sections: "ccompiler": and "cppcompiler":. The first one defines all switches for C compilation and that is what is set from project properties window. The other one contains empty entries:
"includes": {"include_paths": [],
"include_system_paths": [],
"include_files": [] }.
Probably they are supposed to define switches for C++ compilation, but because they are empty and not fillable from GUI, the paths cannot be specified.
I tried to add the definitions to project file manually in this section, but opening the project clears these fields and compiler does not work.
Did anyone manage to compile any C++ code and how?
Is it a bug in the tool? How to report this bug and any possible fixes?
The CH32V is a nice chip, but its IDE tools are bad: there is no compatibility between MounRiver and PlatformIO and it looks that the user has not only take care of bad documentation, but also debug and tweak the development tools - an extra barrier.