solosky / pixl.js

An emulator for Amiibo!
GNU General Public License v2.0
557 stars 109 forks source link

How to operate the CPU Flash? #218

Closed xiaokajun closed 4 months ago

xiaokajun commented 4 months ago

I do some change for the master version, I want put some date in CPU flash. I use the basic funcation try to erase it with "hal_internal_flash_erase", before this, I have do init funcation. But when I use the erase funcation, return "-1", I dont know how to cut log, So I cut provide more info.

solosky commented 4 months ago

Since it dont have too much avaliable internal flash currently, I do not recomend to put data into the internal flash memory, put data using SPIFFS file system in external flash instead.

BTW, for any NOR flash write(Internal flash or External Flash), it requires erase before write, and it only could program in sector size (4 Bytes for internal flash or 256 bytes for external Nor Flash.

Anyway, please let me know what you are going to implement so I could give your reasonable suggestions.