之前为了能够让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
- 安装java、配置环境变量
- 下载Eclipse IDE for C/C++ Developers 环境
- 解压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
重新给开发板上电就可以正常运行