I was able to solve the problem. There is an error in the HWLibs , I single stepped the code and right at the api call alt_dma_channel_exec(channel, program) which is on line 5728 of dma.c it stopped at this line
if (!(g_dmaState.channel_info[channel].flag & ALT_DMA_CHANNEL_INFO_FLAG_ALLOCED))
{
return ALT_E_ERROR;
}
Apparently there is a flag to validate the channel is allocated. I commented this line out and it successfully ran. Also not mentioned in my code is the fact the transmit signal has to be activated and watermark level set correctly.
Has anyone else had problems with the included hwlibs having errors? Why is there no errata sheet to correct these errors or updates to fix them?