c++ - Vxworks sdOpen() errno: S_pgPoolLib_PAGES_NOT_ALLOCATED -
i trying read fpga registers user space application using vxworks function sdopen() (which create shared memory space). runned inside main function on vxworks 6.2 on arm-cortex a8. tried code still same error in title:
sd_id sdid; sdid =sdopen( (char *)"iptest", // name : name of shared data region0, 0, //option om_create, // mode : open mode = create if not exits 4*1024, // size : size of shared data in bytes (off_t)0x25000000, // physaddress : optional physical address sd_attr_rw | sd_cache_off, (void **)&pvirtaddress); // attr : allowed user mmu attribute //pvirtaddress: optional virtual base address if(sdid == 0) { switch(errno) { case s_sdlib_virt_addr_ptr_is_null: printf("pvirtaddress null \n"); break; case s_sdlib_addr_not_aligned: printf("physaddress not aligned \n"); break; case s_sdlib_phys_addr_out_of_range: printf("physaddress exceeds physical address space \n"); break; case s_sdlib_size_is_null: printf("size null \n"); break; case s_sdlib_invalid_options: printf("options not valid combination \n"); break; case s_sdlib_virt_pages_not_available: printf("not enough virtual space left in system \n"); break; case s_sdlib_phys_pages_not_available: printf("not enough physical memory left in system \n"); break; default: printf("sdid null, , don't know problem\n"); printf("errno = %d \n", errno); break; } } if (pvirtaddress == null) { std::cout<<"error timer : 'pvirtaddress = null' "<<std::endl; }
appendice: * 0x25000000 fppga ip base address (avalon_mm bus mask: 0x25000000 + ip address : 0x00000400, cyclone iv), still "sdid null, , don't know problem" , errno 11862024 = s_pgpoollib_pages_not_allocated on vxworks ressource/tcl/ *pvirtaddress still null ps: physical addr = 0, worked
would appreciate help,
Comments
Post a Comment