Hi,
It appears that NewlibNano does not support exceptions (throw/try/catch).
I have compiled with -fexceptions and linked with NewlibNano. A call to throw will abort the program, any catch() is ignored.
Linking with Newlib does the right thing (i.e. it observes the catch blocks etc).
The libraries we use call throw, so we cannot avoid exceptions.
Using a simple C++ project in McuXpresso, linking to Newlib seems to add at least 130kbytes to the .text footprint. This is not insignificant.
So is there a better way to handle exceptions and still use NewlibNano? For example, does NewlibNano allow us to provide our own try/catch/throw handlers, or hooks of some sort that allow us to avoid the abort?
Many thanks.
Ronnie
Hello Ronnie,
The following thread talks a bit about this matter, I would recommend fiving it a look. I hope that it will help.
Regards,
Gustavo