ChibiOS Debug View help please

Discussions and support about ChibiStudio, the free development environment for ARM.
kb1gtt
Posts: 21
Joined: Sat Jul 09, 2016 11:29 am

ChibiOS Debug View help please

Postby kb1gtt » Mon Jul 11, 2016 8:34 pm

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?

User avatar
Giovanni
Site Admin
Posts: 12950
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: ChibiOS Debug View help please

Postby Giovanni » Mon Jul 11, 2016 8:49 pm

hi,

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

Giovanni

kb1gtt
Posts: 21
Joined: Sat Jul 09, 2016 11:29 am

Re: ChibiOS Debug View help please

Postby kb1gtt » Mon Jul 11, 2016 8:57 pm

From main.c

Code: Select all

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

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

User avatar
Giovanni
Site Admin
Posts: 12950
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: ChibiOS Debug View help please

Postby Giovanni » Mon Jul 11, 2016 8:59 pm

Step until you are past chSysInit() or place a breakpoint after that call.

Giovanni

kb1gtt
Posts: 21
Joined: Sat Jul 09, 2016 11:29 am

Re: ChibiOS Debug View help please

Postby kb1gtt » Mon Jul 11, 2016 9:03 pm

This picture more clearly shows that we have just past chSysInit by a little bit, and still no data in ChibiStudio.
Untitled.png

User avatar
Giovanni
Site Admin
Posts: 12950
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: ChibiOS Debug View help please

Postby Giovanni » Mon Jul 11, 2016 9:38 pm

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

kb1gtt
Posts: 21
Joined: Sat Jul 09, 2016 11:29 am

Re: ChibiOS Debug View help please

Postby kb1gtt » Mon Jul 11, 2016 9:53 pm

Ah, press the magic button. I see information now. Thanks for the tips and tricks.

omcdr
Posts: 89
Joined: Wed Aug 17, 2016 3:25 pm
Has thanked: 6 times
Been thanked: 7 times

Re: ChibiOS Debug View help please

Postby omcdr » Tue Sep 06, 2016 3:02 pm

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 ?

User avatar
Giovanni
Site Admin
Posts: 12950
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: ChibiOS Debug View help please

Postby Giovanni » Tue Sep 06, 2016 3:09 pm

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

omcdr
Posts: 89
Joined: Wed Aug 17, 2016 3:25 pm
Has thanked: 6 times
Been thanked: 7 times

Re: ChibiOS Debug View help please

Postby omcdr » Tue Sep 06, 2016 7:41 pm

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 ?


Return to “ChibiStudio”

Who is online

Users browsing this forum: No registered users and 1 guest