Compiling Xploritto with the FemtoIDE works better but it crashes when it tries to read a POP file. If I try and debug it I get
Program received signal SIGTRAP, Trace/breakpoint trap.
0x000156de in _free_r ()
Which fails at the following line:
GDB: #8 SDBrowse::draw (this=0x10005e98) at /home/justin/Downloads/FemtoIDE/projects/Xploritto/SDBrowse.cpp:472
472 Pop::open(f);
This crash happens in the emulator causing a segfault when not run in debug mode and freezes when run on hardware.
The SDFileIO example still doesn’t work, but I just tried the pre-compiled version in the build folder and it also doesn’t work. If I remove the file creation part of SDFileIO and simply have it read a file that already exists then the SDFileSystem read works but the PFFS doesn’t. I just discovered that the PFFS only allows filenames in the 8.3 format and can now read using it. Still doesn’t explain the weird crash when building Xploritto from source, and should still be looked into, but it looks like my issues with the sd card has to do with the CLI setup.
Since it looks like the FemtoIDE allows you to use an external editor I think I will switch to using it instead. This will save me some headache in the future. Plus it has built-in debugging available and it took me about 20 seconds to figure out how to launch the emulator with an SD card image. Since I’m on linux I have the img mounted as a loop device allowing me to modify it and then re-launch the emulator. Unfortunately the emulator doesn’t support updating the img file with any changes made by the running program, but maybe someday.