MTD device erase

Apr 15, 2009 3 Replies

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


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

-Michael

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

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

-Michael

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required