From 38ef1b734afd1994804529ddbf5d28a8106f089b Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 4 Nov 2012 20:29:04 +0000 Subject: Changes to get a clean build of apps/examples/cxxtest with the STM32 and uClibc++ git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5310 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/stm32f4discovery/README.txt | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'nuttx/configs/stm32f4discovery/README.txt') diff --git a/nuttx/configs/stm32f4discovery/README.txt b/nuttx/configs/stm32f4discovery/README.txt index 730bf66ef..02fdbb07a 100644 --- a/nuttx/configs/stm32f4discovery/README.txt +++ b/nuttx/configs/stm32f4discovery/README.txt @@ -1008,7 +1008,34 @@ Where is one of the following: b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. - 3. At present (2012/11/02), this example builds only with exceptions + 3. Ideally, you should build with a toolchain based on GLIBC or + uClibc++. It you use a toolchain based on newlib, you may see + an error like the following: + + .../lib/libsupc++.a(vterminate.o): In function `__gnu_cxx::__verbose_terminate_handler()': + vterminate.cc:(....): undefined reference to `_impure_ptr' + + Here is a quick'n'dirty fix: + + 1. Get the directory where you can find libsupc++: + + arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -print-file-name=libsupc++.a + + 2. Go to that directory and save a copy of vterminate.o (in case you + want to restore it later: + + cd + arm-none-eabi-ar.exe -x libsupc++.a vterminate.o + + 3. Then remove vterminate.o from the library. At build time, the + uClibc++ package will provide a usable replacement vterminate.o. + + Now NuttX should link with no problem. If you want to restore the + vterminate.o that you removed from libsupc++, you can do that with: + + arm-none-eabi-ar.exe rcs libsupc++.a vterminate.o + + 4. At present (2012/11/02), this example builds only with exceptions disabled (CONFIG_UCLIBCXX_EXCEPTIONS=n). elf: -- cgit v1.2.3