Writing to flash help

Hi,

I am running a DIY Arduboy clone and am trying to write to the WG25XX Flash module. I have installed python 2.7 and have run the ‘python -m pip install pyserial’ command.

When I try to run python uploader or python writer commands I get the following error:

I’m sure my mistake is probably super obvious but I can’t seem to figure it out.

Any help would be greatly appreciated.

Thanks,

:slight_smile:

It’s missing the file ‘flashcart-writer.py’ in whatever directory you are trying to execute from

2 Likes

Hi,

I have it downloaded here.

and am using this command to summon it: ‘python flashcart-writer.py example-flashcart\flashcart-image.bin’

Thanks :slight_smile:

1 Like

So you are executing the command from that filepath in the cli?

2 Likes

This is what I am executing. I have pasted a games-image.bin file into the Arduboy-Python-Utilities-master folder also.

Thanks

1 Like

You probably have to change the directory to that folder where the flashcart-writer.py file exists. You are trying to execute the command from C:\Users\Elliot\ which doesn’t contain that file. Right click on the Arduboy-Python-Utilities-master explorer window’s filepath and click “copy address as text”. Then in the cmd window type "CD " (without the quote marks obviously) and press ctrl v to paste the filepath you copied and finally press enter. The filepath to the current selected directory before the carat > will change to the master folder now. Then execute the flashcart-writer.py command as before and it should now execute.

2 Likes

Okay so I’ve done that:

And here is proof that the ‘flashcart-image.bin’ file exists in the desired location.

1 Like

It says it needs the file structure to be example-flashcart\flashcart-image.bin but according to your screenshot it would be example-flashcarts\example\flashcart-image.bin which is different (example-flashcarts has an ‘s’ at the end and there’s a 2nd level folder ‘example’ in the way). The directory references in the python script that rely on specific files needs to exactly match the directory structure.

2 Likes

That worked. I got this message. It says its not detecting a flash card, however to my knowledge i connected the flash card correctly.

My OLED screen shows a USB BOOT symbol when I provide power to the Arduino, it then some small dollar signs appear in the left corner or it all disappears.

Thanks for the help!

1 Like

Ok we are making progress. My guess is you need to double check the wiring of the flash chip to the arduboy clone.

2 Likes

This is my current setup:


Thanks!

1 Like

Keep in mind I haven’t checked the specifications for the newer version of the flash chip mod so they could be completely different, but here’s a schematic I made a few years ago that works at least with one of the first iterations of the flashcart bootloader.


Ignore the pinout naming scheme for the I2C EEPROM, I just used the footprint since it fits and the pin numbers match the flash chip.

2 Likes

I think I might try use this program instead to write to the chip. But I cannot seem to open this file, do you have any ideas on this? I open it and then it immediately disappears:

I’ve also tried opening it from the command line and i get this error:

Thanks!

1 Like

FX activator doesn’t write games to the flash chip, it’s used iirc to burn the correct bootloader onto the atmega from an attached FX module. If you aren’t using the arduboy fx or the fx flat flex mod on an original arduboy then it’s got nothing to do with your homemade arduboy. From the error you were getting I’m almost certain it’s a hardware wiring problem with your flash chip and the python software side is going to work once you fix that.

2 Likes

Reloaded python 2.7 onto my pc and it seems to be working. But it has been stuck writing the second block for a while now. Is that okay?

Thanks

Progress! Last I played with writing games to a 32MB flashcart I remember it wasn’t particularly fast, perhaps a minute to flash 50 games or so. Anything longer than that though and I suspect something’s wrong. It could be a temperamental wire or breadboard that unluckily wiggled during flashing halting the process, how’s your wiring look?

2 Likes

okay it seemed to work, however i am still getting the USB boot symbol on my screen. This is what CMD is showing:

. I am using an ssd1306 0.96 inch 7 PIN SPI Screen.

Sounds like a later bootloader version than the one I played with ages ago (mine doesn’t have any usb symbols iirc). What happens if you unplug it from the computer and power it from battery? If it still wont boot into the main menu then someone else may have to chime in who is familiar with the newer arduboy flash chip setup as I haven’t gotten around to playing with it yet.

2 Likes

it seems extremely temperamental as for when it is going to recognize the flash chip. Sometimes it does, sometimes it doesn’t. I removed it from the breadboard and I resoldered it again and it and now it doesn’t recognize. This is my current setup:

Really confused as to what is going on. Any help would be amazing.

Thanks :slight_smile:

The schematic isn’t the issue if it worked at least once, you need to show us the physical breadboard wiring and the chip soldering!

2 Likes