programming interface to eMMC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

programming interface to eMMC

ソリューションへジャンプ
3,050件の閲覧回数
manojp
Contributor I

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

タグ(4)
0 件の賞賛
返信
1 解決策
3,039件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

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

元の投稿で解決策を見る

2 返答(返信)
3,023件の閲覧回数
manojp
Contributor I

thanks, I got help from QNX for same.

0 件の賞賛
返信
3,040件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

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