Including a C++ library into the setup of a New Application Program Project #963
Replies: 2 comments 5 replies
-
Also, if this is very very complicated stuff I will simply drop this research question and move on to something else. It is not that crucial to have the library running, but would have been interesting. |
Beta Was this translation helpful? Give feedback.
-
Hey @Sam-Vervaeck.
This is a hard question. C++ support is still experimental (at least from my side) as I am not very familiar with that. First of all, you'll need to change (or better: override) the compiler to use " Line 101 in 00d248c We already have a minimal C++ example here: https://github.com/stnolting/neorv32/blob/main/sw/example/hello_cpp/main.cpp When I put this code in there double level = 3.231;
volatile double res = 0.02 * round(level); and also include math.h then I can successfully compile everything. However, I am not sure if this helps... Anyway, we should improve the C++ support / example base. 👍 |
Beta Was this translation helpful? Give feedback.
-
The TLDR of this question is to ask about the c++ compilation version being used by neorv32 and if it can be controlled.
I want to try to run a program using the following library on the neorv_32: SEAL. Now, this library does not support riscv natively so I have been hacking a bit around in the files to see how far I can go and maybe it will end up running. (I want to see how big the performance gap is between running it on Intel silicon vs riscv embedded silicon).
I have gotten already pretty far by turning a lot of special third library optimizations off. The current errors that I am facing all complain that functions such as "round" and "log2" are not a member of "std". Online Q&A says this is because the C++ version being used in compilation is not modern enough.
I had a look at the common.mk file to see what compiler settings are being used. I don't see any specific C++ flags however. The NEO_CXXFLAGS variable makes use of the CXXFLAGS variable but that one is not defined? I ran "make -p" as well and on my linux machine the CXXFLAGS also has no default so it is truly empty.
To end my exposition and give my detailed questions now:
What version does the neorv32 compiler use for C++? Is this something that is dependent on the compiler toolchain i have installed on my machine. If so, is there an easy command I can run to set this to a more modern version such as C++11? Googling this stuff about riscv toolchains doesn't really give clear answers.
Beta Was this translation helpful? Give feedback.
All reactions