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


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

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

首先給一些網址,我就是根據這些網址自己慢慢摸索吧

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

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

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

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

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

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

         安裝eclipse后點擊HELP——eclipse marketpalce 

        在find 里輸入ARM我們會看到GNU ARM Eclipse 3.1.1(插件的版本號可能不一樣)點擊“install”即可安裝  

                       

在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-cvs
Copyright (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
重新給開發板上電就可以正常運行


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM