ubuntu stm32 开发环境

ubuntu

1:   openocd

      1.1: 安装 openocd

sudo apt-get install openocd
     1.2: 配置 openocd
             新建 oenocd_stm32.cfg  内容如下:

interface jlink
set WORKAREASIZE 0x4000
source [find target/stm32f1x.cfg]
# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz
adapter_khz 1000

             openocd 的具体配置方法,请参考: 

 1: openocd 官方说明文档 http://openocd.berlios.de/doc/pdf/openocd.pdf

2: 目录: /usr/share/openocd/scripts 下的脚本

       1.3: 测试  openocd

               插上  j-link 吧开发板连接上  ,运行命令:

                  openocd -f openocd_stm32.cfg

 

2:   gcc 交叉编译环境建立:

  https://sourcery.mentor.com/sgpp/lite/arm/portal/subscription?@template=lite

 到 页面  https://sourcery.mentor.com/sgpp/lite/arm/portal/subscription3053  下载 linux tar 压缩包:

https://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

解压到 /opt/arm-2011.03/

编辑    ~/.bashrc 在文件最后添加:   

 export PATH="/opt/arm-2011.03/bin:$PATH"

为了应用刚才的路径设置需要在shell 中输入: source ~/.bashrc

输入命令   arm-none-linux-gnueabi-gcc -v  可以查看 gcc 的编译信息


3:   Eclipse 开发环境:

安装 eclipse

sudo apt-get install eclipse

 安装  CDT

       

             


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值