Fixed potential Hardfault in platform_init

Error handling in the low level jtagdp function uses a setjmp/longjmp mechanism (PLATFORM_FATAL_ERROR). During platform_init longjmp can be called despite setjmp not having been called yet, which will cause a hardfault.