在ubuntu下設置eclipse開發STM32等嵌入式設備

       以前爲了可以讓ROS與底層可以順利通信,我採用可開源開發板arduino ,由於arduino有ROS的庫,可以按照ROS wiki上所給的教程就能夠順利的開發,但因爲arduino的侷限性,我以爲是能夠直接用嵌入式開發ROS 與底層的通訊的,(不知道爲何我寫這樣理由的時候,就寫不下去了) 。html

   在ubuntu系統下安裝ROS ,安裝arduino ,安裝eclipse,等相關軟件的安裝,我也是在ubuntu下順利的配置好eclipse而且正確的下載了STM32 的程序後,以爲有必要在個人博客寫一下,可是可能中間的一些具體細節就可能忘記了,,,但總體的思路就是對的,並且得本身慢慢的摸索!java

首先給一些網址,我就是根據這些網址本身慢慢摸索吧linux

QEMU 安裝   gnuarmeclipse.github.io/debug/qemu/#define-the-qemufolder-locationgit

How to install the QEMU binaries?      gnuarmeclipse.github.io/qemu/install/github

GNU ARM Eclipse Plug-ins Features      gnuarmeclipse.github.io/plugins/features/redis

Toolchain path management          gnuarmeclipse.github.io/toolchain/path/ubuntu

JLink驅動下載http://www.segger.com/cms/jlink-software.htmleclipse

      1. 安裝java、配置環境變量
      2. 下載Eclipse IDE for C/C++ Developers 環境
      3. 解壓Eclipse, 下載GNU ARM Eclipse Plug-in最新版本

         安裝eclipse後點擊HELP——eclipse marketpalce ui

        在find 裏輸入ARM咱們會看到GNU ARM Eclipse 3.1.1(插件的版本號可能不同)點擊「install」便可安裝   spa

                       

在HELP-software install      GNU ARM Eclipse Plug-ins - http://gnuarmeclipse.sourceforge.net/updates

安裝,能夠選擇所有安裝。

                       

一切準備就緒   如今就是新建工程,創建一個STM32fXX的工程一直點擊下一步,不須要改什麼,但同時咱們須要設置編譯器的位置,官網下載gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2,而後解壓,設置好編譯器的路徑,

 

下載jinkGDBserver,http://www.segger.com/cms/jlink-software.html  使用命令安裝,會安裝到/opt文件下,

程序創建後點擊「build project」,經過JINK連接STM32開發板,以後在run configure  設置

          

在Executable欄目設置JinkGDBServer的路徑,手動輸入「Device name」好比STM32F103RB其餘設置不用改變,

在startup欄目下輸入下的設置

# Enable flash download and flash breakpoints.
# Flash download and flash breakpoints are features of
# the J-Link software which require separate licenses 
# from SEGGER.
# Select flash device
    monitor flash device = STM32F103ZE
# Enable FlashDL and FlashBPs
    monitor flash download = 1
    monitor flash breakpoints = 1
# Clear all pendig breakpoints
    monitor clrbp
# Set gdb server to little endian
    monitor endian little
# Set JTAG speed to 5 kHz
    monitor speed 5
# Reset the target
    monitor reset
    monitor sleep 100
# Set JTAG speed in khz
    monitor speed auto
# Vector table placed in Flash
    monitor writeu32 0xE000ED08 = 0x00000000(能夠更改STM32的名稱以及晶振頻率等)而後「run」便可下載程序,出現GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160616-cvsCopyright (C) 2015 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.  Type "show copying"and "show warranty" for details.This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".Type "show configuration" for configuration details.For bug reporting instructions, please see:<http://www.gnu.org/software/gdb/bugs/>.Find the GDB manual and other documentation resources online at:<http://www.gnu.org/software/gdb/documentation/>.For help, type "help".Type "apropos word" to search for commands related to "word".Remote connection closed從新給開發板上電就能夠正常運行
相關文章
相關標籤/搜索