Issues installing new image on eMMC

Hello,
I’m trying to flash a new image on La Frite on the eMMC.
I tried multiple ways of deleting the current contents of the flash, (gadget mode on a computer, hot plugging the eMMC module on an Alta board and using libretech-flash-tool, etc) but he partition tables never get overwritten.
I’m getting errors like the following, so I’m starting to think that the module might be having an issue on be broken altogether.

[ 1153.339969] I/O error, dev mmcblk0, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
[ 1153.349754] Buffer I/O error on dev mmcblk0, logical block 0, lost async page write

Any help will be appreciated.
Thank you
Miguel

I managed to boot from a different device with the eMMC installed by erasing some blocks in the U-boot firmware, but the IO errors persist when I try to dd anything into the module. That really starts to look like a hardware failure. Is there any tool that I can use to check whether the flash is bad?

Check the pins. Flash memory has a limited life but usually several thousand write cycles. If you had a bad script write to one area constantly, it can cause failure.

ESD can also cause flash cell failure.