昨天非常晚的时候才最终发现事实上Unkown USB Device并非错误,仅仅是个警告而已,所以我们不关心就能够。让Makefile继续往下走就能够。于是我尝试mbs,s110。cload和firmware的下载。运行例如以下命令:

make flash

make flash_s110

make flash_mbs

make flash_cload

详细运行步骤例如以下:

bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make flash_mbs
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
-c "flash write_image erase bootloaders/nrf_mbs_v1.0.hex" -c "verify_image bootloaders/nrf_mbs_v1.0.hex" -c "reset halt" \
-c "mww 0x4001e504 0x01" -c "mww 0x10001014 0x3F000" \
-c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.556986
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* nrf51.cpu hla_target little nrf51.cpu halted
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
auto erase enabled
Warn : Unknown device (HWID 0x00000058)
^CMakefile:122: recipe for target 'flash_mbs' failed
make: *** [flash_mbs] Interrupt bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make flash_mbs
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
-c "flash write_image erase bootloaders/nrf_mbs_v1.0.hex" -c "verify_image bootloaders/nrf_mbs_v1.0.hex" -c "reset halt" \
-c "mww 0x4001e504 0x01" -c "mww 0x10001014 0x3F000" \
-c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.556986
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* nrf51.cpu hla_target little nrf51.cpu halted
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
auto erase enabled
Warn : Unknown device (HWID 0x00000058)
wrote 3072 bytes from file bootloaders/nrf_mbs_v1.0.hex in 19.481831s (0.154 KiB/s)
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x000007c0
verified 2112 bytes in 0.288700s (7.144 KiB/s)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
shutdown command invoked
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make flash_cload
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
-c "flash write_image erase bootloaders/cload_nrf_v1.0.hex" -c "verify_image bootloaders/cload_nrf_v1.0.hex" -c "reset halt" \
-c "mww 0x4001e504 0x01" -c "mww 0x10001014 0x3F000" \
-c "mww 0x4001e504 0x01" -c "mww 0x10001080 0x3A000" -c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.556986
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* nrf51.cpu hla_target little nrf51.cpu running
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
auto erase enabled
Warn : Unknown device (HWID 0x00000058)
wrote 13312 bytes from file bootloaders/cload_nrf_v1.0.hex in 82.957291s (0.157 KiB/s)
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x000007c0
verified 12368 bytes in 0.351360s (34.375 KiB/s)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
shutdown command invoked
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make flash_s110
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
-c "nrf51 mass_erase" \
-c "flash write_image erase s110/s110_nrf51822_7.0.0_softdevice.hex" \
-c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.558242
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* nrf51.cpu hla_target little nrf51.cpu running
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
Warn : Unknown device (HWID 0x00000058)
auto erase enabled
Info : Padding image section 0 with 2112 bytes
wrote 87040 bytes from file s110/s110_nrf51822_7.0.0_softdevice.hex in 543.104126s (0.157 KiB/s)
shutdown command invoked
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make flash
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
-c "flash write_image erase cf2_nrf.hex" -c "verify_image cf2_nrf.hex" \
-c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.558242
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* nrf51.cpu hla_target little nrf51.cpu running
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
auto erase enabled
Warn : Unknown device (HWID 0x00000058)
wrote 45056 bytes from file cf2_nrf.hex in 282.951080s (0.156 KiB/s)
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x000007c0
verified 44944 bytes in 0.579762s (75.705 KiB/s)
shutdown command invoked

那事实上,在Makefile的最后,我们能够看到:

factory_reset:
make mass_erase
ifeq ($(strip $(S110)),1)
make flash_s110
make flash_mbs
make flash_cload
endif
make flash

所以看上去假设S110=1,那么仅仅要运行make factory_reset就能够将s110,mbs。cload和firmware所有下载进去。不用分步进行,一键搞定,真爽!

昨天的研究也没白费。最终搞懂了。

xubuntu openocd nRF51822 download --- 2的更多相关文章

  1. IBDAP-CMSIS-DAP

    IBDAP-CMSIS-DAP Armstart's CMSIS-DAP firmware implementation in gcc and makefile. http://www.armstar ...

  2. [nRF51822] 14、浅谈蓝牙低功耗(BLE)的几种常见的应用场景及架构(科普类干货)

    蓝牙在短距离无线通信领域占据举足轻重的地位—— 从手机.平板.PC到车载设备, 到耳机.游戏手柄.音响.电视, 再到手环.电子秤.智能医疗器械(血糖仪.数字血压计.血气计.数字脉搏/心率监视器.数字体 ...

  3. 低功耗蓝牙4.0BLE编程-nrf51822开发(2)

    相关下载:http://download.csdn.net/detail/xgbing/9565708 首先看的示例是心率计一个示例程序:<KEIL path> \ARM\Device\N ...

  4. [编译] 6、开源两个简单且有用的安卓APP命令行开发工具和nRF51822命令行开发工具

    星期四, 27. 九月 2018 12:00上午 - BEAUTIFULZZZZ 一.前言 前几天给大家介绍了如何手动搭建安卓APP命令行开发环境和nRF51822命令行开发环境,中秋这几天我把上面篇 ...

  5. [编译] 4、在Linux下搭建nRF51822的开发烧写环境(makefile版)

    星期日, 09. 九月 2018 07:51下午 - beautifulzzzz 1.安装步骤 1) 从GNU Arm Embedded Toolchain官网下载最新的gcc-arm工具链,写文章时 ...

  6. LPCScrypt, DFUSec : USB FLASH download, programming, and security tool, LPC-Link 2 Configuration tool, Firmware Programming

    What does this tool do? The LPC18xx/43xx DFUSec utility is a Windows PC tool that provides support f ...

  7. OpenOCD Debug Adapter Configuration

    Correctly installing OpenOCD includes making your operating system give OpenOCD access to debug adap ...

  8. STLink download/debug interface for Linux.

    http://arm-utilities.googlecode.com/svn-history/r47/trunk/stlink-download/stlink-download.c /* STLin ...

  9. Ubuntu 16.04下EasyOpenJTAG+OpenOCD的安装和使用【转】

    本文转载自:http://www.linuxdiyf.com/linux/24086.html Ubuntu 16.04下EasyOpenJTAG+OpenOCD的安装和使用 发布时间:2016-09 ...

随机推荐

  1. select实现斐波那契和超时机制

    package main import "fmt" func fib(ch chan <-int, quit <- chan bool){ x, y := 1, 1 f ...

  2. java Class.forName()

    Java程序在运行时,Java运行时系统一直对所有的对象进行所谓的运行时类型标识.这项信息纪录了每个对象所属的类. 虚拟机通常使用运行时类型信息选准正确方法去执行,用来保存这些类型信息的类是Class ...

  3. [设计模式-行为型]状态模式(State)

    一句话 在一个类的对象中维护状态的类的对象 概括

  4. python-函数(装饰器)

    装饰器 装饰器的主要功能: 在不改变函数调用方式的基础上在函数的前.后添加功能. 装饰器的固定格式: #装饰器的本质 :闭包函数 #功能:就是在不改变原函数调用方式的情况下,在这个函数前后加上扩展功能 ...

  5. 备份文件的python脚本(转)

    作用:将目录备份到其他路径.实际效果:假设给定目录"/media/data/programmer/project/python" ,备份路径"/home/diegoyun ...

  6. python 文件路径操作方法(转)

    Python编程语言在实际使用中可以帮助我们轻松的实现一些特殊的功能需求.在这里我们将会为大家详细介绍一下有关Python文件路径的相关操作技巧,从而方便我们在实际开发中获得一些帮助. Python文 ...

  7. api接口思路介绍

    现在很流行api了,但各种api做法不一样,下面我整理了一些自己的想法,也是看了各大门户网站开放的api应用想到的,与大家分享分享,高手跳过.   API(Application Programmin ...

  8. Python与数据结构[3] -> 树/Tree[0] -> 二叉树及遍历二叉树的 Python 实现

    二叉树 / Binary Tree 二叉树是树结构的一种,但二叉树的每一个节点都最多只能有两个子节点. Binary Tree: 00 |_____ | | 00 00 |__ |__ | | | | ...

  9. Tarjan缩点【p1262】间谍网络

    Description 由于外国间谍的大量渗入,国家安全正处于高度的危机之中.如果A间谍手中掌握着关于B间谍的犯罪证据,则称A可以揭发B.有些间谍收受贿赂,只要给他们一定数量的美元,他们就愿意交出手中 ...

  10. [SHOI2009] 交通网络

    简单最短路计数. #include<bits/stdc++.h> #define ll long long using namespace std; #define D double co ...