File too large to download into MeowBit?

Hi All,

New user here - so please forgive me if this is a dumb question. We have made a small game using the block coding, and we get an error when downloading into a MeowBit. It says that the file is too large by x number of bytes. This seems odd to me since when we save the code as a .png, it’s only about 73K. I’m not sure if that same file size translates over to the .uf2 file, but it seems way too small to cause that type of error.

Does anyone know that maximum file size that can be downloaded to the MeowBit through the makecode website, or is there another issue that could cause this type of error?

Thanks in advance!

Ken

@inkyfountain can you share a link to the game in question? Here’s a GIF showing how to do that:

how-to-share

I’ll be able to give more info once I’ve seen the code, but the most common culprit in “file too large” errors is having too many full screen images. Does your game have an animation that’s the size of the entire screen? Every screen is approximately 10 kb so it can end up filling up the meowbit’s available code space pretty quickly.

As for why the PNG is only 72 kb, we compress the source code when we embed it into the image. MakeCode programs typically compress very well, so even programs that are actually very large when compiled can end up being much smaller when downloaded. We don’t compress the code when sending it to the actual device.

Hi Richard,

Here is a link to my son’s code: https://arcade.makecode.com/S21053-35485-70963-89325.

Thanks!

Ken

Hi Richard,

Thank you for the reply! The game was actually written by my son, so I will be able to get the link tomorrow. However, it really only has one full screen image, and then several levels of platform gaming. Do you know what the maximum .uf2 file size is that the MeowBit can receive? I was able to open the MeowBit using the Windows file explorer and it seemed like there was more than enough space for me to copy and paste the file into it that way. It still didn’t seem to recognize the file though.

Thanks!

Ken

thanks for the link! looking at the code, i think the tilemaps are the most likely culprit but this still looks like a program that should fit in the meowbit. I’ve opened an issue on our github repo:

As for the file size that the meowbit accepts, the amount of space that the file explorer reports is not actually accurate; the meowbit shows up as a USB drive on your computer but its actually just pretending to be one. When you drag a file over to the meowbit it takes the code from that file and flashes it to the board.

Hi Richard,

Thank you for opening the issue on github, it’s much appreciated! Looking at the code stats, it seems like the actual file size is a little over half a meg? If I were to get an SD card, would that also solve the issue?

Thanks!

Ken

@inkyfountain unfortunately, MakeCode doesn’t have any support for SD cards today. In other words, 512 Kb is a hard limit on the compiled code size for the meowbit.

To get the existing game working, I’m afraid the only thing that can be done at the moment is to trim the file size by removing some of the larger tilemaps or images until it’s small enough. I wish I had a better answer for you! Hopefully we can improve this in the future so that there’s more room for user code.

Thanks Richard, I appreciate the info! Is there a way to know what the file size is in makecode arcade so you can know when you’re about to exceed the limit? Is there currently any functionality for the SD card in the meowbit?

@inkyfountain unfortunately the only way to check right now is to compile and see if it works. I hope in the future we can make some improvements in this area since I would personally love an easier way of getting the stats on code size

We don’t support the SD card at all iirc

Thanks Richard, I really appreciate all the help and info!

1 Like