-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started build and debug
Kevin C edited this page May 20, 2013
·
5 revisions
- Install the following
- Tool Chain https://launchpad.net/gcc-arm-embedded
- basic gnu tools mingw, I used http://www.yagarto.de/download/yagarto/yagarto-tools-20121018-setup.exe from http://www.yagarto.de/
- ST-Link V2 USB Driver http://www.st.com/web/en/catalog/tools/PF258167
- OpenOCD for windows 64 from http://www.freddiechopin.info/en/download/category/10-openocd-dev
- Eclipse IDE for C/C++ Developers http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/SR2/eclipse-cpp-juno-SR2-win32-x86_64.zip
- Connect the ST-link or the discovery board and ensure that the USB driver is found
- In a terminal(cmd) window go to the bin-x64 directory where the openOCD is located
- Start openocd > openocd-x64-0.7.0-rc2.exe -f stm32f4discovery.cfg
- There should not be any errors, this is setting up a GDB server on localhost port 3333 so it will need network access. If you see "Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints" then the connection is probably working
- Install gdb hardware debugging
- Help->Install New Software
- In the "Work with:" entry box click on the down arrow and select the eclipse release that you are using ( Juno - http://download.eclipse.org/releases/juno )
- Under "Mobile and Device Development" select "C/C++ GDB Hardware Debugging" and install.
- A new makefile project from existing code
- File->New->Makefile project with existing code
- Select the directory of the project