Reading Files
Posted: Thu Oct 07, 2021 9:33 am
Hi Team,
I have made a CHIP8 emulator and now have to read the ROM's for it. I have created a folder and added some ROMs into there. Now at first, I was just trying to read them as you would on your PC and quickly worked out that doesn't work like that! After some reading, I managed to get a SPIFFS partition made, allocated space, and followed along through the demo code example from the documentation and after some tinkering, it doesn't bring up any errors and runs fine(i think).
My program is structured so that i have a menu in app_main, which goes to the emulator, which reads a file path, passes on the file name to a read file function, and then starts the emulator.
But my read still doesn't find the files and I'm back to where I started.
I have spent the last two days searching and trying to find something, but I'm just getting information overload and getting frustrated since nothing is clearly standing out that matches my needs, which is a fairly common thing I would have thought.
I'm looking for some clear advice on how to store a file on the board to later be read by my program. Maybe SPIFFS isn't the correct way and something like Fat or jsut NVS would work, but idk. The next option is to try Mkspiffs I read in one post, but I'm sick of chasing empty leads and spinning my wheels. it's no longer fun!
I'm using Vscode with PlatformIO
I have made a CHIP8 emulator and now have to read the ROM's for it. I have created a folder and added some ROMs into there. Now at first, I was just trying to read them as you would on your PC and quickly worked out that doesn't work like that! After some reading, I managed to get a SPIFFS partition made, allocated space, and followed along through the demo code example from the documentation and after some tinkering, it doesn't bring up any errors and runs fine(i think).
My program is structured so that i have a menu in app_main, which goes to the emulator, which reads a file path, passes on the file name to a read file function, and then starts the emulator.
But my read still doesn't find the files and I'm back to where I started.
I have spent the last two days searching and trying to find something, but I'm just getting information overload and getting frustrated since nothing is clearly standing out that matches my needs, which is a fairly common thing I would have thought.
I'm looking for some clear advice on how to store a file on the board to later be read by my program. Maybe SPIFFS isn't the correct way and something like Fat or jsut NVS would work, but idk. The next option is to try Mkspiffs I read in one post, but I'm sick of chasing empty leads and spinning my wheels. it's no longer fun!
I'm using Vscode with PlatformIO