- #Gdb and visual micro tutorial how to#
- #Gdb and visual micro tutorial driver#
- #Gdb and visual micro tutorial software#
This is how I start OpenOCD on my computer with the command line: > "C:\Apps\OpenOCD-0.9.0-Win32\bin\openocd" -f "C:\Apps\OpenOCD-0.9.0-Win32\share\openocd\scripts\interface\stlink-v2.cfg" -f "C:\Apps\OpenOCD-0.9.0-Win32\share\openocd\scripts\target\stm32f7x.cfg" -s "C:\Apps\OpenOCD-0.9.0-Win32\share\openocd\scripts" You will also need to give OpenOCD access to the scripts folder, by passing it with the -s argument. Pass those files to OpenOCD with the -f argument in the command line. Typically you need to give a configuration file that describes the JTAG programmer, and a configuration file that defines your microcontroller. You will need to give OpenOCD a few configuration files, such that it knows where to look for your microcontroller. Open a command terminal, and start OpenOCD. Install it, and put it in a folder on your harddrive, like "C:\Apps\".
#Gdb and visual micro tutorial software#
#Gdb and visual micro tutorial driver#
Both the JTAG adapter and its USB driver are usually delivered by your chip manufacturer (for example STMicroelectronics). OpenOCD needs to find the proper USB driver to connect to the JTAG adapter (for example STLink).
#Gdb and visual micro tutorial how to#
Eclipse also provides some configuration files to OpenOCD - such that OpenOCD knows how to connect to your microcontroller. This is what I learned:Įclipse starts the OpenOCD software when you click the 'debug' icon. I've read (part of) the Master Thesis from Dominic Rath - the developer of OpenOCD. In Eclipse it's just one 'click on a button' - at least if Eclipse is configured correctly for your microcontroller. The natural following step is flashing the firmware to the chip and start a debug session. elf binary file as the result of the compilation. Running this bat-file should do the job! If all goes well, you get one. Huray, now I got all the GNU tools up and running on my system! I put the following build.bat file in the same folder as the makefile: off Next I made a new folder on my harddrive and copied all these GNU tools into it: C:\Apps\AC6GCCĪnd I add these entries to the "Environment Path variable": - C:\Apps\AC6GCC\bin ) in the following folder, after installing SW4STM32 (System Workbench for STM32): C:\Ac6\SystemWorkbench\plugins\fr.-none.win32_1.02121829\tools\compiler\ Note that I found the GNU tools (compiler, linker, make utility, GDB. You don't need Eclipse anymore for that! Especially if you can read (and understand) the makefile and tweak it to your needs when your project advances. Once you know where they are, all you've got to do is opening a command terminal, and type the GNU make command. The key to success was finding out where Eclipse puts its make-files for a specific project. I am now able to compile and link my software into a binary. Please open all the command terminals with admin rights. But most stuff explained here also applies on Linux systems. To get such deeper understanding, it would be wonderful to run the whole procedure from the command line. I'd like to discover what happens behind the scenes when I build (compile - link - flash) my software, and when I run a debug session. Eclipse has definitely its merits, but I'd like to feel independent from this IDE. The standard (low-cost) way to program ARM microcontrollers is using Eclipse with a complex toolchain plugged into it.