#38 HardFault_Handler and semihosting

Version 1.x
Klaus Liebler

Dear Liviu,

thanks for this great piece of software! I am really happy to use it and to conduct experiments with my SMT32f4discovery!

My environment:

Win7 64 bit
Eclipse 4.3 SR1
most recent GNU ARM Eclipse (downloaded yesterday)
most recent GNU ARM Compiler 4.8

I tried the semihosting template, but after two lines of output, the code trapped into the HardFault_Handler. I have read this (http://sourceforge.net/p/gnuarmeclipse/bugs/73/), but adding "monitor arm semihosting enable" has no effect. In fact, I have the impression, that this "Enable ARM Semihosting"-checkbox is exactly this setting...

Thanks in advance for your help!


What do I have to do in order to avoid this trap


  • Klaus Liebler
    Klaus Liebler

    I have further information: The problem only occurs if I create a C++ project. If I create a C project, semihosting works fine!

    • status: open --> accepted
    • assigned_to: Liviu Ionescu (ilg)
  • Klaus Liebler
    Klaus Liebler

    Thank you for pointing to this bug issue. I installed the beta and now the c++ template compiles and runs fine.

    One other question: When creating a new OpenOCD debug configuration, I enter my "-f board/stm32f4discovery.cfg" string in the "Debugger-->Other Options" field. Is this the way you'd recommend it or are there other more sophisticated ways?

    Thank you so much!

    • sorry for the delay, yes, this is the only way supported by OpenOCD.

  • btw, the new beta version should not hang when using semihosting for trace output and running without the debugger connected.

    • status: accepted --> closed-duplicate