p3p/MarlinSimUI

Media Init Fail

lukasradek opened this issue ยท 8 comments

I need to print from SD for my Marlin development inside Marlin Simulator but unfortunately I cannot mount the FAT32 image.
I am compiling with the example config from Marlin Configurations and once inside simulator I click "Generate Empty Image". fs.img is created, SD Card Present is checked but I am getting "Media Init Fail" message from printer.

p3p commented

Can you make sure you have the newest version of the library, deleting .pio from Marlin and .cache from .platformio in your home folder is the easiest way to be certain.

also are you using Windows?

I am on Windows 11.
I tried deleting .pio and .cache and the issue still persists.

I am also trying to enable DEBUG_CARDREADER to get more info out of it but I haven't been able to solve Undefined reference to hex_address(void const*) during linking yet.

p3p commented

This was a bit convoluted to debug, not least as I had to use Windows for the first time in ages, and it wasn't happy about the updates and CPU change ^^,

To fix it go in Marlin/src/sd/SdFatStructs.h and find struct partitionTable , change unsigned to uint8_t that should reduce the structure back to 16 bytes as it needs to be.

The Man, the Myth, the Legend! Thanks.
And also killed two marlins with on spear ๐Ÿ™‚.

Also your Windows must be grateful ๐Ÿ˜.

p3p commented

Closing as the fix was merged into Marlin, although you haven't confirmed it worked for you.

Sure it worked! I thought it was obvious from the my reaction ๐Ÿ˜‰. Thanks for the quick fix.

p3p commented

Was just making sure as you didn't close the issue ;), thanks for bringing the problem to my attention it must have never worked on windows.

To be honest... it didn't even occur to me, that I can close the issue myself ๐Ÿ˜. Usually when I open issue somewhere, it is not solved for a looong time, so I am not practicing the "closure" part.