MTD device erase

Good day! I'm working with MPC8349 CPU and Linux 2.6.11. I'd like to get access from user application to FLASH MTD device. I can open "/dev/mtd0" device, read, write, but I can't erase it! As far as I know I should use ioctl(fd, MEMERASE) system call to erase MTD device, but this call is failed - MEMERASE undeclared! Can anybody help me with it?

-- Best regards, Miloserdin Oleg

============================================= MicroLAB Systems address: 83 Dubninskaya street, #612, 127591 Moscow, Russia phone/fax: +7-(499)-900-6208 e-mail: snipped-for-privacy@mlabsys.com WEB:

formatting link
=============================================

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4006 (20090414) __________

The message was checked by ESET NOD32 Antivirus.

formatting link

Reply to
Miloserdin Oleg
Loading thread data ...

With my distribution of uCLinux I can create "erase" and "flash_eraseall" for that purpose.

-Michael

Reply to
Michael Schnell

I'd like to erase MTD device from C source code!

-- Best regards, Miloserdin Oleg

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4012 (20090416) __________

The message was checked by ESET NOD32 Antivirus.

formatting link

Reply to
Miloserdin Oleg

So you can either start the eraseall program e.g. with "system()" or include part of the sourcecode into your program.

-Michael

Reply to
Michael Schnell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.