altra64
altra64 copied to clipboard
Improve debugging
To ease debugging, the solution should use a debugging macro in the makefile rather than only a flag contained in the code. debug.h and ifdef's should then be used so that debug code is removed when a release is created. see http://stackoverflow.com/questions/1440468/set-debugging-macro-conditionally-with-make and http://stackoverflow.com/questions/1079832/how-can-i-configure-my-makefile-for-debug-and-release-builds
Also it should be possible to support debugging over USB in some way.
this article provides a good overview of how to do it properly: http://stackoverflow.com/questions/1644868/c-define-macro-for-debug-printing
USB redirect could be done by providing an additional case statement 'D' and an escape key. the USB rom loader would have to take this into account.