how to use try catch in CubeIDE 1.3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-22 8:30 PM
I am trying to use try catch with cubeIDE. But get the error when compiling.
- Labels:
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-23 2:20 AM
The error message says "use -fexceptions". Did you do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-23 2:39 AM
thank you for reply!,how to use "use -fexception"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-23 5:18 AM
Right click the project -> Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU G++ Compiler -> Miscellaneous
Add the "-fexceptions" flag there.
Not sure how well it'll work, but it will compile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-14 4:29 AM - edited ‎2023-11-20 9:26 AM
Hi everyone,
As this link is the first one when looking for "stm32 try catch", I'm adding some extra info.
The previous answer doesn't work for me.
When looking on other thread, it turns out that the problem is linked with the "-specs=nano.specs".
A solution that works for me was to choose "Standard C, Standard C++" for the runtime library:
And:
And
