Page 1 of 1
how to stop at main()
Posted: Mon Mar 11, 2013 2:30 am
by yingyan
I am new to ChibiStudio.
In Cibios RT/STM32 DEMOS ,I opened a project,ARMCM4-STM32F407-DISCOVERY, build this project,run Openocd,debug.
It works,GDB hardware debugger(suspended),Thread 0(running). seem Thread 0 should be suspended. I checked dubug configuration->startup -> set breakpoint at main.
Back to Chibios RT(whole tree), chose a project ARMCM4-STM32F407-DISCOVERY-G++,do I need to do some setting,because buid all and build project are not valid.
Thanks to any response .
Re: how to stop at main()
Posted: Mon Mar 11, 2013 9:28 am
by Giovanni
Hi,
It is normal, the "whole tree" project is not a C project and you cannot build it. It is just a way to have the whole OS structure accessible. You can only build the projects imported into the workspace.
Giovanni
Re: how to stop at main()
Posted: Mon Mar 11, 2013 9:33 am
by Tectu
I'm not sure if I understand the problem correctly but to check if you have any project building related problems, you can open a terminal and use OpenOCD from there. You can use
this guide to get through the needed steps. Once you are done, use the command
break main.c:42 where 42 is the number of the line where you want to put a breakpoint. It's also described in the linked page - but yes, a bit poor - I should update that one.
~ Tectu
Re: how to stop at main()
Posted: Wed Mar 13, 2013 6:14 pm
by yingyan
Thank your guys.by Giovanni post, I understand more.
I tried to Import Makefile projects into Eclipse,for example ,I chose demos/ARMCM4-STM32F303-DISCOVERY,File->New->C Project
project name:ARMCM4-STM32F303-DISCOVERY
choose empty project
unselect use default location
location: (from browse) C:\ChibiStudio\chibios\demos\ARMCM4-STM32F303-DISCOVERY
there is warning pop up
C:\ChibiStudio\chibios\demos\ARMCM4-STM32F303-DISCOVERY overlaps the location of another project: 'ARMCM4-STM32F303-DISCOVERY'
don't know what caused this problem.
Re: how to stop at main()
Posted: Wed Mar 13, 2013 9:38 pm
by Giovanni
Probably you already imported the project, just you don't see it because it has not been added to a "Working Set". Projects are not automatically assigned to any working set after being created or imported.
Right select "properties" on the "ChibiOS/RT STM32 Demos" working set and add the projects from there.
Giovanni
Re: how to stop at main()
Posted: Thu Mar 14, 2013 3:09 pm
by yingyan
It works.Thank you so much,you are very helpful.