File open crashes on device C API

The memory map looks roughly like

0x08000000 - 0x08100000: flash memory (firmware storage)
0x20000000 - 0x20050000: system memory
0x60000000 - 0x61000000: game heap

and your pdex.bin game code is loaded to the start of the system heap, so you can tell at a glance if a crash address is in your code or in the firmware. Here it's at 0x0801e9c6 called from 0x080462f5 (if we can trust the trace data) which are both in kernel code, so they're not even in the bin/symbols.db file in the SDK that the simulator's sampler uses to symbolize traces. The $pc address is in the filesystem's write function and $lr is in FreeRTOS, which makes sense, but the CFSR fault status register is empty, which.. doesn't. That suggests that the data here isn't very reliable.

If you've got a crashing pdx you can send me I'd be happy to run it on the hardware debugger, see if I can figure out what's going on!

4 Likes