Hi everyone
I have worked on Hyperlink and I use exmpl project from pdk keystone. I added exmpl project to my own project.
Current exmpl work in internal oddress of dsp and all variables are mapped in internal ram.
But when I add exmpl to my project, All varables value is mapped in external DDR memory and it should be there. But in this situation, hyperlink example doesnt work because of control that at below
#ifndef _VIRTUAL_ADDR_SUPPORT
if ((globalAddr >= 0x800000) && (globalAddr < 0xa00000)) {
/* Address is in L2 */
globalAddr |= 0x10000000 | (DNUM << 24);
} else {
System_printf ("Don't know how to make global address for 0x%08x\n", globalAddr);
}
#endif
I tried to open _VIRTUAL_ADDR_SUPPORT but some funtions and variable such as mmap, munmap,sysconf ,_SC_PAGE_SIZE havent any sour code.
#ifdef _VIRTUAL_ADDR_SUPPORT
uint32_t virt_addr;
uint32_t page_size;
page_size = sysconf(_SC_PAGE_SIZE);
if (size%page_size)
{
printf("Size does not align with page size. Size given: %d\n", size);
return 0;
}
if ((uint32_t)addr % page_size)
{
printf("Address does not align with page size. Address given: 0x%08x\n", (uint32_t) addr);
return 0;
}
virt_addr = (uint32_t) mmap(0, size, (PROT_READ|PROT_WRITE), MAP_SHARED, dev_mem_fd, (off_t)addr);
if (virt_addr == -1)
{
printf("mmap failed!\n");
return 0;
}
return virt_addr;
I searched that variables and functions in runtime directory but I cant find it.
Are there any source code in pdk keystone?
Thanks