2015-12-02 04:01 AM
Hi, I follwed
http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1533/PF261797?s_searchtype=keyword
and then tohttp://www.openstm32.org/Installing+System+Workbench+for+STM32+with+installer
page to install SW4STM4 tool.I could import the Uart_printf project in the STM32cubeF4 package and build it. But I don't know how to program the board and run(debug) the program. Internet search lead me to this page below.Then I found newest versions of gdb hardware debugging and open OCD is alread installed with the eclipse. Then I tried to configure for the debugger, but I don't know how to set it. Below is the capture. (port number 4242 is for ST-UTIL but I'm not sure it's for my case. I think I'm using ST-LINK/V2 on the board). And though eclipse said hardware gdb is already installed, I cannot find it in my C: drive. When I checked 'install new software' it shows me that GDB hardware debugging is already installed. In the image below, when I check Hide items already installed, the first item disappears meaning it's installed already.Where is gdb installed? any help would be appreciated. best regards,Chan #eclipse #!bug #debugging2015-12-02 06:48 AM
Hello Chan
Thank you for reporting this, but SW4STM32 has already an integrated builtin debugger based on open OCD, so you don't need to install another debugging plugin within SW4STM32Even more, the version of open OCD delivered with SW4STM32 supports more STM32 devices than other debugging plugins.To use it after building your project, open Debug Configurations then create a new 'Ac6 STM32 Debugging' configurationIf the Project field is not set automatically, use the 'Browse' button and select your project.
Finally you can launch your debug session by pressing the 'Debug' button.Best Regards,Tarek2015-12-02 07:19 AM
2015-12-04 02:04 AM
Hello Chan,
For the printf output there are two cases: 1- If you are retargetting the printf to serial output (UART/USART) ? As I can see from the comment in line 129 you are using an EVAL BOARD so based on that you need to connect your RS232 connector to your PC if your computer does not contain an RS232 input then you need to use an RS232 to USB adaptor if this is OK : the printf output cannot be displayed in openocd console so to display the printf output you can: - use an external program : there are many ones available (http://en.wikipedia.org/wiki/Tera_Term
,http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
, ...) wherehttp://www.compuphase.com/software_termite.htm
is my favorite one. - otherwise if you dont want to use an external program you can install a terminal plugin within ecplise like ''Target Management Terminal (Core SDK)'' and ''RxTx'' for more details see thishttp://mcuoneclipse.com/2014/03/23/serial-terminal-view-with-eclipse-kepler/
PS : this works only with eclipse kepler 2- If you want to use semihosting on System Workbench ? to do this please refer to thishttp://www.openstm32.org/tiki-view_forum_thread.php?comments_parentId=164
Concerning the core being halted many times when stepping over, this is because background polling is enabled by default. This is required when using GDB (we are in this case)For more information on Event Polling see thishttp://openocd.org/doc/html/Daemon-Configuration.html#Event-Polling
Best Regards,Tarek