SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download two short videos (registration required) highlighting:

System Workbench for STM32

Failed to catch c++ exceptions

Hey guys
I did convert my cubemx generated C project to a c++ project using SW4STM32 convert function.
However i’m not able to catch exceptions.

volatile int test = 0;
throw 1;
catch (const int& ex)
for (;;)
test += 99;

this very simple code always ends up in the termination handler instead of the catch phrase.
I’m using an STM32F429
I removed all noexception flags from the compiler and linker. I even added an exception flag, but still no success.

My GCC compiler flags:
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 ‘-Dweak=attributeweak’ ‘-Dpacked=attributepacked’ -DUSE_HAL_DRIVER -DSTM32F429xx -Og -g3 -pedantic -Wall -Wextra -Wconversion -fmessage-length=0 -fexceptions -ffunction-sections -c -fmessage-length=0 -MMD -MP

My G++ Compiler flags
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 ‘-Dweak=attributeweak’ ‘-Dpacked=attributepacked’ -DUSE_HAL_DRIVER -DSTM32F429xx -Og -g3 -pedantic -Wall -Wextra -Wconversion -fmessage-length=0 -fexceptions -ffunction-sections -c -fno-rtti -MMD -MP
Finished building: ../Core/Src/User/test.cpp

My g++ Linker Flags
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -specs=nano.specs -fexceptions -Wl,--gc-sections -fno-rtti -o “SW4STM32_Exception_Test.elf” @”objects.list” -lm
Finished building target: SW4STM32_Exception_Test.elf

I tested the same code with True Studio. The exception catching works fine there. So the target is able to handle exceptions.
There must be some IDE setting with I missed.
Could you help me out please?

any ideas on my issue because i’d very much like continue using AC6. But this is for me a big issue. Without exceptions there is no decent c++ programming possible :-(

I’m having the same issue, and draw the same conclusion: Can’t do meaningful C++ development in the absence of exception handling.

I figured it out (just forgot to post the answer cry )

Try to remove the -specs=nano.specs from the linker flags. It looks like this is overwriting the exception enabling.
This worked for me ;)

Thanks, Julius, that appears to have done the trick.