Hi all,
I have been enjoying messing around with the Playdate C API this weekend. I'm trying to see how far I can get porting some existing projects to Playdate. It is definitely easy to get crashes on launch which are hard to debug
In browsing the forums, it seems that it can be a bit tricky to debug once you start hitting the hardware limits. I'm curious about a number of specifics:
- Are there hard limits on stack? I've noticed some threads which mention the stack space is small. Some of the C_API files in the SDK mention STACK_SIZE = 61800... So is it about 61kb? Is it possible to tweak the stack size in the build toolchain?
- Are there hard heap limits? C_API files mention HEAP_SIZE = 8388208, so is expected user heap ~8MB? Does the device itself have 16MB RAM, with ~8MB reserved for system use?
- Is
logToConsole
buffered? When my application crashes, it doesn't seem to consistently output the same debug lines. If it is buffered, is there a way to flush the console? - Is it possible at all to symbolicate the
pc
register in the crash log? - Is it possible to do remote debugging with C?
Thank you!