fix debug handling
only include debug functions if needed
Merge pull request #238 from mehlis/debug-guard

Debug: guard some code
fixes startup code and adds proper irq handler for mc1322x
adjust objcopy flags