fix debug handling
only include debug functions if needed
fixes startup code and adds proper irq handler for mc1322x
adjust objcopy flags