We bought an ADuC7020 QuickStart system. GNU Compiler translates C++ programs successfully, but uVision3 hangs when trying to download an executable file into the chip (through Keil ULINK). Whereas C-programs download normally. uVision3 hangs even when downloading such simplest program: struct A { virtual void f()=0; }; struct B : public A { virtual void f(){} }; int main() { B b; A* a = &b; a->f(); return 0; } Thanks. Dr. Tychinsky.
Does UV3 support C++ ?
I thought it does. But now I have some doubt.
Which version of the CARM toolset are you using? Reinhard
I have tried your code with RealView 2.2, loading and running it successfully in the uVision simulator. Since the ELF/DWARF loader is the same for sim and target, there must be something different. I failed doing the same with the GNU toolset. The linker always complains about undefined vtable/typeinfo reference(s):
.\obj\blinky.o(.gnu.linkonce.r._ZTI1A+0x0): /cygdrive/c/Keil/ARM/GNU/Examples/Blinky/blinky.cpp:14: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
To link C++ code with GCC set -lstdc++ option.
I use GCC toolset (arm-elf-gcc). Or I don't understand what is CARM toolset. Where can I to see CARM version?
The version numbers are shown in the Help - About dialog. Reinhard
Yuri, Thanks for your pointer regarding the -lstdc++ linker option, I missed it. I have tried again your code (actually put it into the blinky example) and it loads and runs fine here. The GNU gcc version used here is 3.3.1. Also, high level debugging works as expected. Peter
This is my Help About dialog: uVision 3 V3.05 C Compiler ARM-ELF-GCC.Exe Assempler ARM-ELF-AS.Exe Linker/Locator ARM-ELF-GCC.Exe Librarian ARM-ELF-LIB.Exe Hex Converter ARM-ELF-OBJCOPY.Exe CPU DLL SARM.DLL V1.21b Dialog DLL DARMAD.DLL V1.03a Target DLL BIN\UL2ARM.DLL V1.04b Dialog DLL TARMAD.DLL V1.03 What is CARM version I don't understand.
You should update the uVision version to the current release. Please download from http://www.keil.com/demo. Reinhard
Thanks, Peter. But what is the problem? I wrote my toolset version. Maybe it is outdated?
Yuri, Yes, it is outdated, you should update your software. Peter
Please download from http://www.keil.com/demo. Reinhard
Thanks, Reinhard. Soon i will download updates.
Sorry, Reinhard. What version of CARM works with C++? And where in Help About dialog can I see version of CARM? Word CARM is not presented there.