Engineering-Diy

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 28 December 2012

STM32F3 Discovery on Windows with Eclipse and OpenOCD

Posted on 15:24 by Unknown
Hi!

Because of a lot of requests, I have decided to make the Windows version of the tutorial for setting up STM32F3-Discovery board, with free tools.

First, download ST-LINK V2 driver from here. Open the archive and install what is in it.
Then plug the device and let the driver install.
Now, get the latest OpenOCD installer from here and extract it somewhere. Copy <openocd_path>\scripts\board\stm32f3discovery.cfg to <openocd_path>\bin folder
Now you should be able to connect to the board in Command Prompt like this:
D:\embedded\openocd-0.7.0-dev-121112115725\bin>openocd-0.7.0-dev-121112115725.ex
e -f stm32f3discovery.cfg
Open On-Chip Debugger 0.7.0-dev-00079-g08ddb19 (2012-11-12-17:14)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
adapter speed: 1000 kHz
srst_only separate srst_nogate srst_open_drain
Info : clock speed 1000 kHz
Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
Now close the Command Prompt.

Download latest Eclipse.
Go to Eclipse download page and download Eclipse IDE for C/C++ developers. Extract it and start eclipse.exe. Go to Workbench.

Set up Eclipse.
Go to Help->Install New Software, select All Available Sites in Work With dropdown list. Enter "GDB Hardware Debugging" in the search box and install the package. Download Arm Eclipse Plugin from here and then go to Help->Install New Software in Eclipse. Click Add and then click archive and select the previous downloaded file. Then select the packet and install it.

Install GCC Arm Embedded toolchain from here.

Now we need some Linux tools like make and rm for Windows. Download Cygwin from here. Select whichever mirror you want. Search for "make" and select the binary from Devel dropdown. Click next and wait for it to install.
Now, download this project and import it in Eclipse Workspace. Right click project and select  Properties->C/C++ Build->Environment. Here, check if PATH variable has link to toolchain and to Cygwin binaries folders. Here, you can add <gcc-arm-none-eabi-4_6-2012q4/arm-none-eabi/include> path for the Eclipse IDE to find some headers like stdint.h.
If everything  was installed correctly you should be able to clean the project and to build it.

With the project selected, click Run->External Tools->External Tools Configurations and select from the left the configuration named OpenOCD(win). Check if the path for OpenOCD at top is correct.
Now, click Run.

After this, click Run->Debug Configurations and select from the left Navigation-debug. In the Debugger tab check if the arm-none-eabi-gdb.exe path is correct. Now click Debug and you should see the Debug Window from Eclipse and the Program counter pointing at the first instruction from main().

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in cortex m4, discovery, eclipse, embedded, linux, openocd, stm32f3, tutorial, windows | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • OpenElec with support for eGalax touch screen
    Hi! Lately I have tested OpenElec for Raspberry PI and found out that it is very very fast, very very small and also it has some great addon...
  • Raspberry PI, Raspbian, XBMC and eGalax 7 inch touchscreen
    Hello! I have spent some time lately trying to find a solution to get my 7 inch eGalax touchscreen to work with  Raspbian(Debian Wheezy) in ...
  • Build XBMC Frodo from source in Raspbian on Raspberry PI
    Hi! After struggling couple of days in finding the best way to build XBMC on Raspberry PI I have finally got a working solution(haven't ...
  • STM32F3 Discovery + Eclipse + OpenOCD
    Hi, ST launched in September a very interesting development board( STM32F3-Discovery ). It is a very cheap one(I have got myself one for ~10...
  • Keep your linux clock synchronized with gps time
    A big problem for a CarPC is that you need a real time clock to synchronize your system with. For my CarPC, I don't have any RTC module ...
  • Car PC project(August 2013 update)
    This is an update for my CarPC project. You can download the latest image from here (username:'pi', password:'a') The main f...
  • STM32F3 Discovery on Windows with Eclipse and OpenOCD
    Hi! Because of a lot of requests, I have decided to make the Windows version of the tutorial for setting up STM32F3-Discovery board, with fr...
  • STM32F3-Discovery Usart with printf
    Hi, The next step after setting up the Development Environment for STM32F3-Discovery was to communicate with computer via serial port. I hav...
  • Control XBMC from the Raspberry PI GPIO's
    I have recently worked on adding external controls for my Raspberry PI CarPC project because while driving it is better to have some physica...
  • Adding 7inch display with touchscreen to Raspberry PI
    Hi! First thing I got in mind when seeing Raspberry PI was "car PC project". The targeted display was 7 inch with touchscreen. I h...

Categories

  • 7 inch
  • calibration
  • car pc
  • compile xbmc
  • controller
  • cortex m4
  • date
  • debian wheezy
  • discovery
  • display
  • eclipse
  • eGalax
  • embedded
  • gpio
  • GPS
  • kernel rebuild
  • linux
  • navigation
  • Navit
  • openElec
  • openocd
  • Openstreetmap
  • printf
  • push button
  • raspberry pi
  • raspbian
  • resistive
  • stm32f3
  • synchronization
  • touch screen
  • touchscreen
  • tutorial
  • ubuntu
  • usart
  • wheezy
  • windows
  • xbmc
  • xbmc 12
  • xbmc 12.2
  • xbmc frodo

Blog Archive

  • ►  2013 (8)
    • ►  November (1)
    • ►  October (1)
    • ►  August (2)
    • ►  July (1)
    • ►  February (2)
    • ►  January (1)
  • ▼  2012 (4)
    • ▼  December (1)
      • STM32F3 Discovery on Windows with Eclipse and OpenOCD
    • ►  November (3)
Powered by Blogger.

About Me

Unknown
View my complete profile