This really is my first question here :).

I been trying for while how to map physical memory to virtual memory in vxWorks 6.8 without results, I am attempting to use "vmMap" function but in some way it keeps return with:

errno = 0x30065 S_taskLib_Title_NOT_FOUND.

my code is:

int page_size=0;
PHYS_ADDR GPIO_BASE_VIRTUAL_ADDR = 0x40E00000;
VIRT_ADDR VIRTUAL_ADDR=0;

page_size =vmPageSizeGet();
if((VIRTUAL_ADDR = (VIRT_ADDR)memalign(page_size,page_size*2))==NULL)// allocate 2 pages 
{
    printf("error in memalign() errno = 0x%x\n",errnoGet());
}

if(vmMap(NULL,VIRTUAL_ADDR,GPIO_BASE_VIRTUAL_ADDR,(page_size*2))== ERROR )
{
    printf("Error mapping memory errno = 0x%x%\n",errnoGet());
}

Any help can be really appreciate, thanks,

Moshe.