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!
semihosting and initialise_monitor_handles()
Moderators: RoccoMarco, barthess
Re: semihosting and initialise_monitor_handles()
Is it possible to get some small workable demo of using semihosting together with ChibiOS?
It looks I get stuck on some trivial issue, but it is not easy to find it out for newcomers...
It looks I get stuck on some trivial issue, but it is not easy to find it out for newcomers...
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: semihosting and initialise_monitor_handles()
Hi,
I don't have any example and no idea of what the problem could be. I never felt the need for such feature.
It most likely depends on what that initialise_monitor_handles() tries to do. If it defines exception handlers I would look in differences between vector names in ChibiOS (vectors.c) and the equivalent in CMSIS.
Giovanni
I don't have any example and no idea of what the problem could be. I never felt the need for such feature.
It most likely depends on what that initialise_monitor_handles() tries to do. If it defines exception handlers I would look in differences between vector names in ChibiOS (vectors.c) and the equivalent in CMSIS.
Giovanni
- DeusExMachina
- Posts: 223
- Joined: Tue Apr 03, 2012 5:08 am
- Location: South Korea
- Has thanked: 3 times
- Been thanked: 3 times
Re: semihosting and initialise_monitor_handles()
Semi-hosting is very interesting debugging feature that can be used in debugging (no need of dedicated UART). This feature supports many commercial and open source toolchains\IDE.
Who is online
Users browsing this forum: No registered users and 9 guests