Debugging support through development cartridges and emulators.
Debugging support through development cartridges and emulators.
The debugging library is a collection of different features that can be used to simplify development of N64 applications. Each feature can be independently activated and used.
Features currently fall into two groups:
- Logging. These features allow creating a logging channel for the developer to inspect the application while it is running and afterwards. Logging can be performed through the USB channel of a supported cartridge (DEBUG_FEATURE_LOG_USB), or through N64 emulators on PC (DEBUG_FEATURE_LOG_ISVIEWER), or even redirected to a file on a SD card inserted into the development cartridge (DEBUG_FEATURE_LOG_SD). On N64, logging can simply be performed by writing to stderr, for instance through the debugf macro.
- External filesystems. In addition to the read-only filesystem stored within the ROM image (dragonfs), these debugging features allow access to an external filesystem in both read and write mode. Currently, this is possibly on SD cards (DEBUG_FEATURE_FILE_SD).
All the debugging features can be disabled at compile-time using the standard "NDEBUG" macro. This is suggested when building the final ROM, so that it's not required to manually remove calls to debugging functions from the code. All the debugging code and supporting libraries is also automatically stripped by the linker from the ROM.