Hello NXP Expert,
I am very new to the QNX and NXP S32G. I am trying to access eMMC Card through C Code. Earlier, we managed to access eMMC Card on Linux using the following sample code. But in QNX, it faced an issue using ioctl() calls.
Do you have any information and/or documents discussing accessing eMMC in QNX through programming?
I want to know how to read (ex. a device's physical sector size), write, and erase (number of blocks) in eMMC.
This API's like open() close(), lssek(), write() works.
Sample Code used for LINUX
int fd = open("/dev/mmcblk0", O_RDWR);
struct stat sb;
fstat(fd, &sb)
int secsize = 0;
ret = ioctl(fd, BLKSSZGET, &secsize); //a device's physical sector size
if (ret < 0)
{
// set the erase block size
uint64_t range[2];
range[0] = offset; // input address
range[1] = len; // input block size
if (ioctl(fd, BLKDISCARD, &range)
{
}
}
close(fd)
Best Regards,
Manoj
Solved! Go to Solution.
Hello,
You need to go with QNX for support on its OS, but you need erase and burn the eMMC every time you program code.
Regards
thanks, I got help from QNX for same.
Hello,
You need to go with QNX for support on its OS, but you need erase and burn the eMMC every time you program code.
Regards