83Plus:Software:usb8x/Build

From WikiTI
Revision as of 11:11, 22 October 2006 by AndyJ (Talk | contribs)

Jump to: navigation, search

Building usb8x from source is (hopefully) an easy process. You need ZDS or a ZDS-compatible assembler. Just open the usb8x.zws project file in ZDS and compile to produce a .hex file which you can sign with wappsign or your favorite signing tool.

Compile time settings are listed in settings.inc. They are:

Setting Name Default Description
LOGGING_ON 0 If set to 1, logging support will be compiled. Even if logging support is compiled, logs will not actually be kept unless [[../Asm_Interface/SetupLog|SetupLog]] is called. Logging support, even if logging is not enabled, can significantly slow down high speed drivers like MSD, so logging support should be disabled except in debug versions.
ASSERT_ON 0 If set to 1, assertion support will be compiled. Assertions are used throughout the usb8x code to make sure certain inputs and outputs are within reasonable bounds. If they are not the assertion is triggered, debug information is displayed on the screen, and the calculator halts. Assertions slightly slow down usb8x operation, so they should probably be disabled in release versions.
SAFETYINT_ON 0 If set to 1, a safety interrupt will be compiled and automatically loaded when the driver is started. This interrupt checks memory for sane values using assertions. Thus, if you enable the safety interrupt, you should also enable assertions. The safety interrupt uses statVars, so it should be disabled in release versions to prevent conflicts with external software.
HUBCODE_ON 0 If set to 1, code for handling USB hubs will be compiled. This code provides routines to set and clear hub features, and also causes AutoSetup to automatically bypass an attached hub and instead setup the first attached device. The current code only works with some devices (doesn't work with HID devices) so it is disabled by default.
CACHE_ON 1 If set to 1, code for MSD caching is compiled. Even if caching support is compiled, the cache will not be active unless the external program using the MSD driver specifically enables it. Current cache code should be bug-free for reads, but may still have some bugs when writing.
VERNIER_ON / KBD_ON / MOUSE_ON / MSD_ON / SILVER_ON / PAD_ON 1 If set to 1, the cooresponding driver will be compiled. The release version of usb8x includes all drivers. If a driver is not compiled and an external program tries to access it, a FeatureDisabled error will be returned.
ALWAYSCANCELINT_ON 0 If set to 1, the usb8x interrupt will always tell the TIOS to ignore USB events, even if the event is something that usb8x does not handle.
INTERRUPTMACRO_TYPE 1 If set to 0, usb8x will not disable or enable interrupts around sensitive routines. If set to 1, usb8x will disable and enable interrupts with di/ei around sensitive routines. If set to 2, usb8x will save the status of the interrupt before disabling it, and only re-enable interrupts if they were on to begin with. Set to 1 by default because it seems to work the best.
LOGxxxxxx_ON 1 Each of the many log settings controls one particular log file type. If a log setting is seto to 1, then the cooresponding log type will be included in the log file (assuming logging is compiled and enabled). If set to 0, that log type will be ignored. These settings are good if you're debugging one particular system and don't want the log file to be cluttered up with extraneous information.