昨天非常晚的时候才最终发现事实上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所有下载进去。不用分步进行,一键搞定,真爽!

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

最新文章

  1. Win10提示没有权限使用网络资源问题解决
  2. 将JavaScript 插入网页的方法
  3. 用scrollTop制作一个自动滚动公告栏
  4. 后缀数组 POJ 3693 Maximum repetition substring
  5. Service中事务不能回滚的解决方式(转)
  6. Ztree使用笔记
  7. textarea 在不同浏览器高宽不一致的兼容性问题
  8. sql server多表数据批量更新
  9. SVN安装与使用
  10. JAVA学习路线图---(JAVA1234)
  11. 今天收到报警邮件,提示网站502 bad gateway,
  12. Java MongoDB 资料集合
  13. Eclipse代理设置
  14. awk命令练习
  15. Less 的使用方法
  16. Vmware workstation V2V
  17. configparser模块(ini配置文件生成模块)
  18. tomcat 配置细节
  19. JavaScript面向对象--记录防忘记(一)
  20. Print Article HDU - 3507 -斜率优化DP

热门文章

  1. windows下nginx安装及使用
  2. centos 自启动
  3. python中的with与上下文管理器
  4. WIN32通用控件之打开对话框获取文件路径
  5. JDK+Tomcat+MySql环境配置—linux
  6. java使用maven项目(二)分模块开发
  7. MyEclipse的破解代码,适用各个版本
  8. (13)python 正则表达式
  9. 【LeetCode刷题】SQL-Combine Two Tables
  10. intellij idea android错误: Missing styles. Is the correct theme chosen for this layout?