Page 1 of 2

ChibiOS Debug View help please

Posted: Mon Jul 11, 2016 8:34 pm
by kb1gtt
I'm having some troubles with ChibiOS Debug View, I have followed a brief tutorial found here http://www.playembedded.org/blog/en/201 ... ibistudio/ However the results are shown below.
Untitled.png
You can see that the board is running, and has stopped in main.c, the ChibiOS Debug View shows no data.

From chconf.h

Code: Select all

#define CH_DBG_STATISTICS      TRUE
#define CH_DBG_SYSTEM_STATE_CHECK   TRUE
#define CH_DBG_ENABLE_CHECKS      TRUE
#define CH_DBG_ENABLE_ASSERTS      TRUE
#define CH_DBG_ENABLE_TRACE      TRUE
#define CH_DBG_ENABLE_STACK_CHECK   TRUE
#define CH_DBG_FILL_THREADS         TRUE
#define CH_DBG_THREADS_PROFILING   FALSE

From the console after a make clean, the build. Note the -ggdb -O0 -g3

Code: Select all

arm-none-eabi-gcc -c -ggdb -O0 -g3 -mcpu=cortex-m4 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant

From ch.h

Code: Select all

#define CH_KERNEL_MAJOR         3
#define CH_KERNEL_MINOR         0
#define CH_KERNEL_PATCH         1

This is ChibiStudio_Preview17, PC is Win7 64bit, this is java version noted below.

Code: Select all

C:\>java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

C:\>

Is there something else I need to do to get this to display information?

Re: ChibiOS Debug View help please

Posted: Mon Jul 11, 2016 8:49 pm
by Giovanni
hi,

You need to step past chSysInit() or the debugger does not detect the OS because it is not initialized.

Giovanni

Re: ChibiOS Debug View help please

Posted: Mon Jul 11, 2016 8:57 pm
by kb1gtt
From main.c

Code: Select all

int main(void) {
  halInit();
  chSysInit();

Does that do what you mean about stepping past that function?

Re: ChibiOS Debug View help please

Posted: Mon Jul 11, 2016 8:59 pm
by Giovanni
Step until you are past chSysInit() or place a breakpoint after that call.

Giovanni

Re: ChibiOS Debug View help please

Posted: Mon Jul 11, 2016 9:03 pm
by kb1gtt
This picture more clearly shows that we have just past chSysInit by a little bit, and still no data in ChibiStudio.
Untitled.png

Re: ChibiOS Debug View help please

Posted: Mon Jul 11, 2016 9:38 pm
by Giovanni
Have you clicked the "refresh" button? it is the yellow one on upper left of the window.

The refresh operation can be slowish, depending on the used debugger HW, so it is performed on demand only.

Giovanni

Re: ChibiOS Debug View help please

Posted: Mon Jul 11, 2016 9:53 pm
by kb1gtt
Ah, press the magic button. I see information now. Thanks for the tips and tricks.

Re: ChibiOS Debug View help please

Posted: Tue Sep 06, 2016 3:02 pm
by omcdr
I have similar problem, but button "reload" not working, Debug View is empty
My configuration:

Code: Select all

Makefile: USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16

chconf.h
#define CH_DBG_STATISTICS                   TRUE
#define CH_DBG_SYSTEM_STATE_CHECK           TRUE
#define CH_DBG_ENABLE_CHECKS                TRUE
#define CH_DBG_ENABLE_ASSERTS               TRUE
#define CH_DBG_ENABLE_TRACE                 TRUE
#define CH_DBG_ENABLE_STACK_CHECK           TRUE
#define CH_DBG_FILL_THREADS                 TRUE
#define CH_DBG_THREADS_PROFILING            FALSE


Image

What I'm missing ?

Re: ChibiOS Debug View help please

Posted: Tue Sep 06, 2016 3:09 pm
by Giovanni
Probably you created a new workspace. You need to set in Preferences the default debugger for "GDB Hardware Debugging" to "Legacy GDB". Without that the plugin is unable to access the target.

Giovanni

Re: ChibiOS Debug View help please

Posted: Tue Sep 06, 2016 7:41 pm
by omcdr
I have coppied workspace settings from workspace161.
I set Legacy GDB in preferences, but still the same issue.
I'm using J-link v9 and JLinkGDBServerCL.exe - is there problem ?