Includes and type definitions

Code generated by RTOS adapter requires some includes and type definitions to be placed into the code, so subroutines are available to generate them.