GCC arm-none-eabi (Codesourcery) and C ++ Exceptions

I am using Raisonance Ride7 / Codesourcery (aka Sourcery CodeBench Lite) with the STM32F4 board creating the HMI open metal platform.

I will use C ++ exceptions on this system, but any exception that I throw ends up with a "Terminate called recursively" error written to stderr.

Code to reproduce the problem: (Main.cpp)

int main(void)
{
    try {
        throw 1;
    }
    catch (...) {
        printf("caught");
    }
}

I have already tried Raisonance and other sources for resolution and have not received any useful help.

Potential problem / solution 1:

I asked in other forums and they mention that I need to call the static constructs in my build file to run in order to initialize the unwind tables (at least what I think they are talking about), but I have no idea have how to do it.

/ 2

binutils/gas, (http://sourceware.org/bugzilla/show_bug.cgi?id=13449). toolchain , .

- , ++, , , toolchain? , , .

+5
1

, , Raisonance, , script, . script, ,

.text

*(.eh_frame)

( YourMemory , script. Mine Flash)

.ARM.extab :
{
    *(.ARM.extab* .gnu.linkonce.armextab.*)
} >YourMemory

.ARM :
{
    __exidx_start = .;
    *(.ARM.exidx*)
    __exidx_end = .;
} >YourMemory

, bss

*(.bss*)

+2

All Articles