Good afternoon. I am creating a project in CubeMX. I select the Virtual Port COM and configure the code in Keil. I open Keil and change the type of main to C++. After that, I try to compile and throws this error: Data\Data.axf: Error: L6218E: Undefined symbol SystemClock_Config (referred from usbd_conf.o).
Asked
Active
Viewed 38 times
0
-
If you convert code from C to C++, don't forget the declare the correct linkage: `extern "C" void SystemClock_Config();` – Codo Feb 23 '23 at 14:39
-
It could also be name mangling. It absolutely WILL happen if you implement ISR in cpp file, so interrupt handlers won't hook up. Not sure about this one, but you can try antimangling solution. https://stackoverflow.com/questions/524633/how-can-i-avoid-name-mangling answer by befzz. It's a must with ISR at least. – Ilya Feb 28 '23 at 20:31