You can also use stdio calls on the smartports which will hide the details of the C vexGeneric… APIs. see example here.