--startGW in RTEMS shell starts the gateway, stopGW stops it.
--currently has a bug, where the cancelled threads don't call their cleanup handlers. Probably problem with RTEMS implementation of posix API (wouldn't be the first one, as far as cancellation is concerned.) If needed, this could probably be solved with rewriting it to use RTEMS task instead of posix threads.