semihosting and initialise_monitor_handles()
Posted: Tue Feb 11, 2014 2:54 pm
Hello, I'm trying to use semihosting feature of OpenOCD, but executing initialise_monitor_handles() just hangs the debugging process.
The problem is here:
void main() {
initialise_monitor_handles();
// The debugger does not return here...
}
I'm using STM32F0DISCOVERY board with ChibiStudio. That semihosting was added just to the demonstration project for that board.
Linker options in the makefile are:
LD = $(TRGT)gcc --specs=rdimon.specs -lrdimon
DLIBS = "C:\ChibiStudio\tools\GNU Tools ARM Embedded\4.7 2013q2\arm-none-eabi\lib\librdimon.a"
I set the following Initialization Commands were set for the GDB debugger in the ChibiStudio:
set remotetimeout 20
monitor reset init
monitor sleep 50
mon arm semihosting enable
So, I'm able to successfully debug the application in Eclipse of ChibiStudio, but execution of initialise_monitor_handles() does not return to the debugger. And even OpenOCD says that "semihosting is enabled" in the console.
BTW, I tried to just manually run OpenOCD and GDB from the command line. The result is the same.
So, could you help with this problem? May be there are some issues with crt0.c from the port? Or with the linker script?
Thanks in advance!
The problem is here:
void main() {
initialise_monitor_handles();
// The debugger does not return here...
}
I'm using STM32F0DISCOVERY board with ChibiStudio. That semihosting was added just to the demonstration project for that board.
Linker options in the makefile are:
LD = $(TRGT)gcc --specs=rdimon.specs -lrdimon
DLIBS = "C:\ChibiStudio\tools\GNU Tools ARM Embedded\4.7 2013q2\arm-none-eabi\lib\librdimon.a"
I set the following Initialization Commands were set for the GDB debugger in the ChibiStudio:
set remotetimeout 20
monitor reset init
monitor sleep 50
mon arm semihosting enable
So, I'm able to successfully debug the application in Eclipse of ChibiStudio, but execution of initialise_monitor_handles() does not return to the debugger. And even OpenOCD says that "semihosting is enabled" in the console.
BTW, I tried to just manually run OpenOCD and GDB from the command line. The result is the same.
So, could you help with this problem? May be there are some issues with crt0.c from the port? Or with the linker script?
Thanks in advance!