CException in ChibiOS

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
Posts: 20
Joined: Tue Sep 21, 2021 9:47 am
Has thanked: 9 times

CException in ChibiOS

Postby akshaim » Wed Aug 10, 2022 1:52 pm

Hi Forum,

I am trying to use CException library in Chibi OS application to implement the " try, throw and catch " pattern. Have anyone tried this? The library seems to be compact and offers multithreading support as well. Is there a reason why we are not using it in Chibi OS? Are ``setjmp`` and ``longjmp`` prohibited in ChibiOS?



User avatar
Site Admin
Posts: 14462
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1078 times
Been thanked: 922 times

Re: CException in ChibiOS

Postby Giovanni » Wed Aug 10, 2022 5:52 pm


It should be possible but do not mix setjmp and longjmp between threads or things will get complex. Also, do not jump in and out of critical sections and ISRs. Only do that in the same "context".


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 6 guests