Hello. I'm relativly new with Chibios. I've downloaded the Chibios 3.0. from the site, and I'm developing my custom application. My code works fine, but when I try to debug it, the openocd cannot detect ChibiOS, and when I set a breakpoint into a task, the software running does not stop, when hit the breakpoint.
I'm running Ubuntu with Eclipse Mars ide.
I configured the openocd, and the Eclipse by this tutorial:
http://vedder.se/2012/12/debugging-the- ... d-eclipse/My openocd config file is the following
Code: Select all
source [find interface/stlink-v2.cfg]
source [find target/stm32f4x.cfg]
$_TARGETNAME configure -rtos ChibiOS
reset_config srst_only srst_nogate
The openocd works fine with a non chibios based software, but when i connect to the openocd it show the following:
Code: Select all
GNU ARM Eclipse 32-bits Open On-Chip Debugger 0.10.0-dev-00141-g09aeb96-dirty (2015-10-28-12:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v14 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.897285
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x10076413
Info : flash size = 1024kbytes
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080001f0 msp: 0x20000400
Warn : RTOS ChibiOS not detected. (GDB could not find symbol 'ch_debug')
Warn : RTOS ChibiOS not detected. (GDB could not find symbol 'ch_debug')
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080001f0 msp: 0x20000400
Error: Memory signature identifier does not contain magic bytes.
Error: Reading the memory signature of ChibiOS/RT failed
I've tried to set the config file to -rtos auto but doesnt helped. I also triple checked my .elf file contains the ch_debug symbol!!!
But my main problem is, why does not stop the software running, when i set a breakpoint inside a thread? Until i put it into the main sequnce (initialisaion) it works, but noting in the thread.
I put here my main.c code, the main loop does nothing, just sleep.
Code: Select all
/*
* Application entry point.
*/
int main(void) {
/******************************************************************************/
/* @Description : Initialization of Chibios subsystems. */
/******************************************************************************/
vidInitSubSys();
chThdSleepMilliseconds(1000);
/******************************************************************************/
/* @Description : Initialization of user applications. */
/******************************************************************************/
vidInitApplications();
/*
* Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
while (true) {
chThdSleepMilliseconds(500);
}
}
Any idea??